Factory class to help build ExpressionMul expressions.
#include <drake/common/symbolic/expression/expression_cell.h>
Public Member Functions | |
ExpressionMulFactory ()=default | |
Default constructor. More... | |
ExpressionMulFactory (double constant, std::map< Expression, Expression > base_to_exponent_map) | |
Constructs ExpressionMulFactory with constant and Expression-valued base_to_exponent_map . More... | |
ExpressionMulFactory (const std::map< Variable, int > &base_to_exponent_map) | |
Constructs ExpressionMulFactory with a Monomial-like (Variable to integer power) base_to_exponent_map . More... | |
ExpressionMulFactory (const ExpressionMul &mul) | |
Constructs ExpressionMulFactory from mul . More... | |
~ExpressionMulFactory () | |
void | AddExpression (const Expression &e) |
Adds e to this factory. More... | |
void | Add (const ExpressionMul &ptr) |
Adds ExpressionMul pointed by ptr to this factory. More... | |
ExpressionMulFactory & | operator= (const ExpressionMul &ptr) |
Assigns a factory from an ExpressionMul. More... | |
ExpressionMulFactory && | Negate () && |
Negates the expressions in factory. More... | |
Expression | GetExpression () && |
Returns a symbolic expression. More... | |
Implements CopyConstructible, CopyAssignable, MoveConstructible, MoveAssignable | |
ExpressionMulFactory (const ExpressionMulFactory &)=default | |
ExpressionMulFactory & | operator= (const ExpressionMulFactory &)=default |
ExpressionMulFactory (ExpressionMulFactory &&)=default | |
ExpressionMulFactory & | operator= (ExpressionMulFactory &&)=default |
|
default |
|
default |
|
default |
Default constructor.
ExpressionMulFactory | ( | double | constant, |
std::map< Expression, Expression > | base_to_exponent_map | ||
) |
Constructs ExpressionMulFactory with constant
and Expression-valued base_to_exponent_map
.
Note that this constructor runs in constant-time because it moves the map into storage; it does not loop over the map.
|
explicit |
Constructs ExpressionMulFactory with a Monomial-like (Variable to integer power) base_to_exponent_map
.
|
explicit |
Constructs ExpressionMulFactory from mul
.
~ExpressionMulFactory | ( | ) |
void Add | ( | const ExpressionMul & | ptr | ) |
Adds ExpressionMul pointed by ptr
to this factory.
void AddExpression | ( | const Expression & | e | ) |
Adds e
to this factory.
Expression GetExpression | ( | ) | && |
Returns a symbolic expression.
ExpressionMulFactory&& Negate | ( | ) | && |
Negates the expressions in factory.
If it represents c0 * p1 * ... * pn, this method flips it into -c0 * p1 * ... * pn.
|
default |
|
default |
ExpressionMulFactory& operator= | ( | const ExpressionMul & | ptr | ) |
Assigns a factory from an ExpressionMul.