Generator Class Reference
#include <Generator.h>
List of all members.
Public Member Functions |
| | Generator (void) |
| | Generator Constructor.
|
| | ~Generator (void) |
| | Generator Destructor.
|
| void | cchain (const string &, const string &, const bool &, const bool &) |
| void | egen (const string &, const string &, const bool &) |
| void | cchainToTables (const string &, const string &) |
| void | set_tablesPath (const string &) |
| void | printNodesList (string &, string &, string &) |
| string | get_tablesPath () |
Private Member Functions |
| int | getWord (FILE *, char *, int &, string &, char, bool) |
| int | find_id (const string &) |
| string | find_name (const int &) |
| void | print_gnodes (void) |
| void | show_tables (void) |
| bool | read_gnodes (const string &) |
| bool | read_tables (const bool &) |
| void | err_exit (void) |
| vector< string > | get_states (GNode &, const bool &) |
| string | get_function (GNode &) |
| bool | is_gnode (const string &) |
| int | num_1 (GNode &) |
| int | num_lines (void) |
| int | num_0 (GNode &) |
| void | decToBin (int, string &) |
Private Attributes |
| list< GNode > | gnodes |
| string | tablesPath |
| list< Input > | control_inputs |
Friends |
| class | GNode |
Detailed Description
Generator is a utility that converts input files for ChemChains
Constructor & Destructor Documentation
| Generator::Generator |
( |
void |
|
) |
[inline] |
| Generator::~Generator |
( |
void |
|
) |
[inline] |
Member Function Documentation
| void Generator::cchain |
( |
const string & |
in, |
|
|
const string & |
out, |
|
|
const bool & |
rand_init, |
|
|
const bool & |
rand_fc | |
|
) |
| | |
Mode to create input file for ChemChain
| void Generator::cchainToTables |
( |
const string & |
in, |
|
|
const string & |
out | |
|
) |
| | |
Creates csv logic tables based on the network information in the infile
| void Generator::decToBin |
( |
int |
dec, |
|
|
string & |
bin | |
|
) |
| | [private] |
Converts decimal to binary
| void Generator::egen |
( |
const string & |
in, |
|
|
const string & |
out, |
|
|
const bool & |
rand_fc | |
|
) |
| | |
Mode to generate a file with logic for the eq. generator
| void Generator::err_exit |
( |
void |
|
) |
[private] |
| int Generator::find_id |
( |
const string & |
name |
) |
[private] |
returns the id of node name
| string Generator::find_name |
( |
const int & |
|
) |
[private] |
| string Generator::get_function |
( |
GNode & |
n |
) |
[private] |
Retrieves the logic of a node
| vector< string > Generator::get_states |
( |
GNode & |
n, |
|
|
const bool & |
val | |
|
) |
| | [private] |
Gets states of a node when the function = 1 or 0
| string Generator::get_tablesPath |
( |
|
) |
|
| int Generator::getWord |
( |
FILE * |
in, |
|
|
char * |
buf, |
|
|
int & |
index, |
|
|
string & |
str, |
|
|
char |
tok, |
|
|
bool |
alphaOnly | |
|
) |
| | [private] |
| bool Generator::is_gnode |
( |
const string & |
name |
) |
[private] |
Returns true if there is a Gnode name
| int Generator::num_0 |
( |
GNode & |
n |
) |
[private] |
counts the number of 0's in a node
| int Generator::num_1 |
( |
GNode & |
n |
) |
[private] |
Counts the number of 1's in a node
| int Generator::num_lines |
( |
void |
|
) |
[private] |
Counts the number of lines of overall logic
| void Generator::print_gnodes |
( |
void |
|
) |
[private] |
| void Generator::printNodesList |
( |
string & |
specs, |
|
|
string & |
logic, |
|
|
string & |
out | |
|
) |
| | |
This function takes in network specs and logic and creates a list of nodes
| bool Generator::read_gnodes |
( |
const string & |
in_file |
) |
[private] |
Read in the list of nodes from the input file
| bool Generator::read_tables |
( |
const bool & |
rand_fc |
) |
[private] |
Read in the truth tables for each node
| void Generator::set_tablesPath |
( |
const string & |
path |
) |
|
set tablesPath equal to path
| void Generator::show_tables |
( |
void |
|
) |
[private] |
Friends And Related Function Documentation
friend class GNode [friend] |
Member Data Documentation
The documentation for this class was generated from the following files: