Ttable Class Reference

#include <Ttable.h>

List of all members.

Public Member Functions

 Ttable (const string &aname, const vector< string > &inNodes)
 Ttable constructor.
 ~Ttable ()
 Ttable destructor.
int getNumOfInputs (void)
 returns the number of inputs
int nrows (void)
 returns the number of rows
int ncols (void)
 returns the number of columns
string get_name (void)
vector< string > getInputs (void)
 returns the inputs
bool table_init (const int &)
void print_table (void)
void print_inputs (void)
int get_id (void)
 returns the node ID
int get_init (void)
 returns the initial value
void build (const int &, const vector< string > &)
void replaceInputs (const vector< string > &)
void decToBin (const int &, string &)
bool getVal (const int &, const int &)
void setVal (const int &, const int &, const bool &)

Private Attributes

int COLS
int ROWS
string nodeName
int nodeID
bool ** table
vector< string > inputs
bool initVal

Friends

class Mutator
ostream & operator<< (ostream &os, const Ttable &n)

Detailed Description

The Ttable class is used by the Mutator class in order to manipulate truth tables


Constructor & Destructor Documentation

Ttable::Ttable ( const string &  aname,
const vector< string > &  inNodes 
) [inline]

Ttable constructor.

Ttable::~Ttable (  )  [inline]

Ttable destructor.


Member Function Documentation

void Ttable::build ( const int &  init,
const vector< string > &  logic 
)

Comment to be written

void Ttable::decToBin ( const int &  dec,
string &  bin 
)

Converts a decimal to a binary

int Ttable::get_id ( void   )  [inline]

returns the node ID

int Ttable::get_init ( void   )  [inline]

returns the initial value

string Ttable::get_name ( void   )  [inline]
vector<string> Ttable::getInputs ( void   )  [inline]

returns the inputs

int Ttable::getNumOfInputs ( void   )  [inline]

returns the number of inputs

bool Ttable::getVal ( const int &  row,
const int &  col 
)

Returns the corresponding value from the table

int Ttable::ncols ( void   )  [inline]

returns the number of columns

int Ttable::nrows ( void   )  [inline]

returns the number of rows

void Ttable::print_inputs ( void   ) 

Prints out the inputs

void Ttable::print_table ( void   ) 

Prints out the table

void Ttable::replaceInputs ( const vector< string > &  ins  ) 

replaces inputs with ins

void Ttable::setVal ( const int &  row,
const int &  col,
const bool &  val 
)

Sets the appropriate section of the table to val

bool Ttable::table_init ( const int &  i  ) 

Comment to be written


Friends And Related Function Documentation

friend class Mutator [friend]
ostream& operator<< ( ostream &  os,
const Ttable n 
) [friend]

outputs information about a Ttable


Member Data Documentation

int Ttable::COLS [private]
bool Ttable::initVal [private]
vector<string> Ttable::inputs [private]
int Ttable::nodeID [private]
string Ttable::nodeName [private]
int Ttable::ROWS [private]
bool** Ttable::table [private]

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

Generated on Fri May 7 00:40:43 2010 for ChemChains by  doxygen 1.6.1