get_HDF5_colSds

C++ Function Reference

1 Signature

Eigen::VectorXd BigDataStatMeth::get_HDF5_colSds(BigDataStatMeth::hdf5Dataset *dsA, bool bparal, Rcpp::Nullable< int > wsize, Rcpp::Nullable< int > threads)

2 Description

Column standard deviations of an HDF5 matrix (block-wise, parallel).

3 Parameters

  • dsA (BigDataStatMeth::hdf5Dataset *): Open HDF5 dataset.
  • bparal (bool): Enable OpenMP parallelism.
  • wsize (Rcpp::Nullable< int >): Block size (NULL = auto).
  • threads (Rcpp::Nullable< int >): Thread count (NULL = auto).

4 Returns

Vector of length ncols_R.

5 Details

Equivalent to apply(X, 2, sd) — uses Bessel’s correction (n-1).

6 Call Graph

Function dependencies

7 Source Code

File: inst/include/hdf5Algebra/matrixAggregations.hppLines 480-491

inline Eigen::VectorXd get_HDF5_colSds(BigDataStatMeth::hdf5Dataset* dsA,
                                        bool bparal,
                                        Rcpp::Nullable<int> wsize,
                                        Rcpp::Nullable<int> threads)
{
    try {
        return get_HDF5_colVars(dsA, bparal, wsize, threads).array().sqrt();
    } catch (std::exception& e) {
        throw std::runtime_error(std::string("c++ exception get_HDF5_colSds: ")
                                 + e.what());
    }
}

8 Usage Example

#include "BigDataStatMeth.hpp"

// Example usage
auto result = get_HDF5_colSds(...);