Drake
Drake C++ Documentation
Loading...
Searching...
No Matches
NaryFormulaCell Class Reference

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).

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

Public Member Functions

 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.
NaryFormulaCelloperator= (NaryFormulaCell &&f)=delete
 Move-assign (DELETED).
NaryFormulaCelloperator= (const NaryFormulaCell &f)=delete
 Copy-assign (DELETED).
 NaryFormulaCell (FormulaKind k, std::set< Formula > formulas)
 Construct NaryFormulaCell of kind k with formulas.
 ~NaryFormulaCell () 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.
Variables GetFreeVariables () const override
 Returns set of free variables in formula.
bool EqualTo (const FormulaCell &f) const override
 Checks structural equality.
bool Less (const FormulaCell &f) const override
 Checks ordering.
const std::set< Formula > & get_operands () const
 Returns the formulas.
Public Member Functions inherited from FormulaCell
FormulaKind get_kind () const
 Returns kind of formula.
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

std::ostream & DisplayWithOp (std::ostream &os, const std::string &op) const
Protected Member Functions inherited from FormulaCell
 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

◆ NaryFormulaCell() [1/4]

NaryFormulaCell ( )
delete

Default constructor (deleted).

◆ NaryFormulaCell() [2/4]

Move-construct a formula from an rvalue.

◆ NaryFormulaCell() [3/4]

NaryFormulaCell ( const NaryFormulaCell & f)
default

Copy-construct a formula from an lvalue.

◆ NaryFormulaCell() [4/4]

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

Construct NaryFormulaCell of kind k with formulas.

◆ ~NaryFormulaCell()

~NaryFormulaCell ( )
override

Member Function Documentation

◆ DisplayWithOp()

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

◆ EqualTo()

bool EqualTo ( const FormulaCell & c) const
nodiscardoverridevirtual

Checks structural equality.

Implements FormulaCell.

◆ get_operands()

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

Returns the formulas.

◆ GetFreeVariables()

Variables GetFreeVariables ( ) const
nodiscardoverridevirtual

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
nodiscardoverridevirtual

Checks ordering.

Implements FormulaCell.

◆ operator=() [1/2]

NaryFormulaCell & operator= ( const NaryFormulaCell & f)
delete

Copy-assign (DELETED).

◆ operator=() [2/2]

NaryFormulaCell & operator= ( NaryFormulaCell && f)
delete

Move-assign (DELETED).


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