11 #include "eckit/exception/Exceptions.h"
17 dataArray_(blockSize, numColumns),
18 numColumns_(numColumns),
36 Eigen::Index numElementsPerSet,
39 if (std::find_if(indices.begin(), indices.end(),
40 [](
const auto x){ return x < 1; }) != indices.end())
42 throw eckit::BadParameter(
"All channel numbers must be >= 1.");
46 unsigned int colIdx = 0;
47 for (
auto col : indices)
49 unsigned int offset = elementPos + numElementsPerSet * (col - 1);
void addRow(std::vector< FloatType > &newRow)
Add row of data to the internal data structure.
BufrAccumulator(Eigen::Index numColumns, Eigen::Index blockSize=50000)
Eigen::Index numColumns_
Total number of columns (width of data structure)
IngesterArray dataArray_
Eigen Array that holds the accumulated data.
IngesterArray getData(Eigen::Index elementPos, Eigen::Index numElementsPerSet, const Channels &indices={1})
Get an Eigen Array that contains a slice of the collected data.
Eigen::Index blockSize_
Amount to allocate when we need to extend the Eigen Array.
Eigen::Index numDataRows_
Number of data rows of collected data.
Eigen::Array< FloatType, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > IngesterArray
std::set< size_t > Channels