Empirical
|
Full information about the states available in a state grid and meanings of each state. More...
#include <StateGrid.h>
Classes | |
struct | StateInfo |
Information about what a particular state type means in a state grid. More... | |
Public Member Functions | |
StateGridInfo () | |
StateGridInfo (const StateGridInfo &)=default | |
StateGridInfo (StateGridInfo &&)=default | |
~StateGridInfo () | |
StateGridInfo & | operator= (const StateGridInfo &)=default |
StateGridInfo & | operator= (StateGridInfo &&)=default |
size_t | GetNumStates () const |
char | GetSymbol (int state_id) const |
double | GetScoreChange (int state_id) const |
const std::string & | GetName (int state_id) const |
const std::string & | GetDesc (int state_id) const |
int | GetState (char symbol) const |
int | GetState (const std::string &name) const |
void | AddState (int id, char symbol, double mult=1.0, std::string name="", std::string desc="") |
Protected Member Functions | |
size_t | GetKey (int state_id) const |
size_t | GetKey (char symbol) const |
size_t | GetKey (const std::string &name) const |
Protected Attributes | |
emp::vector< StateInfo > | states |
All available states. Position is key ID. More... | |
std::map< int, size_t > | state_map |
Map of state_id to key ID (state_id can be < 0) More... | |
std::map< char, size_t > | symbol_map |
Map of symbols to associated key ID. More... | |
std::map< std::string, size_t > | name_map |
Map of names to associated key ID. More... | |
Full information about the states available in a state grid and meanings of each state.
|
inline |
|
default |
|
default |
|
inline |
|
inline |
|
inline |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
default |
|
default |
|
protected |
Map of names to associated key ID.
|
protected |
Map of state_id to key ID (state_id can be < 0)
|
protected |
All available states. Position is key ID.
|
protected |
Map of symbols to associated key ID.