Drake
Drake C++ Documentation
FormulaCell Class Referenceabstract

Detailed Description

Represents an abstract class which is the base of concrete symbolic-formula classes (i.e.

symbolic::FormulaAnd, symbolic::FormulaEq).

Note
It provides virtual function, FormulaCell::Display, because operator<< is not allowed to be a virtual function.

#include <drake/common/symbolic/expression/formula_cell.h>

Public Member Functions

FormulaKind get_kind () const
 Returns kind of formula. More...
 
virtual void HashAppendDetail (DelegatingHasher *) const =0
 Sends all hash-relevant bytes for this FormulaCell type into the given hasher, per the hash_append generic hashing concept – except for get_kind(), because Formula already sends that. More...
 
virtual Variables GetFreeVariables () const =0
 Returns set of free variables in formula. More...
 
virtual bool EqualTo (const FormulaCell &c) const =0
 Checks structural equality. More...
 
virtual bool Less (const FormulaCell &c) const =0
 Checks ordering. More...
 
virtual bool Evaluate (const Environment &env) const =0
 Evaluates under a given environment. More...
 
virtual Formula Substitute (const Substitution &s) const =0
 Returns a Formula obtained by replacing all occurrences of the variables in s in the current formula cell with the corresponding expressions in s. More...
 
virtual std::ostream & Display (std::ostream &os) const =0
 Outputs string representation of formula into output stream os. More...
 
 FormulaCell ()=delete
 Default constructor (deleted). More...
 
FormulaCelloperator= (FormulaCell &&f)=delete
 Move-assign (deleted). More...
 
FormulaCelloperator= (const FormulaCell &f)=delete
 Copy-assign (deleted). More...
 

Protected Member Functions

 FormulaCell (FormulaCell &&f)=default
 Move-construct a formula from an rvalue. More...
 
 FormulaCell (const FormulaCell &f)=default
 Copy-construct a formula from an lvalue. More...
 
 FormulaCell (FormulaKind k)
 Construct FormulaCell of kind k. More...
 
virtual ~FormulaCell ()
 Default destructor. More...
 

Constructor & Destructor Documentation

◆ FormulaCell() [1/4]

FormulaCell ( )
delete

Default constructor (deleted).

◆ FormulaCell() [2/4]

FormulaCell ( FormulaCell &&  f)
protecteddefault

Move-construct a formula from an rvalue.

◆ FormulaCell() [3/4]

FormulaCell ( const FormulaCell f)
protecteddefault

Copy-construct a formula from an lvalue.

◆ FormulaCell() [4/4]

FormulaCell ( FormulaKind  k)
explicitprotected

Construct FormulaCell of kind k.

◆ ~FormulaCell()

virtual ~FormulaCell ( )
protectedvirtual

Default destructor.

Member Function Documentation

◆ Display()

virtual std::ostream& Display ( std::ostream &  os) const
pure virtual

Outputs string representation of formula into output stream os.

Implemented in FormulaPositiveSemidefinite, FormulaIsnan, FormulaForall, FormulaNot, FormulaOr, FormulaAnd, FormulaLeq, FormulaLt, FormulaGeq, FormulaGt, FormulaNeq, FormulaEq, FormulaVar, FormulaFalse, and FormulaTrue.

◆ EqualTo()

virtual bool EqualTo ( const FormulaCell c) const
pure virtual

◆ Evaluate()

virtual bool Evaluate ( const Environment env) const
pure virtual

◆ get_kind()

FormulaKind get_kind ( ) const

Returns kind of formula.

◆ GetFreeVariables()

virtual Variables GetFreeVariables ( ) const
pure virtual

◆ HashAppendDetail()

virtual void HashAppendDetail ( DelegatingHasher ) const
pure virtual

Sends all hash-relevant bytes for this FormulaCell type into the given hasher, per the hash_append generic hashing concept – except for get_kind(), because Formula already sends that.

Implemented in FormulaPositiveSemidefinite, FormulaIsnan, FormulaForall, FormulaNot, FormulaVar, FormulaFalse, FormulaTrue, NaryFormulaCell, and RelationalFormulaCell.

◆ Less()

virtual bool Less ( const FormulaCell c) const
pure virtual

◆ operator=() [1/2]

FormulaCell& operator= ( FormulaCell &&  f)
delete

Move-assign (deleted).

◆ operator=() [2/2]

FormulaCell& operator= ( const FormulaCell f)
delete

Copy-assign (deleted).

◆ Substitute()

virtual Formula Substitute ( const Substitution s) const
pure virtual

Returns a Formula obtained by replacing all occurrences of the variables in s in the current formula cell with the corresponding expressions in s.

Implemented in FormulaPositiveSemidefinite, FormulaIsnan, FormulaForall, FormulaNot, FormulaOr, FormulaAnd, FormulaLeq, FormulaLt, FormulaGeq, FormulaGt, FormulaNeq, FormulaEq, FormulaVar, FormulaFalse, and FormulaTrue.


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