VDS Class Project
Loading...
Searching...
No Matches
Classes | Public Member Functions | Public Attributes | List of all members
ClassProject::Manager Class Reference

#include <Manager.h>

Inheritance diagram for ClassProject::Manager:
ClassProject::ManagerInterface

Classes

struct  KeyHash
 Unique_Table_Entry Defines a structure to be used as a value in the hash map. More...
 
struct  Node
 
struct  Unique_Table_Key
 Unique_Table_Key Defines a structure to be used as a key in the hash map. More...
 

Public Member Functions

 Manager ()
 
BDD_ID createVar (const std::string &label) override
 createVar
 
const BDD_IDTrue () override
 True.
 
const BDD_IDFalse () override
 False.
 
bool isConstant (BDD_ID f) override
 isConstant
 
bool isVariable (BDD_ID x) override
 isVariable
 
BDD_ID topVar (BDD_ID f) override
 topVar
 
std::string getTopVarName (const BDD_ID &root) override
 getTopVarName
 
BDD_ID coFactorTrue (BDD_ID f, BDD_ID x) override
 
BDD_ID coFactorFalse (BDD_ID f, BDD_ID x) override
 
BDD_ID coFactorTrue (BDD_ID f) override
 
BDD_ID coFactorFalse (BDD_ID f) override
 
BDD_ID ite (BDD_ID i, BDD_ID t, BDD_ID e) override
 
void findNodes (const BDD_ID &root, std::set< BDD_ID > &nodes_of_root) override
 
void findVars (const BDD_ID &root, std::set< BDD_ID > &vars_of_root) override
 
size_t uniqueTableSize () override
 
BDD_ID neg (BDD_ID a) override
 neg
 
BDD_ID and2 (BDD_ID a, BDD_ID b) override
 and2
 
BDD_ID or2 (BDD_ID a, BDD_ID b) override
 or2
 
BDD_ID xor2 (BDD_ID a, BDD_ID b) override
 xor2
 
BDD_ID nand2 (BDD_ID a, BDD_ID b) override
 nand2
 
BDD_ID nor2 (BDD_ID a, BDD_ID b) override
 nor2
 
BDD_ID xnor2 (BDD_ID a, BDD_ID b) override
 xnor2
 
void visualizeBDD (std::string filepath, BDD_ID &root) override
 

Public Attributes

std::unordered_map< Unique_Table_Key, BDD_ID, KeyHashTable
 
std::vector< Nodeid_table
 
std::unordered_map< Unique_Table_Key, BDD_ID, KeyHashcomputed_table
 

Constructor & Destructor Documentation

◆ Manager()

ClassProject::Manager::Manager ( )

Member Function Documentation

◆ and2()

BDD_ID ClassProject::Manager::and2 ( BDD_ID a,
BDD_ID b )
overridevirtual

and2

returns the id numbers required for the ite operation

Parameters
aand b: ID's of variables
Returns
returns the id numbers required for the ite operation

Implements ClassProject::ManagerInterface.

◆ coFactorFalse() [1/2]

BDD_ID ClassProject::Manager::coFactorFalse ( BDD_ID f)
overridevirtual

◆ coFactorFalse() [2/2]

BDD_ID ClassProject::Manager::coFactorFalse ( BDD_ID f,
BDD_ID x )
overridevirtual

◆ coFactorTrue() [1/2]

BDD_ID ClassProject::Manager::coFactorTrue ( BDD_ID f)
overridevirtual

◆ coFactorTrue() [2/2]

BDD_ID ClassProject::Manager::coFactorTrue ( BDD_ID f,
BDD_ID x )
overridevirtual

◆ createVar()

BDD_ID ClassProject::Manager::createVar ( const std::string & label)
overridevirtual

createVar

Creates a new variable with the given ID.

Parameters
labelString of the label of the variable.
Returns
returns the ID of the created variable.

Implements ClassProject::ManagerInterface.

◆ False()

const BDD_ID & ClassProject::Manager::False ( )
overridevirtual

False.

Returns the id of the False node

Returns
const BDD_ID&

Implements ClassProject::ManagerInterface.

◆ findNodes()

void ClassProject::Manager::findNodes ( const BDD_ID & root,
std::set< BDD_ID > & nodes_of_root )
overridevirtual

◆ findVars()

void ClassProject::Manager::findVars ( const BDD_ID & root,
std::set< BDD_ID > & vars_of_root )
overridevirtual

◆ getTopVarName()

std::string ClassProject::Manager::getTopVarName ( const BDD_ID & root)
overridevirtual

getTopVarName

returns the name of the top variable of the given node.

Parameters
rootID of the node.
Returns
returns the name of the top variable.

Implements ClassProject::ManagerInterface.

◆ isConstant()

bool ClassProject::Manager::isConstant ( BDD_ID f)
overridevirtual

isConstant

Returns true if the node is a leaf node.

Parameters
fID of the node.
Returns
returns true if the node is a leaf node.

Implements ClassProject::ManagerInterface.

◆ isVariable()

bool ClassProject::Manager::isVariable ( BDD_ID x)
overridevirtual

isVariable

checks whether the item corresponding to a given ID is a variable or not.

Parameters
xID of the node.
Returns
returns true if the ID represents a variable.

Implements ClassProject::ManagerInterface.

◆ ite()

BDD_ID ClassProject::Manager::ite ( BDD_ID i,
BDD_ID t,
BDD_ID e )
overridevirtual

◆ nand2()

BDD_ID ClassProject::Manager::nand2 ( BDD_ID a,
BDD_ID b )
overridevirtual

nand2

returns the id numbers required for the ite operation

Parameters
aand b: ID's of variables
Returns
returns the id numbers required for the ite operation

Implements ClassProject::ManagerInterface.

◆ neg()

BDD_ID ClassProject::Manager::neg ( BDD_ID a)
overridevirtual

neg

Creates a negated version of a given function and returns its ID.

Parameters
aID of the function to be negated.
Returns
: Returns the ID representing the negation of the given function.

Implements ClassProject::ManagerInterface.

◆ nor2()

BDD_ID ClassProject::Manager::nor2 ( BDD_ID a,
BDD_ID b )
overridevirtual

nor2

returns the id numbers required for the ite operation

Parameters
aand b: ID's of variables
Returns
returns the id numbers required for the ite operation

Implements ClassProject::ManagerInterface.

◆ or2()

BDD_ID ClassProject::Manager::or2 ( BDD_ID a,
BDD_ID b )
overridevirtual

or2

returns the id numbers required for the ite operation

Parameters
aand b: ID's of variables
Returns
returns the id numbers required for the ite operation

Implements ClassProject::ManagerInterface.

◆ topVar()

BDD_ID ClassProject::Manager::topVar ( BDD_ID f)
overridevirtual

topVar

returns the top variable ID of the given node.

Parameters
fID of the node.
Returns
returns the ID of the top variable.

Implements ClassProject::ManagerInterface.

◆ True()

const BDD_ID & ClassProject::Manager::True ( )
overridevirtual

True.

Returns the id of the True node

Returns
const BDD_ID&

Implements ClassProject::ManagerInterface.

◆ uniqueTableSize()

size_t ClassProject::Manager::uniqueTableSize ( )
overridevirtual

◆ visualizeBDD()

void ClassProject::Manager::visualizeBDD ( std::string filepath,
BDD_ID & root )
overridevirtual

◆ xnor2()

BDD_ID ClassProject::Manager::xnor2 ( BDD_ID a,
BDD_ID b )
overridevirtual

xnor2

returns the id numbers required for the ite operation

Parameters
aand b: ID's of variables
Returns
returns the id numbers required for the ite operation

Implements ClassProject::ManagerInterface.

◆ xor2()

BDD_ID ClassProject::Manager::xor2 ( BDD_ID a,
BDD_ID b )
overridevirtual

xor2

returns the id numbers required for the ite operation

Parameters
aand b: ID's of variables
Returns
returns the id numbers required for the ite operation

Implements ClassProject::ManagerInterface.

Member Data Documentation

◆ computed_table

std::unordered_map<Unique_Table_Key,BDD_ID,KeyHash> ClassProject::Manager::computed_table

◆ id_table

std::vector<Node> ClassProject::Manager::id_table

◆ Table

std::unordered_map<Unique_Table_Key, BDD_ID, KeyHash> ClassProject::Manager::Table

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