IO< DataFrame< K, math::InMemoryTimeVaryingVolumetricGrid< T, V, P > > > Struct Template Reference
Traits for IO of data frames comprised of time varying volumetric grids. More...
#include <DataFrame.hh>
Static Public Member Functions | |
static DataFrame< K, math::InMemoryTimeVaryingVolumetricGrid< T, V, P > > | ReadFrom (CSVIStreamIterator _begin, CSVIStreamIterator _end, const size_t &_timeColumnIndex=0, const std::array< size_t, 3 > &_spatialColumnIndices={1, 2, 3}) |
Read data frame from CSV data stream. | |
static DataFrame< K, math::InMemoryTimeVaryingVolumetricGrid< T, V, P > > | ReadFrom (CSVIStreamIterator _begin, CSVIStreamIterator _end, const std::string &_timeColumnName, const std::array< std::string, 3 > &_spatialColumnNames) |
Read data frame from CSV data stream. | |
Detailed Description
template<typename K, typename T, typename V, typename P>
struct gz::common::IO< DataFrame< K, math::InMemoryTimeVaryingVolumetricGrid< T, V, P > > >
struct gz::common::IO< DataFrame< K, math::InMemoryTimeVaryingVolumetricGrid< T, V, P > > >
Traits for IO of data frames comprised of time varying volumetric grids.
- Template Parameters
-
K Data frame key type. T Time coordinate type. V Grid value type. P Spatial dimensions type.
Member Function Documentation
◆ ReadFrom() [1/2]
template<typename K , typename T , typename V , typename P >
|
inlinestatic |
Read data frame from CSV data stream.
- Parameters
-
[in] _begin Beginning-of-stream iterator to CSV data stream. [in] _end End-of-stream iterator to CSV data stream. [in] _timeColumnIndex CSV data column index to use as time dimension. [in] _spatialColumnIndices CSV data columns indices to use as spatial (x, y, z) dimensions, in that order.
- Exceptions
-
std::invalid_argument if the CSV data stream is empty, or if the CSV data stream has no header, or if the given columns cannot be found in the CSV data stream header.
- Returns
- data frame read.
◆ ReadFrom() [2/2]
template<typename K , typename T , typename V , typename P >
|
inlinestatic |
Read data frame from CSV data stream.
- Parameters
-
[in] _begin Beginning-of-stream iterator to CSV data stream. [in] _end End-of-stream iterator to CSV data stream. [in] _timeColumnName CSV data column name to use as time dimension. [in] _spatialColumnNames CSV data columns' names to use as spatial (x, y, z) dimensions, in that order.
- Exceptions
-
std::invalid_argument if the CSV data stream is empty, or if the CSV data stream has no header, or if the given columns cannot be found in the CSV data stream header.
- Returns
- data frame read.
References vector< T >::begin(), vector< T >::empty(), vector< T >::end(), std::find(), IO< T >::ReadFrom(), array< T >::size(), and stringstream::str().
The documentation for this struct was generated from the following file: