Drake
ExpressionAddFactory Class Reference

Detailed Description

Factory class to help build ExpressionAdd expressions.

#include <drake/common/symbolic_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...
 
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...
 
ExpressionAddFactoryoperator= (const ExpressionAdd &ptr)
 Assigns a factory from a an ExpressionAdd. More...
 
ExpressionAddFactoryNegate ()
 Negates the expressions in factory. More...
 
Expression GetExpression () const
 Returns a symbolic expression. More...
 
Implements CopyConstructible, CopyAssignable, MoveConstructible, MoveAssignable
 ExpressionAddFactory (const ExpressionAddFactory &)=default
 
ExpressionAddFactoryoperator= (const ExpressionAddFactory &)=default
 
 ExpressionAddFactory (ExpressionAddFactory &&)=default
 
ExpressionAddFactoryoperator= (ExpressionAddFactory &&)=default
 

Constructor & Destructor Documentation

◆ ExpressionAddFactory() [1/5]

◆ ExpressionAddFactory() [2/5]

◆ ExpressionAddFactory() [3/5]

ExpressionAddFactory ( )
default

Default constructor.

◆ ExpressionAddFactory() [4/5]

ExpressionAddFactory ( double  constant,
std::map< Expression, double >  expr_to_coeff_map 
)

Constructs ExpressionAddFactory with constant and expr_to_coeff_map.

◆ ExpressionAddFactory() [5/5]

ExpressionAddFactory ( const ExpressionAdd add)
explicit

Constructs ExpressionAddFactory from add.

Member Function Documentation

◆ Add()

void Add ( const ExpressionAdd add)

Adds ExpressionAdd pointed by ptr to this factory.

◆ AddExpression()

void AddExpression ( const Expression e)

Adds e to this factory.

◆ GetExpression()

Expression GetExpression ( ) const

Returns a symbolic expression.

◆ Negate()

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.

Returns
*this.

◆ operator=() [1/3]

ExpressionAddFactory& operator= ( ExpressionAddFactory &&  )
default

◆ operator=() [2/3]

ExpressionAddFactory& operator= ( const ExpressionAddFactory )
default

◆ operator=() [3/3]

ExpressionAddFactory& operator= ( const ExpressionAdd ptr)

Assigns a factory from a an ExpressionAdd.


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