Empirical
Public Member Functions | Protected Types | Protected Attributes | List of all members
emp::DataNodeModule< VAL_TYPE, data::Archive, MODS... > Class Template Reference

#include <DataNode.h>

Inheritance diagram for emp::DataNodeModule< VAL_TYPE, data::Archive, MODS... >:
emp::DataNodeModule< VAL_TYPE, MODS... >

Public Member Functions

 DataNodeModule ()
 
const auto & GetArchive () const
 
const emp::vector< VAL_TYPE > & GetData (size_t update) const
 Get a vector of all data that was added during the. More...
 
const emp::vector< VAL_TYPE > & GetData () const
 Get a vector of all data that has been added since the last reset. More...
 
size_t GetResetCount () const
 
void Reset ()
 
void PrintDebug (std::ostream &os=std::cout)
 Print debug information (useful for figuring out which modifiers you included) More...
 

Protected Types

using this_t = DataNodeModule< VAL_TYPE, data::Archive, MODS... >
 
using parent_t = DataNodeModule< VAL_TYPE, MODS... >
 
using base_t = DataNodeModule< VAL_TYPE >
 

Protected Attributes

emp::vector< emp::vector< VAL_TYPE > > archive
 Data archived from before most recent reset. More...
 

Detailed Description

template<typename VAL_TYPE, emp::data... MODS>
class emp::DataNodeModule< VAL_TYPE, data::Archive, MODS... >

== data::Archive == This module keeps track of historical values in addition to those added since the last re-set. Every time Reset() is called, all values that have been added since the previous time Reset() are stored in a vector in the archive.

Member Typedef Documentation

template<typename VAL_TYPE , emp::data... MODS>
using emp::DataNodeModule< VAL_TYPE, data::Archive, MODS... >::base_t = DataNodeModule<VAL_TYPE>
protected
template<typename VAL_TYPE , emp::data... MODS>
using emp::DataNodeModule< VAL_TYPE, data::Archive, MODS... >::parent_t = DataNodeModule<VAL_TYPE, MODS...>
protected
template<typename VAL_TYPE , emp::data... MODS>
using emp::DataNodeModule< VAL_TYPE, data::Archive, MODS... >::this_t = DataNodeModule<VAL_TYPE, data::Archive, MODS...>
protected

Constructor & Destructor Documentation

template<typename VAL_TYPE , emp::data... MODS>
emp::DataNodeModule< VAL_TYPE, data::Archive, MODS... >::DataNodeModule ( )
inline

Member Function Documentation

template<typename VAL_TYPE , emp::data... MODS>
const auto& emp::DataNodeModule< VAL_TYPE, data::Archive, MODS... >::GetArchive ( ) const
inline

Get all data ever added to this DataNode. Returns a vector of vectors; each vector contains all data from a single time point (interval between resets)

template<typename VAL_TYPE , emp::data... MODS>
const emp::vector<VAL_TYPE>& emp::DataNodeModule< VAL_TYPE, data::Archive, MODS... >::GetData ( size_t  update) const
inline

Get a vector of all data that was added during the.

Parameters
update'th interval between resets.
template<typename VAL_TYPE , emp::data... MODS>
const emp::vector<VAL_TYPE>& emp::DataNodeModule< VAL_TYPE, data::Archive, MODS... >::GetData ( ) const
inline

Get a vector of all data that has been added since the last reset.

template<typename VAL_TYPE , emp::data... MODS>
size_t emp::DataNodeModule< VAL_TYPE, data::Archive, MODS... >::GetResetCount ( ) const
inline

Get the number of time intervals recorded in this DataNode. Note that this is one more than the number of times it has been reset

template<typename VAL_TYPE , emp::data... MODS>
void emp::DataNodeModule< VAL_TYPE, data::Archive, MODS... >::PrintDebug ( std::ostream &  os = std::cout)
inline

Print debug information (useful for figuring out which modifiers you included)

template<typename VAL_TYPE , emp::data... MODS>
void emp::DataNodeModule< VAL_TYPE, data::Archive, MODS... >::Reset ( )
inline

Reset this DataNode, starting a new grouping of values in the archive. Resetting is useful for tracking data from different time points, such as per update or generation.

Member Data Documentation

template<typename VAL_TYPE , emp::data... MODS>
emp::vector<emp::vector<VAL_TYPE> > emp::DataNodeModule< VAL_TYPE, data::Archive, MODS... >::archive
protected

Data archived from before most recent reset.


The documentation for this class was generated from the following file: