# SCM Repository

[matrix] Diff of /pkg/R/AllClass.R
 [matrix] / pkg / R / AllClass.R

# Diff of /pkg/R/AllClass.R

revision 691, Fri Apr 15 14:37:38 2005 UTC revision 692, Mon Apr 18 14:34:33 2005 UTC
# Line 31  Line 31
31           representation(x = "integer", "VIRTUAL"), contains = "Matrix")           representation(x = "integer", "VIRTUAL"), contains = "Matrix")
32
33  # Virtual class of logical matrices  # Virtual class of logical matrices
34  setClass("lMatrix",  setClass("lMatrix", representation("VIRTUAL"), contains = "Matrix")
35           representation(x = "logical", "VIRTUAL"), contains = "Matrix")  ## Note that logical sparse matrices do not need an x slot so the x
36    ## slot is part of the ldenseMatrix class
37
38  # Virtual class of complex matrices  # Virtual class of complex matrices
39  setClass("zMatrix", # letter 'z' is as in the names of Lapack subroutines  setClass("zMatrix", # letter 'z' is as in the names of Lapack subroutines
# Line 43  Line 44
44           representation(rcond = "numeric", factors = "list", "VIRTUAL"),           representation(rcond = "numeric", factors = "list", "VIRTUAL"),
45           contains = "dMatrix")           contains = "dMatrix")
46
47    # Virtual class of dense, logical matrices
48    setClass("ldenseMatrix",
49             representation(x = "logical", factors = "list", "VIRTUAL"),
50             contains = "lMatrix")
51
52  ## virtual SPARSE ------------  ## virtual SPARSE ------------
53
54  setClass("sparseMatrix", contains = "Matrix")# "VIRTUAL"  setClass("sparseMatrix", contains = "Matrix")# "VIRTUAL"
55
56  setClass("dsparseMatrix", contains = c("dMatrix", "sparseMatrix"))# "VIRTUAL"  setClass("dsparseMatrix", contains = c("dMatrix", "sparseMatrix"))# "VIRTUAL"
57
58    setClass("lsparseMatrix", contains = c("lMatrix", "sparseMatrix"))# "VIRTUAL"
59
60  ## ------------------ Proper (non-virtual) Classes ----------------------------  ## ------------------ Proper (non-virtual) Classes ----------------------------
61
62  ##----------------------  DENSE  -----------------------------------------  ##----------------------  DENSE  -----------------------------------------
# Line 104  Line 112
112
113  ##-------------------- S P A R S E (non-virtual) --------------------------  ##-------------------- S P A R S E (non-virtual) --------------------------
114
115    ##---------- numeric sparse matrix classes --------------------------------
116
117  # numeric, sparse, triplet general matrices  # numeric, sparse, triplet general matrices
118  setClass("dgTMatrix",  setClass("dgTMatrix",
119           representation(i = "integer", j = "integer", factors = "list"),           representation(i = "integer", j = "integer", factors = "list"),
# Line 167  Line 177
177           validity = function(object) .Call("dsRMatrix_validate", object)           validity = function(object) .Call("dsRMatrix_validate", object)
178           )           )
179
180    ##---------- logical sparse matrix classes --------------------------------
181
182    ## these classes are used in symbolic analysis to determine the
183    ## locations of non-zero entries
184
185    # logical, sparse, triplet general matrices
186    setClass("lgTMatrix",
187             representation(i = "integer", j = "integer"),
188             contains = "lsparseMatrix",
189             validity = function(object) .Call("lgTMatrix_validate", object)
190             )
191
192    # logical, sparse, triplet triangular matrices
193    setClass("ltTMatrix",
194             representation(uplo = "character", diag = "character"),
195             contains = "lgTMatrix",
196             validity = function(object) .Call("ltTMatrix_validate", object)
197             )
198
199    # logical, sparse, triplet symmetric matrices
200    setClass("lsTMatrix",
201             representation(uplo = "character"),
202             contains = "lgTMatrix",
203             validity = function(object) .Call("lsTMatrix_validate", object)
204             )
205
206    # logical, sparse, sorted compressed sparse column-oriented general matrices
207    setClass("lgCMatrix",
208             representation(i = "integer", p = "integer"),
209             contains = "lsparseMatrix",
210             validity = function(object) .Call("lgCMatrix_validate", object)
211             )
212
213    # logical, sparse, sorted compressed sparse column-oriented triangular matrices
214    setClass("ltCMatrix",
215             representation(uplo = "character", diag = "character"),
216             contains = "lgCMatrix",
217             validity = function(object) .Call("ltCMatrix_validate", object)
218             )
219
220    # logical, sparse, sorted compressed sparse column-oriented symmetric matrices
221    setClass("lsCMatrix",
222             representation(uplo = "character"),
223             contains = "lgCMatrix",
224             validity = function(object) .Call("lsCMatrix_validate", object)
225             )
226
227    # logical, sparse, sorted compressed sparse row-oriented general matrices
228    setClass("lgRMatrix",
229             representation(j = "integer", p = "integer"),
230             contains = "lsparseMatrix",
231             validity = function(object) .Call("lgRMatrix_validate", object)
232             )
233
234    # logical, sparse, sorted compressed sparse row-oriented triangular matrices
235    setClass("ltRMatrix",
236             representation(uplo = "character", diag = "character"),
237             contains = "lgRMatrix",
238             validity = function(object) .Call("ltRMatrix_validate", object)
239             )
240
241    # logical, sparse, sorted compressed sparse row-oriented symmetric matrices
242    setClass("lsRMatrix",
243             representation(uplo = "character"),
244             contains = "lgRMatrix",
245             validity = function(object) .Call("lsRMatrix_validate", object)
246             )
247
248  ## Compressed sparse column matrix in blocks  ## Compressed sparse column matrix in blocks
249
250  setClass("dgBCMatrix",  setClass("dgBCMatrix",
251           representation(p = "integer", i = "integer", x = "array"))           representation(p = "integer", i = "integer", x = "array"))
252
253    ## Factorization classes
254
255  setClass("Cholesky", contains = "dtrMatrix")  setClass("Cholesky", contains = "dtrMatrix")
256
257  setClass("pCholesky", contains = "dtpMatrix")  setClass("pCholesky", contains = "dtpMatrix")

Legend:
 Removed from v.691 changed lines Added in v.692