NodeList Class Reference

#include <NodeList.h>

List of all members.

Public Member Functions

 NodeList ()
void visPrint (ostream &out, NodeList &nl)
void bitsPrint (NodeList &nl)
int find (string n)
int add (NodeItem &i)
void reset (void)
void clear (void)
NodegetNode (int i)
 returns the i'th node on the array of nodes
NodeItemgetNodeItem (int i)
 returns the i'th node item on the array of node items
NodegetInputNode (int i)
 returns the i'th Input node
string getName (int i)
 returns the name of the i'th node on the nodelist
NodeListsetRunTime (int r)
 sets the runtime to r and returns *this
int getRunTime ()
 returns the runtime
string getRunName ()
 returns the name of the simulation
NodeListsetTransient (int r)
 sets transient to r and returns *this
int getTransient ()
 returns transient
NodeListsetWindow (int w)
 sets window to w and returns *this
NodeListsetScalar (int s)
 sets scalar to s and returns *this
int getWindow (void)
 returns window
int getScalar (void)
 returns scalar
int getNextAnalPt (void)
void sortAnalPts (void)
NodeListprintNames (ostream &out)
void printNodes (ostream &out)
void printInputs (ostream &out)
int inOutCalc (int)
void inOutInit (void)
int getNodeIndex (string)
int outCalcSize ()
 return the size of the ouput calculations
int getNumOfInputs ()
 returns the number of inputs
int outputSize ()
 returns the number of outputs
int ptsSize ()
 returns the number of analysis points
void printAnalPts (void)
void setMutants (void)
void setRunName (const string &str)
 sets runName to str
void setRunDir (const string &str)
string getRunDir (void)
bool readParams (istream &, InputNode &, bool, NodeList &nl)
void calcAvg (void)
void printAvg (ostream &)
void calcCurrAvg (void)
void printAvgSep (const string &)
void printDosages (ostream &)
void printBits (ostream &)
void printInputBits (ostream &)
void initBits (bool)
void initInputBits ()
void setNoisyInputs (void)
 set noisyInputs to true to allow for noise
bool isNoisyInputs (void)
 returns noisyInputs
void addAnalPt (const int &)
int nodeSize ()
 return the total number of nodes
int getNodeAvg (string, int)
void setOutputAll (bool b)
string getInputNames (int)
string getOutNames (int)
void setInputs (string, int)
int getOutLevels (int)
bool isBool (string)
void readBools (string)
void setSimnum (int i)
int getSimnum (void)

Public Attributes

vector< NodeItemoutputs
vector< NodeItemoutCalc
vector< int > inOutIndex
vector< float > avg
vector< vector< bool > > bits
vector< int > dosageRec
vector< int > analPts
vector< int > banalPts
int avgPeriod

Protected Member Functions

void addOutput (NodeItem &i)
void addInput (NodeItem &i)
void addOutCalc (NodeItem &i)
void addNode (NodeItem &i)
void addMutant (Mutant &)

Protected Attributes

vector< vector< bool > > inputBits
vector< Mutantmutants
vector< NodeItemnodes
vector< NodeIteminputs
int runTime
string RUNDIR
string runName
int transient
int window
int scalar
bool noisyInputs
bool outputAll
int simNumber

Friends

istream & operator>> (istream &in, NodeList &nl)

Detailed Description

DESCRIPTION

The Nodelist tracks and maintains the nodes within the network


Constructor & Destructor Documentation

NodeList::NodeList (  ) 

Constructor


Member Function Documentation

int NodeList::add ( NodeItem item  ) 

Locate a given node by name. If it exists, replace the node reference. Otherwise, add the item to the list.

void NodeList::addAnalPt ( const int &  item  ) 

Adds item to analPts

void NodeList::addInput ( NodeItem item  )  [protected]

Adds item to inputs

void NodeList::addMutant ( Mutant item  )  [protected]

Adds item to mutants

void NodeList::addNode ( NodeItem item  )  [protected]

adds item to nodes

void NodeList::addOutCalc ( NodeItem item  )  [protected]

Adds item to outCalc

void NodeList::addOutput ( NodeItem item  )  [protected]

Adds item to outputs

void NodeList::bitsPrint ( NodeList nl  ) 

Properly records bits for later use

void NodeList::calcAvg ( void   ) 

Calculate the average activity level for nodes for the last n iterations where n is the value of transient.

void NodeList::calcCurrAvg ( void   ) 

Calculates the average activity level of nodes based on the average period

void NodeList::clear ( void   ) 
int NodeList::find ( string  n  ) 

Locate a given node by name. If it does not exist, create a NodeItem to be filled in later.

string NodeList::getInputNames ( int  node  ) 
Node& NodeList::getInputNode ( int  i  )  [inline]

returns the i'th Input node

string NodeList::getName ( int  i  )  [inline]

returns the name of the i'th node on the nodelist

int NodeList::getNextAnalPt ( void   ) 

gets the next analysis point

Node& NodeList::getNode ( int  i  )  [inline]

returns the i'th node on the array of nodes

int NodeList::getNodeAvg ( string  node,
int  transient 
)

returns the recent average activity for 'node' for the last n iterations where n is the value of transient

int NodeList::getNodeIndex ( string  n  ) 

Returns the index number of node n

NodeItem& NodeList::getNodeItem ( int  i  )  [inline]

returns the i'th node item on the array of node items

int NodeList::getNumOfInputs (  )  [inline]

returns the number of inputs

int NodeList::getOutLevels ( int  j  ) 
string NodeList::getOutNames ( int  i  ) 
string NodeList::getRunDir ( void   )  [inline]
string NodeList::getRunName (  )  [inline]

returns the name of the simulation

int NodeList::getRunTime (  )  [inline]

returns the runtime

int NodeList::getScalar ( void   )  [inline]

returns scalar

int NodeList::getSimnum ( void   )  [inline]
int NodeList::getTransient (  )  [inline]

returns transient

int NodeList::getWindow ( void   )  [inline]

returns window

void NodeList::initBits ( bool  val  ) 

Initilizes the bit files

void NodeList::initInputBits (  ) 

Initializes the input bit files

int NodeList::inOutCalc ( int  i  ) 

Returns the index of the node with name n on the Outcalc array if that node is on the outcalc array, otherwise it returns -1

void NodeList::inOutInit ( void   ) 

initializes the in out array

bool NodeList::isBool ( string  s  ) 

returns true if s is a boolean node in the network

bool NodeList::isNoisyInputs ( void   )  [inline]

returns noisyInputs

int NodeList::nodeSize (  )  [inline]

return the total number of nodes

int NodeList::outCalcSize (  )  [inline]

return the size of the ouput calculations

int NodeList::outputSize (  )  [inline]

returns the number of outputs

void NodeList::printAnalPts ( void   ) 

Prints Analysis Points for output

void NodeList::printAvg ( ostream &  out  ) 

Prints the average activity levels to ostream out

void NodeList::printAvgSep ( const string &  path  ) 

Prints each node's average to an individual file in the directory path

void NodeList::printBits ( ostream &  out  ) 

Print bits by iterations -> 1 line = state of the system

void NodeList::printDosages ( ostream &  out  ) 

Prints the dosages to ostream out

void NodeList::printInputBits ( ostream &  out  ) 

Prints input node bits to ostream out

void NodeList::printInputs ( ostream &  out  ) 

Prints inputnodes to ostream out

NodeList & NodeList::printNames ( ostream &  out  ) 

Print all node names

void NodeList::printNodes ( ostream &  out  ) 

Prints nodes to ostream out

int NodeList::ptsSize (  )  [inline]

returns the number of analysis points

void NodeList::readBools ( string  inFile  ) 

Read boolean nodes from a file

bool NodeList::readParams ( istream &  ,
InputNode ,
bool  ,
NodeList nl 
)
void NodeList::reset ( void   ) 

Resets the network to the initial state

void NodeList::setInputs ( string  node,
int  level 
)
void NodeList::setMutants ( void   ) 

For every Mutant, find the matching node and set its Mut to the matching Mutant's type

void NodeList::setNoisyInputs ( void   )  [inline]

set noisyInputs to true to allow for noise

void NodeList::setOutputAll ( bool  b  )  [inline]
void NodeList::setRunDir ( const string &  str  )  [inline]
void NodeList::setRunName ( const string &  str  )  [inline]

sets runName to str

NodeList& NodeList::setRunTime ( int  r  )  [inline]

sets the runtime to r and returns *this

NodeList& NodeList::setScalar ( int  s  )  [inline]

sets scalar to s and returns *this

void NodeList::setSimnum ( int  i  )  [inline]
NodeList& NodeList::setTransient ( int  r  )  [inline]

sets transient to r and returns *this

NodeList& NodeList::setWindow ( int  w  )  [inline]

sets window to w and returns *this

void NodeList::sortAnalPts ( void   ) 

Sorts Analysis points

void NodeList::visPrint ( ostream &  out,
NodeList nl 
)

Prints required nodes to visout.


Friends And Related Function Documentation

istream& operator>> ( istream &  in,
NodeList nl 
) [friend]

Member Data Documentation

vector<int> NodeList::analPts
vector<float> NodeList::avg
vector<int> NodeList::banalPts
vector< vector<bool> > NodeList::bits
vector<int> NodeList::dosageRec
vector<int> NodeList::inOutIndex
vector< vector<bool> > NodeList::inputBits [protected]
vector<NodeItem> NodeList::inputs [protected]
vector<Mutant> NodeList::mutants [protected]
vector<NodeItem> NodeList::nodes [protected]
bool NodeList::noisyInputs [protected]
bool NodeList::outputAll [protected]
string NodeList::RUNDIR [protected]
string NodeList::runName [protected]
int NodeList::runTime [protected]
int NodeList::scalar [protected]
int NodeList::simNumber [protected]
int NodeList::transient [protected]
int NodeList::window [protected]

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

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