all.equal-methods function

Matrix Package Methods for Function all.equal()

Matrix Package Methods for Function all.equal()

Methods for function all.equal() (from package base) are defined for all Matrix classes.

methods

Methods

  • target = "Matrix", current = "Matrix": \
  • target = "ANY", current = "Matrix": \
  • target = "Matrix", current = "ANY": these three methods are simply using all.equal.numeric directly and work via as.vector().

There are more methods, notably also for "sparseVector"'s, see showMethods("all.equal").

Examples

showMethods("all.equal") (A <- spMatrix(3,3, i= c(1:3,2:1), j=c(3:1,1:2), x = 1:5)) ex <- expand(lu. <- lu(A)) stopifnot( all.equal(as(A[lu.@p + 1L, lu.@q + 1L], "CsparseMatrix"), lu.@L %*% lu.@U), with(ex, all.equal(as(P %*% A %*% t(Q), "CsparseMatrix"), L %*% U)), with(ex, all.equal(as(A, "CsparseMatrix"), t(P) %*% L %*% U %*% Q)))
  • Maintainer: Martin Maechler
  • License: GPL (>= 2) | file LICENCE
  • Last published: 2025-03-11