-
Notifications
You must be signed in to change notification settings - Fork 24
DataMap
A DataMap is used to collect data about some object. The data is stored in a map, that is an unordered list of key-value pairs. Data can be added to and removed from the DataMap. The values in data maps can be bool, int, double or string. DataMaps also include functions to save their contents to files.
###Usage Set(), Get() and, Append() methods write values into and read values from a data Map.
- Set(key,value) - set a value in a data map associated with key.
- Append(key,value) - add a value to a list of values associated with key.
- setOutputBehavior(key, outputBehavior) - define how data associated with key will be saved to file when saveToFile() is called. outputBehavior options are: LIST, AVE, FIRST (more will be implimented in the future). If more then one output behavior is needed, list them sperated with '|' (e.g. setOutputBehavior("score", DataMap::AVE | DataMap::LIST) )
- GetBoolVector(key),GetIntVector(key),GetDoubleVector(key),GetStringVector(key) - get a vector of the given type associated with key.
- GetStringOfVector(key) - convert the values associated key to a string
- GetAverage(key) - retuns a double, which is the average of the values associated with key. If key is associated with string values, this will result in an error message.
- Clear(key) - clear entry for key from a dataMap
- ClearMap() - clear all elements from dataMap
- fieldExists(key) - return true if this key is in map
- writeToFile(fileName, keys, aveOnly) - save the contents of this DataMap to file 'fileName'. If keys are provided (a vector of string) then only write these keys data. If aveOnly (bool, default false), than only save average values (not lists, etc.)
- Merge(otherDataMap, replace) - merge contents of two data maps - if common keys are found, replace 1 = overwrite, replace 0 (default) = append.
home
welcome
MABE Parameter Widget
Installation and quick start
license
citations
release notes
developer contributions
consistency testing
Using MABE
Using Settings Files
Output Files
Creating Graphs with python
MABE framework
Defining Update
Brains
Markov Brain
Neuron Gate
Wire Brain
Human Brain
ConstantValues Brain
CGP Brain
Genetic Programing Brain
Artificial Neural Networks
Brains Structure and Connectome
Genomes
Circular Genome
Multi Genome
Genome Handlers
Genome Value Conversions
Organisms
Groups
Archivists
popFileColumns
Optimizers
Lexicase Optimizer
Worlds
Berry World
ComplexiPhi World
MultiThreadTemplate World
Utilities
DataMap
Parameters
Parameters Name Space
Adding Parameters to Code
ParametersTable
MTree
sequence function
Population Loading
PythonTools
MBuild
MGraph
MQ
findRelatedness
generatePhylogeny
Information Theory Tools
Brain States and Life Times
TimeSeries
Entropy Functions
Smearing
Fragmentation
State to State
Brain Infomation Tools
ProcessingTools