isSymmetric {spam} | R Documentation |
Efficient function to test if 'object' is symmetric or not.
isSymmetric.spam(object, tol = 100 * .Machine$double.eps, ...)
object |
a spam matrix. |
tol |
numeric scalar >= 0. Smaller differences are not considered,
see all.equal.spam . |
... |
further arguments passed to all.equal.spam . |
symmetry is assessed by comparing the sparsity structure of
object
and t(object)
via the function
all.equal.spam
.
logical indicating if object
is symmetric or not.
Reinhard Furrer
obj <- diag.spam(2) isSymmetric(obj) obj[1,2] <- .Machine$double.eps isSymmetric(obj)