Drake
Drake C++ Documentation
Loading...
Searching...
No Matches
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.
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.
virtual Variables GetFreeVariables () const =0
 Returns set of free variables in formula.
virtual bool EqualTo (const FormulaCell &c) const =0
 Checks structural equality.
virtual bool Less (const FormulaCell &c) const =0
 Checks ordering.
virtual bool Evaluate (const Environment &env) const =0
 Evaluates under a given environment.
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.
virtual std::ostream & Display (std::ostream &os) const =0
 Outputs string representation of formula into output stream os.
 FormulaCell ()=delete
 Default constructor (deleted).
FormulaCelloperator= (FormulaCell &&f)=delete
 Move-assign (deleted).
FormulaCelloperator= (const FormulaCell &f)=delete
 Copy-assign (deleted).

Protected Member Functions

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

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 FormulaAnd, FormulaEq, FormulaFalse, FormulaForall, FormulaGeq, FormulaGt, FormulaIsnan, FormulaLeq, FormulaLt, FormulaNeq, FormulaNot, FormulaOr, FormulaPositiveSemidefinite, FormulaTrue, and FormulaVar.

◆ EqualTo()

virtual bool EqualTo ( const FormulaCell & c) const
nodiscardpure virtual

◆ Evaluate()

virtual bool Evaluate ( const Environment & env) const
nodiscardpure virtual

◆ get_kind()

FormulaKind get_kind ( ) const
nodiscard

Returns kind of formula.

◆ GetFreeVariables()

virtual Variables GetFreeVariables ( ) const
nodiscardpure 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 FormulaFalse, FormulaForall, FormulaIsnan, FormulaNot, FormulaPositiveSemidefinite, FormulaTrue, FormulaVar, NaryFormulaCell, and RelationalFormulaCell.

◆ Less()

virtual bool Less ( const FormulaCell & c) const
nodiscardpure virtual

◆ operator=() [1/2]

FormulaCell & operator= ( const FormulaCell & f)
delete

Copy-assign (deleted).

◆ operator=() [2/2]

FormulaCell & operator= ( FormulaCell && f)
delete

Move-assign (deleted).

◆ Substitute()

virtual Formula Substitute ( const Substitution & s) const
nodiscardpure 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 FormulaAnd, FormulaEq, FormulaFalse, FormulaForall, FormulaGeq, FormulaGt, FormulaIsnan, FormulaLeq, FormulaLt, FormulaNeq, FormulaNot, FormulaOr, FormulaPositiveSemidefinite, FormulaTrue, and FormulaVar.


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