Drake
Drake C++ Documentation
FormulaVar Class Reference

Detailed Description

Symbolic formula representing a Boolean variable.

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

Public Member Functions

 FormulaVar (Variable v)
 Constructs a formula from var. More...
 
 ~FormulaVar () override
 
void HashAppendDetail (DelegatingHasher *) const override
 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...
 
Variables GetFreeVariables () const override
 Returns set of free variables in formula. More...
 
bool EqualTo (const FormulaCell &f) const override
 Checks structural equality. More...
 
bool Less (const FormulaCell &f) const override
 Checks ordering. More...
 
bool Evaluate (const Environment &env) const override
 Evaluates under a given environment. More...
 
Formula Substitute (const Substitution &subst) const override
 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...
 
std::ostream & Display (std::ostream &os) const override
 Outputs string representation of formula into output stream os. More...
 
const Variableget_variable () const
 
- Public Member Functions inherited from FormulaCell
FormulaKind get_kind () const
 Returns kind of formula. More...
 
 FormulaCell ()=delete
 Default constructor (deleted). More...
 
FormulaCelloperator= (FormulaCell &&f)=delete
 Move-assign (deleted). More...
 
FormulaCelloperator= (const FormulaCell &f)=delete
 Copy-assign (deleted). More...
 

Additional Inherited Members

- Protected Member Functions inherited from FormulaCell
 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

◆ FormulaVar()

FormulaVar ( Variable  v)
explicit

Constructs a formula from var.

Precondition
var is of BOOLEAN type.

◆ ~FormulaVar()

~FormulaVar ( )
override

Member Function Documentation

◆ Display()

std::ostream& Display ( std::ostream &  os) const
overridevirtual

Outputs string representation of formula into output stream os.

Implements FormulaCell.

◆ EqualTo()

bool EqualTo ( const FormulaCell c) const
overridevirtual

Checks structural equality.

Implements FormulaCell.

◆ Evaluate()

bool Evaluate ( const Environment env) const
overridevirtual

Evaluates under a given environment.

Implements FormulaCell.

◆ get_variable()

const Variable& get_variable ( ) const

◆ GetFreeVariables()

Variables GetFreeVariables ( ) const
overridevirtual

Returns set of free variables in formula.

Implements FormulaCell.

◆ HashAppendDetail()

void HashAppendDetail ( DelegatingHasher ) const
overridevirtual

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.

Implements FormulaCell.

◆ Less()

bool Less ( const FormulaCell c) const
overridevirtual

Checks ordering.

Implements FormulaCell.

◆ Substitute()

Formula Substitute ( const Substitution s) const
overridevirtual

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

Implements FormulaCell.


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