Cellular Automata CHEM274B Group Project
Contributor(s): Chongye Feng, Emmanuel Cortes, Trevor Oldham
|
A base CellularAutomata class that contains non-templated member variables and method definitions from which templated and specialized template classes can inherit. More...
#include <CAdatatypes.h>
Public Member Functions | |
BaseCellularAutomata () | |
Construct a new Cellular Automata:: Cellular Automata object. More... | |
virtual | ~BaseCellularAutomata () |
Destroy the Cellular Automata:: Cellular Automata object. More... | |
int | setup_neighborhood (CAEnums::Neighborhood neighborhood_type) |
Setup neighborhood with values from enum neighborhood. More... | |
int | setup_cell_states (int num_states) |
Defines the range of cell states to be used in the CA object. More... | |
int | setup_rule (CAEnums::Rule rule_type) |
Setup the rule choice to specify the rule type to be used in CA object. More... | |
void | print_error_status (CAEnums::ErrorCode error) |
Prints an error message for the given error code. More... | |
Public Attributes | |
CAEnums::Boundary | boundary_type |
enum code to hold boundary | |
int | boundary_radius |
declare a radius for the boundary | |
CAEnums::Neighborhood | neighborhood_type |
enum code to hold neighborhood type | |
int | num_states |
integer code for number of states | |
CAEnums::Rule | rule_type |
enum code for rule type | |
int | axis1_dim |
count of cells in first dimension | |
int | axis2_dim |
count of cells in second dimension | |
int | axis3_dim |
count of cells in third dimension | |
A base CellularAutomata class that contains non-templated member variables and method definitions from which templated and specialized template classes can inherit.
Default values:
boundary_type = CAEnums::Periodic
neighborhood_type = CAEnums::Moore
rule_type = CAEnums::Majority
BaseCellularAutomata::BaseCellularAutomata | ( | ) |
Construct a new Cellular Automata:: Cellular Automata object.
Sets the default value to all class attributes.
|
inlinevirtual |
Destroy the Cellular Automata:: Cellular Automata object.
Deallocates memory reserved for vector/matrix/tensor.
void BaseCellularAutomata::print_error_status | ( | CAEnums::ErrorCode | error | ) |
Prints an error message for the given error code.
error | ErrorCode enum type |
int BaseCellularAutomata::setup_cell_states | ( | int | num_states | ) |
Defines the range of cell states to be used in the CA object.
num_states | describes the range of numbers to use for cell states |
int BaseCellularAutomata::setup_neighborhood | ( | CAEnums::Neighborhood | neighborhood_type | ) |
Setup neighborhood with values from enum neighborhood.
neighborhood_type | enum value for neighborhood type (VonNeumann or Moore) |
int BaseCellularAutomata::setup_rule | ( | CAEnums::Rule | rule_type | ) |
Setup the rule choice to specify the rule type to be used in CA object.
rule_type | enum rule representing the rule type |