Skip to contents

Generic methods and built-in functions for IterableMatrix objects

Usage

matrix_type(x)

storage_order(x)

# S4 method for class 'IterableMatrix'
show(object)

# S4 method for class 'IterableMatrix'
t(x)

# S4 method for class 'IterableMatrix,matrix'
x %*% y

# S4 method for class 'IterableMatrix'
rowSums(x)

# S4 method for class 'IterableMatrix'
colSums(x)

# S4 method for class 'IterableMatrix'
rowMeans(x)

# S4 method for class 'IterableMatrix'
colMeans(x)

colVars(
  x,
  rows = NULL,
  cols = NULL,
  na.rm = FALSE,
  center = NULL,
  ...,
  useNames = TRUE
)

rowVars(
  x,
  rows = NULL,
  cols = NULL,
  na.rm = FALSE,
  center = NULL,
  ...,
  useNames = TRUE
)

rowMaxs(x, rows = NULL, cols = NULL, na.rm = FALSE, ..., useNames = TRUE)

colMaxs(x, rows = NULL, cols = NULL, na.rm = FALSE, ..., useNames = TRUE)

# S4 method for class 'IterableMatrix'
log1p(x)

log1p_slow(x)

# S4 method for class 'IterableMatrix'
expm1(x)

expm1_slow(x)

# S4 method for class 'IterableMatrix,numeric'
e1^e2

# S4 method for class 'numeric,IterableMatrix'
e1 < e2

# S4 method for class 'IterableMatrix,numeric'
e1 > e2

# S4 method for class 'numeric,IterableMatrix'
e1 <= e2

# S4 method for class 'IterableMatrix,numeric'
e1 >= e2

# S4 method for class 'IterableMatrix'
round(x, digits = 0)

# S4 method for class 'IterableMatrix,numeric'
e1 * e2

# S4 method for class 'IterableMatrix,numeric'
e1 + e2

# S4 method for class 'IterableMatrix,numeric'
e1/e2

# S4 method for class 'IterableMatrix,numeric'
e1 - e2

Arguments

x

IterableMatrix/dgCMatrix object

object

IterableMatrix object

y

matrix

Value

  • t() Transposed object

  • x %*% y: dense matrix result

  • rowSums(): vector of row sums

  • colSums(): vector of col sums

  • rowMeans(): vector of row means

  • colMeans(): vector of col means

  • colVars(): vector of col variance

  • rowVars(): vector of row variance

  • rowMaxs(): vector of maxes for every row

  • colMaxs(): vector of column maxes

Functions

  • matrix_type(): Get the matrix data type (mat_uint32_t, mat_float, or mat_double for now)

  • storage_order(): Get the matrix storage order ("row" or "col")

  • show(IterableMatrix): Display an IterableMatrix

  • t(IterableMatrix): Transpose an IterableMatrix

  • x %*% y: Multiply by a dense matrix

  • rowSums(IterableMatrix): Calculate rowSums

  • colSums(IterableMatrix): Calculate colSums

  • rowMeans(IterableMatrix): Calculate rowMeans

  • colMeans(IterableMatrix): Calculate colMeans

  • colVars(): Calculate colVars (replacement for matrixStats::colVars())

  • rowVars(): Calculate rowVars (replacement for matrixStats::rowVars())

  • rowMaxs(): Calculate rowMaxs (replacement for matrixStats::rowMaxs())

  • colMaxs(): Calculate colMax (replacement for matrixStats::colMax())

  • log1p(IterableMatrix): Calculate log(x + 1)

  • log1p_slow(): Calculate log(x + 1) (non-SIMD version)

  • expm1(IterableMatrix): Calculate exp(x) - 1

  • expm1_slow(): Calculate exp(x) - 1 (non-SIMD version)

  • e1^e2: Calculate x^y (elementwise)

  • e1 < e2: Binarize matrix according to numeric < matrix comparison

  • e1 > e2: Binarize matrix according to matrix > numeric comparison

  • e1 <= e2: Binarize matrix according to numeric <= matrix comparison

  • e1 >= e2: Binarize matrix according to matrix >= numeric comparison

  • round(IterableMatrix): round to nearest integer (digits must be 0)

  • e1 * e2: Multiply by a constant, or multiply rows by a vector length nrow(mat)

  • e1 + e2: Add a constant, or row-wise addition with a vector length nrow(mat)

  • e1 / e2: Divide by a constant, or divide rows by a vector length nrow(mat)

  • e1 - e2: Subtract a constant, or row-wise subtraction with a vector length nrow(mat)