Factory class to help build ExpressionAdd expressions.
#include <drake/common/symbolic/expression/expression_cell.h>
Public Member Functions | |
ExpressionAddFactory ()=default | |
Default constructor. More... | |
ExpressionAddFactory (double constant, std::map< Expression, double > expr_to_coeff_map) | |
Constructs ExpressionAddFactory with constant and expr_to_coeff_map . More... | |
ExpressionAddFactory (const ExpressionAdd &add) | |
Constructs ExpressionAddFactory from add . More... | |
~ExpressionAddFactory () | |
void | AddExpression (const Expression &e) |
Adds e to this factory. More... | |
void | Add (const ExpressionAdd &add) |
Adds ExpressionAdd pointed by ptr to this factory. More... | |
ExpressionAddFactory & | operator= (const ExpressionAdd &ptr) |
Assigns a factory from a an ExpressionAdd. More... | |
ExpressionAddFactory && | Negate () && |
Negates the expressions in factory. More... | |
Expression | GetExpression () && |
Returns a symbolic expression. More... | |
Implements CopyConstructible, CopyAssignable, MoveConstructible, MoveAssignable | |
ExpressionAddFactory (const ExpressionAddFactory &)=default | |
ExpressionAddFactory & | operator= (const ExpressionAddFactory &)=default |
ExpressionAddFactory (ExpressionAddFactory &&)=default | |
ExpressionAddFactory & | operator= (ExpressionAddFactory &&)=default |
|
default |
|
default |
|
default |
Default constructor.
ExpressionAddFactory | ( | double | constant, |
std::map< Expression, double > | expr_to_coeff_map | ||
) |
Constructs ExpressionAddFactory with constant
and expr_to_coeff_map
.
|
explicit |
Constructs ExpressionAddFactory from add
.
~ExpressionAddFactory | ( | ) |
void Add | ( | const ExpressionAdd & | add | ) |
Adds ExpressionAdd pointed by ptr
to this factory.
void AddExpression | ( | const Expression & | e | ) |
Adds e
to this factory.
Expression GetExpression | ( | ) | && |
Returns a symbolic expression.
ExpressionAddFactory&& Negate | ( | ) | && |
Negates the expressions in factory.
If it represents c0 + c1 * t1 + ... + * cn * tn, this method flips it into -c0 - c1 * t1 - ... - cn * tn.
|
default |
|
default |
ExpressionAddFactory& operator= | ( | const ExpressionAdd & | ptr | ) |
Assigns a factory from a an ExpressionAdd.