Class ibis::hyperslab for recording a HDF5 style hyperslab. More...
#include <bord.h>
Public Member Functions | |
hyperslab () | |
Default constructor. More... | |
hyperslab (unsigned, const uint64_t *, const uint64_t *, const uint64_t *, const uint64_t *) | |
Constructor. More... | |
void | tobitvector (uint32_t, const uint64_t *, ibis::bitvector &) const |
Convert to a bitvector. More... | |
Public Attributes | |
unsigned | ndim |
The number of dimensions of the mesh. More... | |
ibis::array_t< uint64_t > | vals |
An array of size 4*ndim with ndim quadruples of (start, stride, count, block). More... | |
Class ibis::hyperslab for recording a HDF5 style hyperslab.
It is a generic specification of subsets of coordinates on a regular mesh.
|
inline |
Default constructor.
By design, the unspecified dimensions are assumed to cover the whole extends of dimensions.
ibis::hyperslab::hyperslab | ( | unsigned | nd, |
const uint64_t * | start, | ||
const uint64_t * | stride, | ||
const uint64_t * | count, | ||
const uint64_t * | block | ||
) |
Constructor.
[in] | nd | number of dimensions specified for the hyperslab. |
[in] | start | starting positions of each dimension specified. If this pointer is nil, the default value is 0. |
[in] | stride? | stride of each dimension specified. If this pointer is nil, the default value is 1. |
[in] | count | the number of elements to be used in each dimension. If this pointer is nil, the default value is the maximum value of 64-bit unsigned integer, which implies that all points from start to the end of the dimensions are included in the hyperslab. If the count value is 0 for any dimension, then the hyperslab is empty (i.e., not selecting any values). |
[in] | block | the number of consecutive elements to be picked for the hyperlab in each stride. It specifies a value for each dimension when this pointer is not nil. If this pointer is nil, the default value is 1. If the block size in any dimension is 0, the byperslab select no elements and is called an empty hyperslab. |
void ibis::hyperslab::tobitvector | ( | uint32_t | , |
const uint64_t * | , | ||
ibis::bitvector & | |||
) | const |
Convert to a bitvector.
The argument mdim is the number of dimension of the full mesh, which must be at least as large as ndim of the hyperslab object. The argument dim is the full extend of the mesh dimensions. When the value of mdim is larger than the member variable ndim, the number of dimensions specified are assumed to the first ndim-dimensions of the mesh. The remaining dimensions are assumed to the faster varying dimension in the linearization order of the array.
References ibis::bitvector::adjustSize(), ibis::bitvector::appendFill(), and ibis::bitvector::clear().
unsigned ibis::hyperslab::ndim |
The number of dimensions of the mesh.
By default, ndim = 0, which indicates that everyone mesh point is selected.
ibis::array_t<uint64_t> ibis::hyperslab::vals |
An array of size 4*ndim with ndim quadruples of (start, stride, count, block).
These four elements are in the same order as specified in the command line for various HDF5 functions.