| Project Malmo
    0.17.0
    | 
A map of int:double storing a value on each dimension, with an attached timestamp saying when it was collected. More...
#include <TimestampedReward.h>
| Public Member Functions | |
| TimestampedReward () | |
| Constructs an empty reward. | |
| TimestampedReward (float reward) | |
| Constructs from a single reward float (assumes default dimension of 0) | |
| TimestampedReward & | createFromXML (boost::posix_time::ptime timestamp, std::string xml_string) | 
| Constructs from an XML string. | |
| TimestampedReward & | createFromSimpleString (boost::posix_time::ptime timestamp, std::string simple_string) | 
| Constructs from a simple string. | |
| TimestampedReward (boost::posix_time::ptime timestamp, const schemas::Reward &reward) | |
| Constructs from an XML node element. | |
| void | setValuesFromRewardStructure (const schemas::Reward &reward) | 
| Sets the values stored in this reward to be those from the specified XML structure. | |
| std::string | getAsXML (bool prettyPrint) const | 
| Formats as an XML string.  More... | |
| std::string | getAsSimpleString () const | 
| Formats as a simple string.  More... | |
| bool | hasValueOnDimension (int dimension) const | 
| Returns whether a reward value is stored on the specified dimension. | |
| double | getValueOnDimension (int dimension) const | 
| Returns the reward value stored on the specified dimension. | |
| double | getValue () const | 
| Returns the reward value stored on dimension zero. By default the reward producers store their output here. | |
| void | add (const TimestampedReward &other) | 
| Merge the specified reward structure into this one, adding rewards that are on the same dimension. | |
| Public Attributes | |
| boost::posix_time::ptime | timestamp | 
| The timestamp. | |
| Friends | |
| std::ostream & | operator<< (std::ostream &os, const TimestampedReward &tsf) | 
| Stream a readable version, for casual inspection. | |
A map of int:double storing a value on each dimension, with an attached timestamp saying when it was collected.
| std::string malmo::TimestampedReward::getAsSimpleString | ( | ) | const | 
Formats as a simple string.
| std::string malmo::TimestampedReward::getAsXML | ( | bool | prettyPrint | ) | const | 
Formats as an XML string.
| prettyPrint | If true, add indentation and newlines to the XML to make it more readable. | 
 1.8.10
 1.8.10