DiaDes  0.1
DIAgnosis of Discrete-Event System
Public Types | Public Member Functions | Private Attributes | List of all members
Diades::Sdmdl::FormulaFactory::CubeNode Class Reference

Public Types

typedef CubeNodePointer
 

Public Member Functions

 CubeNode (FormulaFactory &factory)
 
 ~CubeNode ()
 
void destroy ()
 
void newCubeNode (unsigned i)
 
void setAssignment (const Formula &assignment)
 
void setValue (const Value &value)
 
const FormulagetAssignment ()
 
const ValuegetValue ()
 
Pointer chain (const vector< int > &cube, unsigned lower, unsigned upper)
 
Pointer child (unsigned i)
 
bool validChild (unsigned i) const
 
void print (unsigned level) const
 

Private Attributes

vector< Pointer_children
 
FormulaVector _assignment
 
ValueVector _value
 
FormulaFactory_factory
 

Detailed Description

Private class of FormulaFactory that encodes a container that associates a cube to the corresponding encoded assignment of a Variable in the factory. Used mostly by extractAssignments

Definition at line 519 of file Formula.hh.

Member Typedef Documentation

◆ Pointer

Definition at line 521 of file Formula.hh.

Constructor & Destructor Documentation

◆ CubeNode()

Diades::Sdmdl::FormulaFactory::CubeNode::CubeNode ( FormulaFactory factory)
inline

constructor

Definition at line 549 of file Formula.hh.

◆ ~CubeNode()

Diades::Sdmdl::FormulaFactory::CubeNode::~CubeNode ( )
inline

destructor

Definition at line 556 of file Formula.hh.

Member Function Documentation

◆ chain()

Pointer Diades::Sdmdl::FormulaFactory::CubeNode::chain ( const vector< int > &  cube,
unsigned  lower,
unsigned  upper 
)
Parameters
cubea cube (normal meaning)
lowerthe lower index in the cube
upperthe upper index in the cube (index after the last element to deal with
Returns
the CubeNode associated to the cube cube[lower...upper-1]
Note
recursive function

◆ child()

Pointer Diades::Sdmdl::FormulaFactory::CubeNode::child ( unsigned  i)
inline
Parameters
iindex of the child
Returns
the child of index i, nullptr if not exist

Definition at line 641 of file Formula.hh.

◆ destroy()

void Diades::Sdmdl::FormulaFactory::CubeNode::destroy ( )

Destrution method

◆ getAssignment()

const Formula& Diades::Sdmdl::FormulaFactory::CubeNode::getAssignment ( )
inline
Returns
the assignment

Definition at line 601 of file Formula.hh.

References Diades::Sdmdl::FormulaFactory::nullFormula().

◆ getValue()

const Value& Diades::Sdmdl::FormulaFactory::CubeNode::getValue ( )
inline
Returns
the value

Definition at line 614 of file Formula.hh.

References Diades::Sdmdl::FormulaFactory::nullValue().

◆ newCubeNode()

void Diades::Sdmdl::FormulaFactory::CubeNode::newCubeNode ( unsigned  i)

Node creation

Parameters
ithe child number (0,1 or 2)

◆ print()

void Diades::Sdmdl::FormulaFactory::CubeNode::print ( unsigned  level) const

Print the current cuddNode (debug only)

Parameters
levelindentation level

◆ setAssignment()

void Diades::Sdmdl::FormulaFactory::CubeNode::setAssignment ( const Formula assignment)
inline

Set assignment of a leaf node

Parameters
assignmentthe assignment Formula

Definition at line 580 of file Formula.hh.

◆ setValue()

void Diades::Sdmdl::FormulaFactory::CubeNode::setValue ( const Value value)
inline

Set value of a leaf node

Parameters
Valuethe assigned Value

Definition at line 590 of file Formula.hh.

◆ validChild()

bool Diades::Sdmdl::FormulaFactory::CubeNode::validChild ( unsigned  i) const
inline
Parameters
iindex of the child
Returns
true if the child i exists

Definition at line 654 of file Formula.hh.

Member Data Documentation

◆ _assignment

FormulaVector Diades::Sdmdl::FormulaFactory::CubeNode::_assignment
private

_assignment the assignment associated to the node. Empty if not a leaf node.

Definition at line 531 of file Formula.hh.

◆ _children

vector<Pointer> Diades::Sdmdl::FormulaFactory::CubeNode::_children
private

_children the set of children (child 0 child 1 child 2 if they exist)

Definition at line 527 of file Formula.hh.

◆ _factory

FormulaFactory& Diades::Sdmdl::FormulaFactory::CubeNode::_factory
private

_factory the FormulaFactory that owns this CubeNode

Definition at line 541 of file Formula.hh.

◆ _value

ValueVector Diades::Sdmdl::FormulaFactory::CubeNode::_value
private

_assignment the Value associated to the node. Empty if not a leaf node.

Definition at line 536 of file Formula.hh.


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