GaCaRules Class Reference

#include <CaDesigner.h>

Inheritance diagram for GaCaRules:

Inheritance graph
[legend]

List of all members.


Detailed Description

ICaRules implementation which can be easily used by GAlib.

Attention:
This class does not adhere to the CA_CYCLIC_NEIGHBORHOOD compile-time option. It might be subject to implement if we really need it.

Definition at line 180 of file CaDesigner.h.


Public Member Functions

 GaCaRules (const std::string &)
 simple deserialization from string
 GaCaRules (size_t size, const GABinaryString &bs)
 Create ICaRules object from binary string (GAlib genome).
virtual ~GaCaRules ()
virtual GaCaRulesclone () const
virtual void getRuleAtPos (Pos, TRule5N &) const
 Return the rule at given position.
size_t size () const
 Return CA's size on one direction.
bool operator[] (unsigned index) const
 Return bit's value at given index.

Protected Member Functions

 GaCaRules ()
 GaCaRules (const GaCaRules &)

Private Attributes

Private * d

Constructor & Destructor Documentation

GaCaRules ( const std::string &  str  ) 

simple deserialization from string

Definition at line 85 of file CaDesigner.cpp.

References d, and RULE_WIDTH.

GaCaRules ( size_t  size,
const GABinaryString &  bs 
)

Create ICaRules object from binary string (GAlib genome).

Parameters:
size CA's size in one direction.
bs GAlib binary string to initialize by.

Definition at line 104 of file CaDesigner.cpp.

References d.

~GaCaRules (  )  [virtual]

Definition at line 118 of file CaDesigner.cpp.

References d.

GaCaRules (  )  [protected]

Definition at line 79 of file CaDesigner.cpp.

Referenced by clone().

Here is the caller graph for this function:

GaCaRules ( const GaCaRules other  )  [protected]

Definition at line 111 of file CaDesigner.cpp.

References d.


Member Function Documentation

GaCaRules * clone (  )  const [virtual]

Implements ICaRules.

Definition at line 122 of file CaDesigner.cpp.

References GaCaRules().

Here is the call graph for this function:

void getRuleAtPos ( Pos  pos,
TRule5N rule 
) const [virtual]

Return the rule at given position.

Parameters:
pos Position to read the rule from.
rule Destination to write the rule to.

Implements ICaRules.

Definition at line 126 of file CaDesigner.cpp.

References d, Pos::row, and RULE_WIDTH.

Referenced by writeRules().

Here is the caller graph for this function:

size_t size (  )  const

Return CA's size on one direction.

Definition at line 136 of file CaDesigner.cpp.

References d.

Referenced by main(), and operator<<().

Here is the caller graph for this function:

bool operator[] ( unsigned  index  )  const

Return bit's value at given index.

Parameters:
index Index of bit to retrieve.

Definition at line 140 of file CaDesigner.cpp.

References d.


Member Data Documentation

Private* d [private]

Definition at line 213 of file CaDesigner.h.

Referenced by GaCaRules(), getRuleAtPos(), operator[](), size(), and ~GaCaRules().


The documentation for this class was generated from the following files:
Generated on Sat May 2 16:39:39 2009 for nucad by  doxygen 1.5.4