In-Memory Linear Algebra

1 Overview

In-memory linear algebra operations (crossproduct, block multiplication, pseudoinverse, correlation). These bd* functions operate on standard R matrices.

2 Functions

2.1 bdpseudoinv

Computes the Moore-Penrose pseudoinverse of a matrix using SVD decomposition. This implementation handles both square and rectangular matrices, and provides numerically stable results even for singular or near-singular matrices.

2.2 bdpseudoinv_hdf5

Computes the Moore-Penrose pseudoinverse of a matrix stored in HDF5 format. The implementation is designed for large matrices, using block-based processing and efficient I/O operations.

2.3 bdblockMult

Performs efficient matrix multiplication using block-based algorithms. The function supports various input combinations (matrix-matrix, matrix-vector, vector-vector) and provides options for parallel processing and block-based computation.

2.4 bdblockSubstract

Performs efficient matrix subtraction using block-based algorithms. The function supports various input combinations (matrix-matrix, matrix-vector, vector-vector) and provides options for parallel processing and block-based computation.

2.5 bdblockSum

Performs efficient matrix addition using block-based algorithms. The function supports various input combinations (matrix-matrix, matrix-vector, vector-vector) and provides options for parallel processing and block-based computation.

2.6 bdCorr_matrix

Compute Pearson or Spearman correlation matrix for matrices that fit in memory. This function automatically detects whether to compute:

2.7 bdCrossprod

Computes matrix cross-products efficiently using block-based algorithms and optional parallel processing. Supports both single-matrix (X’X) and two-matrix (X’Y) cross-products.

2.8 bdScalarwproduct

Multiplies a numeric matrix by a scalar weight , returning . The input must be a base R numeric matrix (or convertible to one).

2.9 bdtCrossprod

Computes matrix transposed cross-products efficiently using block-based algorithms and optional parallel processing. Supports both single-matrix (XX’) and two-matrix (XY’) transposed cross-products.

2.10 bd_wproduct

Compute weighted operations using a diagonal weight from : Inputs may be base numeric matrices .