SCM

SCM Repository

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

Diff of /pkg/R/AllClass.R

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 921, Sat Sep 17 14:27:41 2005 UTC revision 922, Sun Sep 18 16:33:54 2005 UTC
# Line 62  Line 62 
62    
63  ## virtual SPARSE ------------  ## virtual SPARSE ------------
64    
65  setClass("sparseMatrix", representation("VIRTUAL"), contains = "Matrix")  setClass("sparseMatrix", representation(factors = "list", "VIRTUAL"), contains = "Matrix")
66    
67  ## general Triplet Matrices (dgT, lgT, ..):  ## sparse matrices in Triplet representation (dgT, lgT, ..):
68  setClass("gTMatrix", representation(i = "integer", j = "integer", "VIRTUAL"),  setClass("TsparseMatrix", representation(i = "integer", j = "integer", "VIRTUAL"),
69             contains = "sparseMatrix")
70    
71    setClass("CsparseMatrix", representation(i = "integer", p = "integer", "VIRTUAL"),
72             contains = "sparseMatrix")
73    
74    setClass("RsparseMatrix", representation(p = "integer", j = "integer", "VIRTUAL"),
75           contains = "sparseMatrix")           contains = "sparseMatrix")
76    
77  setClass("dsparseMatrix", representation("VIRTUAL"),  setClass("dsparseMatrix", representation("VIRTUAL"),
# Line 129  Line 135 
135    
136  # numeric, sparse, triplet general matrices  # numeric, sparse, triplet general matrices
137  setClass("dgTMatrix",  setClass("dgTMatrix",
138           representation(factors = "list"),           contains = c("TsparseMatrix", "dsparseMatrix"),
          contains = c("gTMatrix", "dsparseMatrix"),  
139           validity = function(object) .Call("dgTMatrix_validate", object)           validity = function(object) .Call("dgTMatrix_validate", object)
140           )           )
141    
142    ## Should not have dtTMatrix inherit from dgTMatrix because a dtTMatrix could
143    # be less than fully stored if diag = "U".  Methods for the dgTMatrix
144    # class would not produce correct results even though all the slots
145    # are present.
146    
147  # numeric, sparse, triplet triangular matrices  # numeric, sparse, triplet triangular matrices
148  setClass("dtTMatrix",  setClass("dtTMatrix",
149           contains = c("dgTMatrix", "triangularMatrix"),           contains = c("TsparseMatrix", "dsparseMatrix", "triangularMatrix"),
150           prototype = prototype(uplo = "U", diag = "N"),           prototype = prototype(uplo = "U", diag = "N"),
151           validity = function(object) .Call("dtTMatrix_validate", object)           validity = function(object) .Call("dtTMatrix_validate", object)
152           )           )
153    
154    ## Should not have dsTMatrix inherit from dgTMatrix because a dsTMatrix
155    # is not fully stored.  Methods for the dgTMatrix class would not
156    # produce correct results even though all the slots are present.
157    
158  # numeric, sparse, triplet symmetric matrices  # numeric, sparse, triplet symmetric matrices
159  setClass("dsTMatrix",  setClass("dsTMatrix",
160           contains = c("dgTMatrix", "symmetricMatrix"),           contains = c("TsparseMatrix", "dsparseMatrix", "symmetricMatrix"),
161           prototype = prototype(uplo = "U"),           prototype = prototype(uplo = "U"),
162           validity = function(object) .Call("dsTMatrix_validate", object)           validity = function(object) .Call("dsTMatrix_validate", object)
163           )           )
164    
165  # numeric, sparse, sorted compressed sparse column-oriented general matrices  # numeric, sparse, sorted compressed sparse column-oriented general matrices
166  setClass("dgCMatrix",  setClass("dgCMatrix",
167           representation(i = "integer", p = "integer", factors = "list"),           contains = c("CsparseMatrix", "dsparseMatrix"),
          contains = "dsparseMatrix",  
168           prototype = prototype(p = 0:0),# to be valid           prototype = prototype(p = 0:0),# to be valid
169           validity = function(object) .Call("dgCMatrix_validate", object)           validity = function(object) .Call("dgCMatrix_validate", object)
170           )           )
171    
172    ## see comments for dtTMatrix above
173  # numeric, sparse, sorted compressed sparse column-oriented triangular matrices  # numeric, sparse, sorted compressed sparse column-oriented triangular matrices
174  setClass("dtCMatrix",  setClass("dtCMatrix",
175           contains = c("dgCMatrix", "triangularMatrix"),           contains = c("CsparseMatrix", "dsparseMatrix", "triangularMatrix"),
176           prototype = prototype(p = 0:0, uplo = "U", diag = "N"),# to be valid           prototype = prototype(p = 0:0, uplo = "U", diag = "N"),# to be valid
177           validity = function(object) .Call("tsc_validate", object)           validity = function(object) .Call("tsc_validate", object)
178           )           )
179    
180    ## see comments for dsTMatrix above
181  # numeric, sparse, sorted compressed sparse column-oriented symmetric matrices  # numeric, sparse, sorted compressed sparse column-oriented symmetric matrices
182  setClass("dsCMatrix",  setClass("dsCMatrix",
183           contains = c("dgCMatrix", "symmetricMatrix"),           contains = c("CsparseMatrix", "dsparseMatrix", "symmetricMatrix"),
184           prototype = prototype(p = 0:0, uplo = "U"),# to be valid           prototype = prototype(p = 0:0, uplo = "U"),# to be valid
185           validity = function(object) .Call("dsCMatrix_validate", object)           validity = function(object) .Call("dsCMatrix_validate", object)
186           )           )
# Line 196  Line 211 
211    
212  # logical, sparse, triplet general matrices  # logical, sparse, triplet general matrices
213  setClass("lgTMatrix",  setClass("lgTMatrix",
214           contains = c("gTMatrix", "lsparseMatrix"),           contains = c("TsparseMatrix", "lsparseMatrix"),
215           validity = function(object) .Call("lgTMatrix_validate", object)           validity = function(object) .Call("lgTMatrix_validate", object)
216           )           )
217    
218  # logical, sparse, triplet triangular matrices  # logical, sparse, triplet triangular matrices
219  setClass("ltTMatrix",  setClass("ltTMatrix",
220           contains = c("lgTMatrix", "triangularMatrix"),           contains = c("TsparseMatrix", "lsparseMatrix", "triangularMatrix"),
221           validity = function(object) .Call("ltTMatrix_validate", object)           validity = function(object) .Call("ltTMatrix_validate", object)
222           )           )
223    
224  # logical, sparse, triplet symmetric matrices  # logical, sparse, triplet symmetric matrices
225  setClass("lsTMatrix",  setClass("lsTMatrix",
226           contains = c("lgTMatrix", "symmetricMatrix"),           contains = c("TsparseMatrix", "lsparseMatrix", "symmetricMatrix"),
227           validity = function(object) .Call("lsTMatrix_validate", object)           validity = function(object) .Call("lsTMatrix_validate", object)
228           )           )
229    
230  # logical, sparse, sorted compressed sparse column-oriented general matrices  # logical, sparse, sorted compressed sparse column-oriented general matrices
231  setClass("lgCMatrix",  setClass("lgCMatrix",
232           representation(i = "integer", p = "integer"),           contains = c("lsparseMatrix", "CsparseMatrix"),
          contains = "lsparseMatrix",  
233           prototype = prototype(p = 0:0),# to be valid           prototype = prototype(p = 0:0),# to be valid
234           validity = function(object) .Call("lgCMatrix_validate", object)           validity = function(object) .Call("lgCMatrix_validate", object)
235           )           )
236    
237  # logical, sparse, sorted compressed sparse column-oriented triangular matrices  # logical, sparse, sorted compressed sparse column-oriented triangular matrices
238  setClass("ltCMatrix",  setClass("ltCMatrix",
239           contains = c("lgCMatrix", "triangularMatrix"),           contains = c("lsparseMatrix", "CsparseMatrix", "triangularMatrix"),
240           prototype = prototype(p = 0:0, uplo = "U", diag = "N"),# to be valid           prototype = prototype(p = 0:0, uplo = "U", diag = "N"),# to be valid
241           validity = function(object) .Call("ltCMatrix_validate", object)           validity = function(object) .Call("ltCMatrix_validate", object)
242           )           )
243    
244  # logical, sparse, sorted compressed sparse column-oriented symmetric matrices  # logical, sparse, sorted compressed sparse column-oriented symmetric matrices
245  setClass("lsCMatrix",  setClass("lsCMatrix",
246           contains = c("lgCMatrix", "symmetricMatrix"),           contains = c("lsparseMatrix", "CsparseMatrix", "symmetricMatrix"),
247           prototype = prototype(p = 0:0, uplo = "U"),# to be valid           prototype = prototype(p = 0:0, uplo = "U"),# to be valid
248           validity = function(object) .Call("lsCMatrix_validate", object)           validity = function(object) .Call("lsCMatrix_validate", object)
249           )           )

Legend:
Removed from v.921  
changed lines
  Added in v.922

root@r-forge.r-project.org
ViewVC Help
Powered by ViewVC 1.0.0  
Thanks to:
Vienna University of Economics and Business Powered By FusionForge