hdf5Dims

C++ Class Reference

1 Overview

Structure for storing name strings.

2 Detailed Description

pdatasetPointer to the HDF5 dataset to manage dimensions forCreates a hidden group to store dimension information If dimension information already exists, it will be removed

3 Class Hierarchy

Class diagram

4 Inheritance

Inherits from:

  • BigDataStatMeth::hdf5Group

5 Public Interface

5.1 Methods

5.1.1 hdf5Dims()

BigDataStatMeth::hdf5Dims::hdf5Dims(BigDataStatMeth::hdf5Dataset *pdataset)

Constructs a dimension manager for an HDF5 dataset.

Parameters:

  • pdataset (BigDataStatMeth::hdf5Dataset *): Pointer to the HDF5 dataset to manage dimensions for

pdatasetPointer to the HDF5 dataset to manage dimensions forCreates a hidden group to store dimension information If dimension information already exists, it will be removed


5.1.2 writeDimnames()

void BigDataStatMeth::hdf5Dims::writeDimnames(Rcpp::StringVector rownames, Rcpp::StringVector colnames)

Writes dimension names to the HDF5 file.

Parameters:

  • rownames (Rcpp::StringVector): Vector of row names
  • colnames (Rcpp::StringVector): Vector of column names

rownamesVector of row names colnamesVector of column namesH5::FileIExceptionon file operation errors H5::DataSetIExceptionon dataset operation errors H5::GroupIExceptionon group operation errors H5::DataSpaceIExceptionon dataspace operation errors H5::DataTypeIExceptionon datatype operation errorsValidates dimensions against the main dataset Overwrites existing dimension names if they exist Performance considerations:Uses block-wise processing for large string vectorsImplements efficient string storage with fixed-length buffersHandles memory cleanup automatically


5.1.3 ~hdf5Dims()

virtual BigDataStatMeth::hdf5Dims::~hdf5Dims()

Virtual destructor.


6 Protected Members

6.1 Methods

6.1.1 close_datasets()

void BigDataStatMeth::hdf5Dims::close_datasets()

Closes all open datasets.


6.1.2 convert_DataFrame_to_RangeList()

names * BigDataStatMeth::hdf5Dims::convert_DataFrame_to_RangeList(Rcpp::RObject DatasetValues, std::string rowscols, bool bFullDataset)

Converts R data frame to HDF5-compatible range list.

Parameters:

  • DatasetValues (Rcpp::RObject): R object containing values to convert
  • rowscols (std::string): Identifier for row or column conversion
  • bFullDataset (bool): Flag indicating if full dataset conversion is needed

Returns: names* Pointer to array of converted names

DatasetValuesR object containing values to convert rowscolsIdentifier for row or column conversion bFullDatasetFlag indicating if full dataset conversion is needed names* Pointer to array of converted namesCaller is responsible for freeing returned memory


6.2 Attributes

6.2.1 pmaindataset

Type: BigDataStatMeth::hdf5Dataset *

Pointer to main dataset.


6.2.2 pdsrownames

Type: H5::DataSet *

Dataset for row names.


6.2.3 pdscolnames

Type: H5::DataSet *

Dataset for column names.


6.2.4 strrows

Type: std::string

Identifier for row names.


6.2.5 strcols

Type: std::string

Identifier for column names.


6.2.6 dimcolnames

Type: hsize_t

Dimensions for column names.


6.2.7 dimrownames

Type: hsize_t

Dimensions for row names.


7 Private Implementation

Note

Internal implementation details for advanced users and contributors.

7.1 Methods

7.1.1 writeStringVector()

void BigDataStatMeth::hdf5Dims::writeStringVector(H5::DataSet *dataset, std::string datasetname, Rcpp::StringVector DatasetValues)

Writes a string vector to an HDF5 dataset.

Parameters:

  • dataset (H5::DataSet *): Pointer to HDF5 dataset
  • datasetname (std::string): Name of the dataset
  • DatasetValues (Rcpp::StringVector): Vector of strings to write

datasetPointer to HDF5 dataset datasetnameName of the dataset DatasetValuesVector of strings to write Implementation details:Creates appropriate HDF5 datatype for stringsProcesses data in blocks for large vectorsHandles string truncation and null terminationManages memory efficiently


8 Usage Example

#include "hdf5Dims.hpp"

// Example usage
hdf5Dims obj;
// Your code here