BooleanNode Class Reference

#include <Node.h>

Inheritance diagram for BooleanNode:
Node

List of all members.

Public Member Functions

 BooleanNode ()
virtual bool evaluate (NodeList &nl, int t)
virtual void reset (void)
virtual string getType (void)
void mutate (int, int, string)
BooleanNodeaddDecision (string s)
BooleanNodeaddSource (int item)
void simplify (void)
void setH (void)
BooleanNodesetTarget (bool b)
 sets target to b and returns *this

Private Member Functions

int sourceSize ()
 returns the number of sources
int tableSize ()
 returns the size of the table

Private Attributes

Tree path
Tree mutTree
vector< int > sources
vector< int > table
bool target

Detailed Description

DESCRIPTION

A boolean node is a representation for the activity level of protiens within the simulation, they store their current state, their previous state and the other nodes wich it is dependant on.


Constructor & Destructor Documentation

BooleanNode::BooleanNode (  ) 

Boolean Node Constructor


Member Function Documentation

BooleanNode & BooleanNode::addDecision ( string  s  ) 

adds d to the decision table

BooleanNode & BooleanNode::addSource ( int  item  ) 

Adds a new parent node to sources

bool BooleanNode::evaluate ( NodeList nl,
int  t 
) [virtual]

Sets the value equal to the appropriate value based on the sources.

retreives the correct table in the form of an integer, builds the current state table in the form of an integer using bit shift operations and then compares the two to determine if the current state of the inputs mandates that this node be true.

Implements Node.

virtual string BooleanNode::getType ( void   )  [inline, virtual]

Implements Node.

void BooleanNode::mutate ( int  rate,
int  num,
string  rundir 
)
virtual void BooleanNode::reset ( void   )  [inline, virtual]

Implements Node.

void BooleanNode::setH ( void   )  [inline]
BooleanNode& BooleanNode::setTarget ( bool  b  )  [inline]

sets target to b and returns *this

void BooleanNode::simplify ( void   )  [inline]
int BooleanNode::sourceSize (  )  [inline, private]

returns the number of sources

int BooleanNode::tableSize (  )  [inline, private]

returns the size of the table


Member Data Documentation

vector<int> BooleanNode::sources [private]
vector<int> BooleanNode::table [private]
bool BooleanNode::target [private]

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

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