Learn R Programming

BigDataStatMeth (version 1.0.3)

bdDiag_add_hdf5: Add Diagonal Elements from HDF5 Matrices or Vectors

Description

Performs optimized diagonal addition between two datasets stored in HDF5 format. Automatically detects whether inputs are matrices (extracts diagonals) or vectors (direct operation) and uses the most efficient approach.

Usage

bdDiag_add_hdf5(
  filename,
  group,
  A,
  B,
  groupB = NULL,
  target = NULL,
  outgroup = NULL,
  outdataset = NULL,
  paral = NULL,
  threads = NULL,
  overwrite = NULL
)

Value

List with components:

fn

Character string with the HDF5 filename

ds

Character string with the full dataset path to the diagonal addition result (group/dataset)

Arguments

filename

String. Path to the HDF5 file containing the datasets.

group

String. Group path containing the first dataset (A).

A

String. Name of the first dataset (matrix or vector).

B

String. Name of the second dataset (matrix or vector).

groupB

Optional string. Group path containing dataset B.

target

Optional string. Where to write result: "A", "B", or "new" (default: "new").

outgroup

Optional string. Output group path (only used if target="new").

outdataset

Optional string. Output dataset name (only used if target="new").

paral

Optional logical. Whether to use parallel processing.

threads

Optional integer. Number of threads for parallel processing.

overwrite

Optional logical. Whether to overwrite existing datasets.