Drake
NaryFormulaCell Class Reference

Represents the base class for N-ary logic operators (∧ and ∨). More...

#include <drake/common/symbolic_formula_cell.h>

Inheritance diagram for NaryFormulaCell:
[legend]
Collaboration diagram for NaryFormulaCell:
[legend]

Public Member Functions

 NaryFormulaCell ()=delete
 Default constructor (deleted). More...
 
 NaryFormulaCell (NaryFormulaCell &&f)=default
 Move-construct a formula from an rvalue. More...
 
 NaryFormulaCell (const NaryFormulaCell &f)=default
 Copy-construct a formula from an lvalue. More...
 
NaryFormulaCelloperator= (NaryFormulaCell &&f)=delete
 Move-assign (DELETED). More...
 
NaryFormulaCelloperator= (const NaryFormulaCell &f)=delete
 Copy-assign (DELETED). More...
 
 NaryFormulaCell (FormulaKind k, const std::set< Formula > &formulas)
 Construct NaryFormulaCell of kind k with formulas. 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...
 
const std::set< Formula > & get_operands () const
 Returns the formulas. More...
 
- Public Member Functions inherited from FormulaCell
FormulaKind get_kind () const
 Returns kind of formula. More...
 
size_t get_hash () const
 Returns hash of formula. 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

std::ostream & DisplayWithOp (std::ostream &os, const std::string &op) const
 
- Protected Member Functions inherited from FormulaCell
 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 the base class for N-ary logic operators (∧ and ∨).

Note
Internally this class maintains a set of symbolic formulas to avoid duplicated elements (i.e. f1 ∧ ... ∧ f1).

Constructor & Destructor Documentation

NaryFormulaCell ( )
delete

Default constructor (deleted).

NaryFormulaCell ( NaryFormulaCell &&  f)
default

Move-construct a formula from an rvalue.

NaryFormulaCell ( const NaryFormulaCell f)
default

Copy-construct a formula from an lvalue.

NaryFormulaCell ( FormulaKind  k,
const std::set< Formula > &  formulas 
)

Construct NaryFormulaCell of kind k with formulas.

Member Function Documentation

ostream & DisplayWithOp ( std::ostream &  os,
const std::string &  op 
) const
protected

Here is the call graph for this function:

Here is the caller graph for this function:

bool EqualTo ( const FormulaCell c) const
overridevirtual

Checks structural equality.

Implements FormulaCell.

Here is the call graph for this function:

const std::set<Formula>& get_operands ( ) const
inline

Returns the formulas.

Here is the caller graph for this function:

Variables GetFreeVariables ( ) const
overridevirtual

Returns set of free variables in formula.

Implements FormulaCell.

Here is the call graph for this function:

bool Less ( const FormulaCell c) const
overridevirtual

Checks ordering.

Implements FormulaCell.

Here is the call graph for this function:

NaryFormulaCell& operator= ( NaryFormulaCell &&  f)
delete

Move-assign (DELETED).

NaryFormulaCell& operator= ( const NaryFormulaCell f)
delete

Copy-assign (DELETED).


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