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)

rowQuantiles(
  x,
  rows = NULL,
  cols = NULL,
  probs = seq(from = 0, to = 1, by = 0.25),
  na.rm = FALSE,
  type = 7L,
  digits = 7L,
  ...,
  useNames = TRUE,
  drop = TRUE
)

colQuantiles(
  x,
  rows = NULL,
  cols = NULL,
  probs = seq(from = 0, to = 1, by = 0.25),
  na.rm = FALSE,
  type = 7L,
  digits = 7L,
  ...,
  useNames = TRUE,
  drop = 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 object or a matrix-like object.

object

IterableMatrix object

y

matrix

probs

(Numeric) Quantile value(s) to be computed, between 0 and 1.

type

(Integer) between 4 and 9 selecting which quantile algorithm to use, detailed in matrixStats::rowQuantiles()

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

  • rowQuantiles(): If length(probs) == 1, return a numeric with number of entries equal to the number of rows in the matrix. Else, return a Matrix of quantile values, with cols representing each quantile, and each row representing a row in the input matrix.

  • colQuantiles(): If length(probs) == 1, return a numeric with number of entries equal to the number of columns in the matrix. Else, return a Matrix of quantile values, with cols representing each quantile, and each row representing a col in the input matrix.

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())

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

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

  • 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)