MLIR  20.0.0git
Public Member Functions | Static Public Member Functions | List of all members
mlir::polynomial::FloatPolynomial Class Reference

A single-variable polynomial with double coefficients. More...

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

+ Inheritance diagram for mlir::polynomial::FloatPolynomial:

Public Member Functions

 FloatPolynomial (ArrayRef< FloatMonomial > terms)
 
- Public Member Functions inherited from mlir::polynomial::PolynomialBase< FloatPolynomial, FloatMonomial >
 PolynomialBase ()=delete
 
 PolynomialBase (ArrayRef< FloatMonomial > terms)
 
 operator bool () const
 
bool operator== (const PolynomialBase &other) const
 
bool operator!= (const PolynomialBase &other) const
 
void print (raw_ostream &os, ::llvm::StringRef separator, ::llvm::StringRef exponentiation) const
 
void print (raw_ostream &os) const
 
FloatPolynomial add (const FloatPolynomial &other)
 
void dump () const
 
std::string toIdentifier () const
 
unsigned getDegree () const
 
ArrayRef< FloatMonomialgetTerms () const
 

Static Public Member Functions

static FailureOr< FloatPolynomialfromMonomials (ArrayRef< FloatMonomial > monomials)
 
static FloatPolynomial fromCoefficients (ArrayRef< double > coeffs)
 Returns a polynomial with coefficients given by coeffs. More...
 

Detailed Description

A single-variable polynomial with double coefficients.

Eg: 1.0 x^1024 + 3.5 x + 1e-05

Definition at line 245 of file Polynomial.h.

Constructor & Destructor Documentation

◆ FloatPolynomial()

mlir::polynomial::FloatPolynomial::FloatPolynomial ( ArrayRef< FloatMonomial terms)
inlineexplicit

Definition at line 247 of file Polynomial.h.

Member Function Documentation

◆ fromCoefficients()

FloatPolynomial mlir::polynomial::FloatPolynomial::fromCoefficients ( ArrayRef< double >  coeffs)
static

Returns a polynomial with coefficients given by coeffs.

The value coeffs[i] is converted to a monomial with exponent i.

Definition at line 63 of file Polynomial.cpp.

◆ fromMonomials()

FailureOr< FloatPolynomial > mlir::polynomial::FloatPolynomial::fromMonomials ( ArrayRef< FloatMonomial monomials)
static

Definition at line 40 of file Polynomial.cpp.


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