Datasets#
#include "navground/sim/dataset.h"
- Dynamic homogeneous multi-dimensional numerical data stored in - std::vector. Used to record data collected during an ExperimentalRun.- Public Types - The data type 
 - The data container type 
 - The shape type 
 - The indices type 
 - Public Functions - Configure this dataset to accumulate data from a buffer. - Parameters:
- buffer – [in] The buffer 
 
 - Returns the shape of the multi-dimensional dataset. - Returns:
- The shape 
 
 - Returns the total number of stored items. - Returns:
- The size 
 
 - Gets the shape of all axis except the first. - Returns:
- The shape. 
 
 - Sets the shape of all axis except the first. - Parameters:
- item_shape – [in] The desired shape 
 
 - Determines if valid. - Returns:
- True if the number of items fill the shape exactly, False otherwise. 
 
 - Clear all data. 
 - Sets the type of data. - Will clear the data if the type is different than the current. - Template Parameters:
- T – The desired numerical type. 
 
 - Add an item. - The item will be implicitly converted to the current data type, see set_dtype. - Parameters:
- value – [in] The value to add 
- Template Parameters:
- T – The type of the item. Must be convertible to the current data type. 
 
 - Add an item. - The item will be implicitly converted to the current data type, see set_dtype. - Parameters:
- value – [in] The value to add 
 
 - Add items. - The items will be implicitly converted to the current data type, see set_dtype. - Parameters:
- values – [in] The values to add 
- Template Parameters:
- T – The type of the items. Must be convertible to the current data type. 
 
 - Add items. - The items will be implicitly converted to the current data type, see set_dtype. - Parameters:
- values – [in] The values to add 
- Template Parameters:
- T – The type of the items. Must be convertible to the current data type. 
 
 - Add items. - The items will be implicitly converted to the current data type, see set_dtype. - Parameters:
- values – [in] The values to add 
 
 - Add items. - The items will be implicitly converted to the current data type, see set_dtype. - Parameters:
- buffer – [in] The buffer with the values to add 
 
 - Gets the stored data. - Returns:
- The data. 
 
 - Sets the stored data. - Parameters:
- data – [in] The data. 
 
 - Gets the stored data. - Template Parameters:
- T – The desired type. 
- Returns:
- A pointer to the stored data or null if data has a different type than - T.
 
 - Return a tensor view of the dataset. - Template Parameters:
- T – The desired type. 
- N – The number of dimensions 
 
- Returns:
- An eigen tensor with the same shape and type as the dataset 
 
 - Writes a buffer with the content of one dataset entry. - Parameters:
- buffer – The buffer 
- index – [in] The index of the entry 
 
- Returns:
- True if writing was successful. 
 
 - Copy one dataset entry to a new buffer. - Parameters:
- index – [in] The index of the entry. Set to -1 to add all entries. 
- Returns:
- The buffer