|
| TrigPoly () |
| Constructs a vacuous TrigPoly. More...
|
|
| TrigPoly (const CoefficientType &scalar) |
| Constructs a constant TrigPoly. More...
|
|
| TrigPoly (const PolyType &p, const SinCosMap &_sin_cos_map) |
| Constructs a TrigPoly on the associated Polynomial p, but with the additional information about sin and cos relations in _sin_cos_map. More...
|
|
| TrigPoly (const PolyType &q, const PolyType &s, const PolyType &c) |
| Constructs a TrigPoly version of q, but with the additional information that the variables s and c represent the sine and cosine of q. More...
|
|
const PolyType & | getPolynomial (void) const |
| Returns the underlying Polynomial for this TrigPoly. More...
|
|
const SinCosMap & | getSinCosMap (void) const |
| Returns the SinCosMap for this TrigPoly. More...
|
|
std::set< VarType > | getVariables () const |
| Returns all of the base (non-sin/cos) variables in this TrigPoly. More...
|
|
template<typename T > |
Product< CoefficientType, T >::type | evaluateMultivariate (const std::map< VarType, T > &var_values) const |
| Given a value for every variable in this expression, evaluates it. More...
|
|
virtual TrigPoly< CoefficientType > | evaluatePartial (const std::map< VarType, CoefficientType > &var_values) const |
| Partially evaluates this expression, returning the resulting expression. More...
|
|
bool | operator== (const TrigPoly &other) const |
| Compares two TrigPolys for equality. More...
|
|
TrigPoly & | operator+= (const TrigPoly &other) |
|
TrigPoly & | operator-= (const TrigPoly &other) |
|
TrigPoly & | operator*= (const TrigPoly &other) |
|
TrigPoly & | operator+= (const CoefficientType &scalar) |
|
TrigPoly & | operator-= (const CoefficientType &scalar) |
|
TrigPoly & | operator*= (const CoefficientType &scalar) |
|
TrigPoly & | operator/= (const CoefficientType &scalar) |
|
const TrigPoly | operator+ (const TrigPoly &other) const |
|
const TrigPoly | operator- (const TrigPoly &other) const |
|
const TrigPoly | operator- () const |
|
const TrigPoly | operator* (const TrigPoly &other) const |
|
const TrigPoly | operator/ (const CoefficientType &scalar) const |
|
template<typename _CoefficientType = double>
class TrigPoly< _CoefficientType >
A scalar multi-variate polynomial containing sines and cosines.
TrigPoly represents a Polynomial some of whose variables actually represent the sines or cosines of other variables. Sines and cosines of first-order polynomials (affine combinations of variables) are decomposed into polynomials of the sines and cosines of individual variables via the Prosthaphaeresis formulae.
Any variables which will appear in the arguments to trigonometric functions must be declared in the "SinCosMap" (created automatically by most TrigPoly constructors); attempting to, e.g., use sin(x) without first creating a SinCosMap mapping for 'x' will result in an exception.
The same variable may not appear more than once in the sin_cos_map, regardless of position.
For example:
NOTE: Certain analyses may not succeed when individual Monomials contain both x and sin(x) or cos(x) terms. This restriction is not currently enforced programmatically; TODO(ggould-tri) fix this in the future.
bool operator== |
( |
const TrigPoly< _CoefficientType > & |
other | ) |
const |
|
inline |
Compares two TrigPolys for equality.
Note that the question of equality of TrigPolys is a bit subtle. It is not immediately clear if two TrigPolys whose poly and sin_cos_map members differ equivalently (eg, a + b (b = cos(a)) and a + c (c = cos(a))) should be considered equal.
For simplicity we only consider exactly equality rather than semantic equivalence. However that decision could reasonably revisited in the future.