55 #include <type_traits> 63 template<
int PolySize>
67 template<
int PolySize>
79 template<
int PolySize>
82 public VectorSpace<Polynomial<PolySize>, scalar, PolySize>
84 static_assert(PolySize > 0,
"Size must be positive (non-zero)");
111 explicit Polynomial(
const scalar coeffs[PolySize]);
137 scalar
value(
const scalar
x)
const;
143 scalar
integral(
const scalar x1,
const scalar x2)
const;
147 intPolyType
integral(
const scalar intConstant = 0.0)
const;
155 friend Ostream& operator<< <PolySize>
scalar logCoeff() const
Return the log coefficient.
Polynomial< PolySize+1 > intPolyType
Polynomial< PolySize > polyType
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Polynomial()
Construct null, with all coefficients = 0.0.
A class for handling words, derived from string.
scalar derivative(const scalar x) const
Return derivative of the polynomial at the given x.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
bool logActive() const
Return true if the log term is active.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
word name(const complex &)
Return a string representation of a complex.
Polynomial templated on size (order):
scalar value(const scalar x) const
Return polynomial value.
polyType integralMinus1(const scalar intConstant=0.0) const
Return integral coefficients when lowest order is -1.
scalar integral(const scalar x1, const scalar x2) const
Return integral between two values.