24 for (
size_t k = 0; k <
rank(); ++k) {
45 return (*
m_axes[k_axis])[axis_index];
50 std::vector<int> result(
rank());
51 for (
size_t k = 0; k <
rank(); ++k)
60 }
else if (
rank() == 2) {
84 for (
int k =
rank() - 1; k >= 0; --k) {
86 result += axes_indices[k] * step_size;
96 for (
size_t k = 0; k <
rank(); ++k)
106 for (
size_t k = 0; k <
rank(); ++k)
Defines the macro ASSERT.
#define ASSERT(condition)
Defines structs Bin1D, Bin1DCVector.
Defines and implements templated class Frame.
size_t projectedIndex(size_t i_flat, size_t k_axis) const
Returns axis bin index for given global index.
const IAxis & axis(size_t k_axis) const
Returns axis with given serial number.
size_t size() const
Returns total number of bins.
std::vector< int > allIndices(size_t i_flat) const
Returns vector of axes indices for given global index.
bool operator==(const Frame &) const
Returns true if both Frames have same rank, and all axes are equal.
OwningVector< IAxis > m_axes
size_t toGlobalIndex(const std::vector< unsigned > &axes_indices) const
Returns global index for specified indices of axes.
size_t projectedSize(size_t k_axis) const
Returns number of bins along axis.
Frame(const std::vector< IAxis * > &axes)
Constructor that takes ownership of supplied axes.
std::vector< IAxis * > cloned_axes() const
Returns cloned axes.
double projectedCoord(size_t i_flat, size_t k_axis) const
Returns the value of selected axis for given i_flat.
size_t rank() const
Returns number of dimensions.
bool hasSameSizes(const Frame &) const
Returns true if both Frames have same rank, and all axes have same sizes.
virtual size_t size() const =0
Returns the number of bins.
std::vector< T * > cloned_vector() const