Drake
FormulaCell Class Referenceabstract

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

#include <drake/common/symbolic_formula_cell.h>

Inheritance diagram for FormulaCell:
[legend]

Public Member Functions

FormulaKind get_kind () const
 Returns kind of formula. More...
 
size_t get_hash () const
 Returns hash of formula. 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...
 

Protected Member Functions

 FormulaCell ()=delete
 Default constructor (deleted). More...
 
 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...
 
FormulaCelloperator= (FormulaCell &&f)=delete
 Move-assign (DELETED). More...
 
FormulaCelloperator= (const FormulaCell &f)=delete
 Copy-assign (DELETED). More...
 
 FormulaCell (FormulaKind k, size_t hash)
 Construct FormulaCell of kind k with hash. More...
 
virtual ~FormulaCell ()=default
 Default destructor. More...
 

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.

Constructor & Destructor Documentation

FormulaCell ( )
protecteddelete

Default constructor (deleted).

Here is the caller graph for this function:

FormulaCell ( FormulaCell &&  f)
protecteddefault

Move-construct a formula from an rvalue.

FormulaCell ( const FormulaCell f)
protecteddefault

Copy-construct a formula from an lvalue.

FormulaCell ( FormulaKind  k,
size_t  hash 
)
protected

Construct FormulaCell of kind k with hash.

Here is the call graph for this function:

virtual ~FormulaCell ( )
protectedvirtualdefault

Default destructor.

Here is the caller graph for this function:

Member Function Documentation

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.

Here is the caller graph for this function:

virtual bool EqualTo ( const FormulaCell c) const
pure virtual

Checks structural equality.

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

Here is the caller graph for this function:

virtual bool Evaluate ( const Environment env) const
pure virtual

Evaluates under a given environment.

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

Here is the caller graph for this function:

size_t get_hash ( ) const
inline

Returns hash of formula.

Here is the call graph for this function:

FormulaKind get_kind ( ) const
inline

Returns kind of formula.

Here is the caller graph for this function:

virtual Variables GetFreeVariables ( ) const
pure virtual

Returns set of free variables in formula.

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

Here is the caller graph for this function:

virtual bool Less ( const FormulaCell c) const
pure virtual

Checks ordering.

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

Here is the caller graph for this function:

FormulaCell& operator= ( FormulaCell &&  f)
protecteddelete

Move-assign (DELETED).

Here is the caller graph for this function:

FormulaCell& operator= ( const FormulaCell f)
protecteddelete

Copy-assign (DELETED).

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.

Here is the caller graph for this function:


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