MLIR  20.0.0git
Public Member Functions | Protected Attributes | Friends | List of all members
mlir::polynomial::MonomialBase< Derived, CoefficientType > Class Template Referenceabstract

#include "mlir/Dialect/Polynomial/IR/Polynomial.h"

+ Inheritance diagram for mlir::polynomial::MonomialBase< Derived, CoefficientType >:

Public Member Functions

 MonomialBase (const CoefficientType &coeff, const APInt &expo)
 
virtual ~MonomialBase ()=default
 
const CoefficientType & getCoefficient () const
 
CoefficientType & getMutableCoefficient ()
 
const APInt & getExponent () const
 
void setCoefficient (const CoefficientType &coeff)
 
void setExponent (const APInt &exp)
 
bool operator== (const MonomialBase &other) const
 
bool operator!= (const MonomialBase &other) const
 
bool operator< (const MonomialBase &other) const
 Monomials are ordered by exponent. More...
 
Derived add (const Derived &other)
 
virtual bool isMonic () const =0
 
virtual void coefficientToString (llvm::SmallString< 16 > &coeffString) const =0
 

Protected Attributes

CoefficientType coefficient
 
APInt exponent
 

Friends

template<class D , typename T >
::llvm::hash_code hash_value (const MonomialBase< D, T > &arg)
 

Detailed Description

template<class Derived, typename CoefficientType>
class mlir::polynomial::MonomialBase< Derived, CoefficientType >

Definition at line 33 of file Polynomial.h.

Constructor & Destructor Documentation

◆ MonomialBase()

template<class Derived , typename CoefficientType >
mlir::polynomial::MonomialBase< Derived, CoefficientType >::MonomialBase ( const CoefficientType &  coeff,
const APInt &  expo 
)
inline

Definition at line 35 of file Polynomial.h.

◆ ~MonomialBase()

template<class Derived , typename CoefficientType >
virtual mlir::polynomial::MonomialBase< Derived, CoefficientType >::~MonomialBase ( )
virtualdefault

Member Function Documentation

◆ add()

template<class Derived , typename CoefficientType >
Derived mlir::polynomial::MonomialBase< Derived, CoefficientType >::add ( const Derived &  other)
inline

◆ coefficientToString()

template<class Derived , typename CoefficientType >
virtual void mlir::polynomial::MonomialBase< Derived, CoefficientType >::coefficientToString ( llvm::SmallString< 16 > &  coeffString) const
pure virtual

◆ getCoefficient()

template<class Derived , typename CoefficientType >
const CoefficientType& mlir::polynomial::MonomialBase< Derived, CoefficientType >::getCoefficient ( ) const
inline

◆ getExponent()

template<class Derived , typename CoefficientType >
const APInt& mlir::polynomial::MonomialBase< Derived, CoefficientType >::getExponent ( ) const
inline

◆ getMutableCoefficient()

template<class Derived , typename CoefficientType >
CoefficientType& mlir::polynomial::MonomialBase< Derived, CoefficientType >::getMutableCoefficient ( )
inline

◆ isMonic()

template<class Derived , typename CoefficientType >
virtual bool mlir::polynomial::MonomialBase< Derived, CoefficientType >::isMonic ( ) const
pure virtual

◆ operator!=()

template<class Derived , typename CoefficientType >
bool mlir::polynomial::MonomialBase< Derived, CoefficientType >::operator!= ( const MonomialBase< Derived, CoefficientType > &  other) const
inline

◆ operator<()

template<class Derived , typename CoefficientType >
bool mlir::polynomial::MonomialBase< Derived, CoefficientType >::operator< ( const MonomialBase< Derived, CoefficientType > &  other) const
inline

Monomials are ordered by exponent.

Definition at line 53 of file Polynomial.h.

References mlir::polynomial::MonomialBase< Derived, CoefficientType >::exponent.

◆ operator==()

template<class Derived , typename CoefficientType >
bool mlir::polynomial::MonomialBase< Derived, CoefficientType >::operator== ( const MonomialBase< Derived, CoefficientType > &  other) const
inline

◆ setCoefficient()

template<class Derived , typename CoefficientType >
void mlir::polynomial::MonomialBase< Derived, CoefficientType >::setCoefficient ( const CoefficientType &  coeff)
inline

◆ setExponent()

template<class Derived , typename CoefficientType >
void mlir::polynomial::MonomialBase< Derived, CoefficientType >::setExponent ( const APInt &  exp)
inline

Friends And Related Function Documentation

◆ hash_value

template<class Derived , typename CoefficientType >
template<class D , typename T >
::llvm::hash_code hash_value ( const MonomialBase< D, T > &  arg)
friend

Definition at line 267 of file Polynomial.h.

Member Data Documentation

◆ coefficient

template<class Derived , typename CoefficientType >
CoefficientType mlir::polynomial::MonomialBase< Derived, CoefficientType >::coefficient
protected

◆ exponent

template<class Derived , typename CoefficientType >
APInt mlir::polynomial::MonomialBase< Derived, CoefficientType >::exponent
protected

The documentation for this class was generated from the following file: