# SCM Repository

[matrix] Diff of /pkg/tests/Simple.R
 [matrix] / pkg / tests / Simple.R

# Diff of /pkg/tests/Simple.R

revision 2184, Sat Apr 26 20:32:39 2008 UTC revision 2185, Sat Apr 26 20:33:16 2008 UTC
# Line 132  Line 132
132
133  lcu <- new("ltCMatrix", Dim = c(4L, 4L), i = c(0:1, 0L), p = c(0L, 0:3),  lcu <- new("ltCMatrix", Dim = c(4L, 4L), i = c(0:1, 0L), p = c(0L, 0:3),
134             x = c(TRUE, FALSE, FALSE), uplo = "U", diag = "U")             x = c(TRUE, FALSE, FALSE), uplo = "U", diag = "U")
135  (ncu <- as(lcu, "nMatrix"))# was completely wrong  stopifnot(identical(rowSums(lcu), rowSums(drop0(lcu))))
136  stopifnot(identical3(rowSums(lcu), rowSums(drop0(lcu)),  (ncu <- as(lcu, "nMatrix"))# -- gives the "pattern" of lcu, i.e. FALSE are *there*
137                      rowSums(ncu)))  stopifnot(identical(ncu, as(lcu,"nsparseMatrix")),
138              identical(rowSums(ncu), c(3:1, 1L)))
139
140
141  assert.EQ.mat(cu, as(tu,"matrix"), tol=0)  assert.EQ.mat(cu, as(tu,"matrix"), tol=0)
142  assert.EQ.mat(cnu, as(tu,"matrix"), tol=0)  assert.EQ.mat(cnu, as(tu,"matrix"), tol=0)

Legend:
 Removed from v.2184 changed lines Added in v.2185