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 1279, Tue May 23 08:01:11 2006 UTC revision 1280, Tue May 23 08:01:44 2006 UTC
# Line 39  Line 39 
39           representation(uplo = "character", diag = "character", "VIRTUAL"),           representation(uplo = "character", diag = "character", "VIRTUAL"),
40           contains = "Matrix",           contains = "Matrix",
41           validity = function(object)           validity = function(object)
42           .Call("triangularMatrix_validate", object, PACKAGE = "Matrix")           .Call(triangularMatrix_validate, object)
43           )           )
44    
45    
# Line 47  Line 47 
47  setClass("dMatrix",  setClass("dMatrix",
48           representation(x = "numeric", "VIRTUAL"), contains = "Matrix",           representation(x = "numeric", "VIRTUAL"), contains = "Matrix",
49           validity = function(object)           validity = function(object)
50           .Call("dMatrix_validate", object, PACKAGE = "Matrix"))           .Call(dMatrix_validate, object))
51    
52  ## Virtual class of integer matrices  ## Virtual class of integer matrices
53  setClass("iMatrix",  setClass("iMatrix",
# Line 118  Line 118 
118  setClass("dgeMatrix", contains = c("ddenseMatrix", "generalMatrix"),  setClass("dgeMatrix", contains = c("ddenseMatrix", "generalMatrix"),
119           ## checks that length( @ x) == prod( @ Dim):           ## checks that length( @ x) == prod( @ Dim):
120           validity =           validity =
121           function(object) .Call("dgeMatrix_validate", object, PACKAGE = "Matrix")           function(object) .Call(dgeMatrix_validate, object)
122           )           )
123  ## i.e. "dgeMatrix" cannot be packed, but "ddenseMatrix" can ..  ## i.e. "dgeMatrix" cannot be packed, but "ddenseMatrix" can ..
124    
# Line 127  Line 127 
127           contains = c("ddenseMatrix", "triangularMatrix"),           contains = c("ddenseMatrix", "triangularMatrix"),
128           prototype = prototype(uplo = "U", diag = "N"),           prototype = prototype(uplo = "U", diag = "N"),
129           validity =           validity =
130           function(object) .Call("dtrMatrix_validate", object, PACKAGE = "Matrix")           function(object) .Call(dtrMatrix_validate, object)
131           )           )
132    
133  ## numeric, dense, packed, triangular matrices  ## numeric, dense, packed, triangular matrices
# Line 135  Line 135 
135           contains = c("ddenseMatrix", "triangularMatrix"),           contains = c("ddenseMatrix", "triangularMatrix"),
136           prototype = prototype(uplo = "U", diag = "N"),           prototype = prototype(uplo = "U", diag = "N"),
137           validity =           validity =
138           function(object) .Call("dtpMatrix_validate", object, PACKAGE = "Matrix")           function(object) .Call(dtpMatrix_validate, object)
139           )           )
140    
141  ## numeric, dense, non-packed symmetric matrices  ## numeric, dense, non-packed symmetric matrices
# Line 148  Line 148 
148           contains = c("ddenseMatrix", "symmetricMatrix"),           contains = c("ddenseMatrix", "symmetricMatrix"),
149           prototype = prototype(uplo = "U"),           prototype = prototype(uplo = "U"),
150           validity =           validity =
151           function(object) .Call("dsyMatrix_validate", object, PACKAGE = "Matrix")           function(object) .Call(dsyMatrix_validate, object)
152           )           )
153    
154  ## numeric, dense, packed symmetric matrices  ## numeric, dense, packed symmetric matrices
# Line 156  Line 156 
156           prototype = prototype(uplo = "U"),           prototype = prototype(uplo = "U"),
157           contains = c("ddenseMatrix", "symmetricMatrix"),           contains = c("ddenseMatrix", "symmetricMatrix"),
158           validity =           validity =
159           function(object) .Call("dspMatrix_validate", object, PACKAGE = "Matrix")           function(object) .Call(dspMatrix_validate, object)
160           )           )
161    
162  ## numeric, dense, non-packed, positive-definite, symmetric matrices  ## numeric, dense, non-packed, positive-definite, symmetric matrices
163  setClass("dpoMatrix", contains = "dsyMatrix",  setClass("dpoMatrix", contains = "dsyMatrix",
164           validity =           validity =
165           function(object) .Call("dpoMatrix_validate", object, PACKAGE = "Matrix")           function(object) .Call(dpoMatrix_validate, object)
166           )           )
167    
168  ## numeric, dense, packed, positive-definite, symmetric matrices  ## numeric, dense, packed, positive-definite, symmetric matrices
169  setClass("dppMatrix", contains = "dspMatrix",  setClass("dppMatrix", contains = "dspMatrix",
170           validity =           validity =
171           function(object) .Call("dppMatrix_validate", object, PACKAGE = "Matrix")           function(object) .Call(dppMatrix_validate, object)
172           )           )
173    
174  ##----- logical dense Matrices -- e.g. as result of <ddenseMatrix>  COMPARISON  ##----- logical dense Matrices -- e.g. as result of <ddenseMatrix>  COMPARISON
# Line 196  Line 196 
196  setClass("lsyMatrix",  setClass("lsyMatrix",
197           contains = c("ldenseMatrix", "symmetricMatrix"),           contains = c("ldenseMatrix", "symmetricMatrix"),
198           prototype = prototype(uplo = "U")           prototype = prototype(uplo = "U")
199           ##, validity = function(object) .Call("lsyMatrix_validate", object, PACKAGE = "Matrix")           ##, validity = function(object) .Call(lsyMatrix_validate, object)
200           )           )
201    
202  ## numeric, dense, packed symmetric matrices  ## numeric, dense, packed symmetric matrices
# Line 204  Line 204 
204           contains = c("ldenseMatrix", "symmetricMatrix"),           contains = c("ldenseMatrix", "symmetricMatrix"),
205           prototype = prototype(uplo = "U"),           prototype = prototype(uplo = "U"),
206           validity = function(object)           validity = function(object)
207           .Call("dspMatrix_validate", object, PACKAGE = "Matrix")           .Call(dspMatrix_validate, object)
208           ## "dsp" and "lsp" have the same validate           ## "dsp" and "lsp" have the same validate
209           )           )
210    
# Line 223  Line 223 
223  setClass("dgTMatrix",  setClass("dgTMatrix",
224           contains = c("TsparseMatrix", "dsparseMatrix", "generalMatrix"),           contains = c("TsparseMatrix", "dsparseMatrix", "generalMatrix"),
225           validity =           validity =
226           function(object) .Call("dgTMatrix_validate", object, PACKAGE = "Matrix")           function(object) .Call(dgTMatrix_validate, object)
227           )           )
228    
229  ## Should not have dtTMatrix inherit from dgTMatrix because a dtTMatrix could  ## Should not have dtTMatrix inherit from dgTMatrix because a dtTMatrix could
# Line 236  Line 236 
236           contains = c("TsparseMatrix", "dsparseMatrix", "triangularMatrix"),           contains = c("TsparseMatrix", "dsparseMatrix", "triangularMatrix"),
237           prototype = prototype(uplo = "U", diag = "N"),           prototype = prototype(uplo = "U", diag = "N"),
238           validity =           validity =
239           function(object) .Call("dtTMatrix_validate", object, PACKAGE = "Matrix")           function(object) .Call(dtTMatrix_validate, object)
240           )           )
241    
242  ## Should not have dsTMatrix inherit from dgTMatrix because a dsTMatrix  ## Should not have dsTMatrix inherit from dgTMatrix because a dsTMatrix
# Line 248  Line 248 
248           contains = c("TsparseMatrix", "dsparseMatrix", "symmetricMatrix"),           contains = c("TsparseMatrix", "dsparseMatrix", "symmetricMatrix"),
249           prototype = prototype(uplo = "U"),           prototype = prototype(uplo = "U"),
250           validity =           validity =
251           function(object) .Call("dsTMatrix_validate", object, PACKAGE = "Matrix")           function(object) .Call(dsTMatrix_validate, object)
252           )           )
253    
254  ## numeric, sparse, sorted compressed sparse column-oriented general matrices  ## numeric, sparse, sorted compressed sparse column-oriented general matrices
# Line 256  Line 256 
256           contains = c("CsparseMatrix", "dsparseMatrix", "generalMatrix"),           contains = c("CsparseMatrix", "dsparseMatrix", "generalMatrix"),
257           prototype = prototype(p = 0:0),# to be valid           prototype = prototype(p = 0:0),# to be valid
258           validity =           validity =
259           function(object) .Call("dgCMatrix_validate", object, PACKAGE = "Matrix")           function(object) .Call(dgCMatrix_validate, object)
260           )           )
261    
262  ## see comments for dtTMatrix above  ## see comments for dtTMatrix above
# Line 265  Line 265 
265           contains = c("CsparseMatrix", "dsparseMatrix", "triangularMatrix"),           contains = c("CsparseMatrix", "dsparseMatrix", "triangularMatrix"),
266           prototype = prototype(p = 0:0, uplo = "U", diag = "N"),# to be valid           prototype = prototype(p = 0:0, uplo = "U", diag = "N"),# to be valid
267           validity =           validity =
268           function(object) .Call("tsc_validate", object, PACKAGE = "Matrix")           function(object) .Call(tsc_validate, object)
269           )           )
270    
271  ## see comments for dsTMatrix above  ## see comments for dsTMatrix above
# Line 274  Line 274 
274           contains = c("CsparseMatrix", "dsparseMatrix", "symmetricMatrix"),           contains = c("CsparseMatrix", "dsparseMatrix", "symmetricMatrix"),
275           prototype = prototype(p = 0:0, uplo = "U"),# to be valid           prototype = prototype(p = 0:0, uplo = "U"),# to be valid
276           validity =           validity =
277           function(object) .Call("dsCMatrix_validate", object, PACKAGE = "Matrix")           function(object) .Call(dsCMatrix_validate, object)
278           )           )
279    
280  ## numeric, sparse, sorted compressed sparse row-oriented general matrices  ## numeric, sparse, sorted compressed sparse row-oriented general matrices
281  setClass("dgRMatrix",  setClass("dgRMatrix",
282           contains = c("RsparseMatrix", "dsparseMatrix", "generalMatrix"),           contains = c("RsparseMatrix", "dsparseMatrix", "generalMatrix"),
283           prototype = prototype(p = 0:0),           prototype = prototype(p = 0:0),
284           ##TODO: validity = function(object) .Call("dgRMatrix_validate", object, PACKAGE = "Matrix")           ##TODO: validity = function(object) .Call(dgRMatrix_validate, object)
285           )           )
286    
287  ## numeric, sparse, sorted compressed sparse row-oriented triangular matrices  ## numeric, sparse, sorted compressed sparse row-oriented triangular matrices
288  setClass("dtRMatrix",  setClass("dtRMatrix",
289           contains = c("RsparseMatrix", "dsparseMatrix", "triangularMatrix"),           contains = c("RsparseMatrix", "dsparseMatrix", "triangularMatrix"),
290           prototype = prototype(p = 0:0, uplo = "U", diag = "N"),# to be valid           prototype = prototype(p = 0:0, uplo = "U", diag = "N"),# to be valid
291           ##TODO: validity = function(object) .Call("dtRMatrix_validate", object, PACKAGE = "Matrix")           ##TODO: validity = function(object) .Call(dtRMatrix_validate, object)
292    
293           )           )
294    
# Line 296  Line 296 
296  setClass("dsRMatrix",  setClass("dsRMatrix",
297           contains = c("RsparseMatrix", "dsparseMatrix", "symmetricMatrix"),           contains = c("RsparseMatrix", "dsparseMatrix", "symmetricMatrix"),
298           prototype = prototype(p = 0:0, uplo = "U"),# to be valid           prototype = prototype(p = 0:0, uplo = "U"),# to be valid
299           ##TODO: validity = function(object) .Call("dsRMatrix_validate", object, PACKAGE = "Matrix")           ##TODO: validity = function(object) .Call(dsRMatrix_validate, object)
300           )           )
301    
302  ##---------- logical sparse matrix classes --------------------------------  ##---------- logical sparse matrix classes --------------------------------
# Line 308  Line 308 
308  setClass("lgTMatrix",  setClass("lgTMatrix",
309           contains = c("TsparseMatrix", "lsparseMatrix", "generalMatrix"),           contains = c("TsparseMatrix", "lsparseMatrix", "generalMatrix"),
310           validity =           validity =
311           function(object) .Call("lgTMatrix_validate", object, PACKAGE = "Matrix")           function(object) .Call(lgTMatrix_validate, object)
312           )           )
313    
314  ## logical, sparse, triplet triangular matrices  ## logical, sparse, triplet triangular matrices
# Line 316  Line 316 
316           contains = c("TsparseMatrix", "lsparseMatrix", "triangularMatrix"),           contains = c("TsparseMatrix", "lsparseMatrix", "triangularMatrix"),
317           prototype = prototype(uplo = "U", diag = "N"),           prototype = prototype(uplo = "U", diag = "N"),
318           validity =           validity =
319           function(object) .Call("ltTMatrix_validate", object, PACKAGE = "Matrix")           function(object) .Call(ltTMatrix_validate, object)
320           )           )
321    
322  ## logical, sparse, triplet symmetric matrices  ## logical, sparse, triplet symmetric matrices
323  setClass("lsTMatrix",  setClass("lsTMatrix",
324           contains = c("TsparseMatrix", "lsparseMatrix", "symmetricMatrix"),           contains = c("TsparseMatrix", "lsparseMatrix", "symmetricMatrix"),
325           validity =           validity =
326           function(object) .Call("lsTMatrix_validate", object, PACKAGE = "Matrix")           function(object) .Call(lsTMatrix_validate, object)
327           )           )
328    
329  ## logical, sparse, sorted compressed sparse column-oriented general matrices  ## logical, sparse, sorted compressed sparse column-oriented general matrices
# Line 331  Line 331 
331           contains = c("CsparseMatrix", "lsparseMatrix", "generalMatrix"),           contains = c("CsparseMatrix", "lsparseMatrix", "generalMatrix"),
332           prototype = prototype(p = 0:0),# to be valid           prototype = prototype(p = 0:0),# to be valid
333           validity =           validity =
334           function(object) .Call("lgCMatrix_validate", object, PACKAGE = "Matrix")           function(object) .Call(lgCMatrix_validate, object)
335           )           )
336    
337  ## logical, sparse, sorted compressed sparse column-oriented triangular matrices  ## logical, sparse, sorted compressed sparse column-oriented triangular matrices
# Line 339  Line 339 
339           contains = c("CsparseMatrix", "lsparseMatrix", "triangularMatrix"),           contains = c("CsparseMatrix", "lsparseMatrix", "triangularMatrix"),
340           prototype = prototype(p = 0:0, uplo = "U", diag = "N"),# to be valid           prototype = prototype(p = 0:0, uplo = "U", diag = "N"),# to be valid
341           validity =           validity =
342           function(object) .Call("ltCMatrix_validate", object, PACKAGE = "Matrix")           function(object) .Call(ltCMatrix_validate, object)
343           )           )
344    
345  ## logical, sparse, sorted compressed sparse column-oriented symmetric matrices  ## logical, sparse, sorted compressed sparse column-oriented symmetric matrices
# Line 347  Line 347 
347           contains = c("CsparseMatrix", "lsparseMatrix", "symmetricMatrix"),           contains = c("CsparseMatrix", "lsparseMatrix", "symmetricMatrix"),
348           prototype = prototype(p = 0:0, uplo = "U"),# to be valid           prototype = prototype(p = 0:0, uplo = "U"),# to be valid
349           validity =           validity =
350           function(object) .Call("lsCMatrix_validate", object, PACKAGE = "Matrix")           function(object) .Call(lsCMatrix_validate, object)
351           )           )
352    
353  ## logical, sparse, sorted compressed sparse row-oriented general matrices  ## logical, sparse, sorted compressed sparse row-oriented general matrices
# Line 355  Line 355 
355           representation(j = "integer", p = "integer"),           representation(j = "integer", p = "integer"),
356           contains = c("RsparseMatrix", "lsparseMatrix", "generalMatrix"),           contains = c("RsparseMatrix", "lsparseMatrix", "generalMatrix"),
357           validity =           validity =
358           function(object) .Call("lgRMatrix_validate", object, PACKAGE = "Matrix")           function(object) .Call(lgRMatrix_validate, object)
359           )           )
360    
361  ## logical, sparse, sorted compressed sparse row-oriented triangular matrices  ## logical, sparse, sorted compressed sparse row-oriented triangular matrices
362  setClass("ltRMatrix",  setClass("ltRMatrix",
363           contains = c("RsparseMatrix", "lsparseMatrix", "triangularMatrix"),           contains = c("RsparseMatrix", "lsparseMatrix", "triangularMatrix"),
364           validity =           validity =
365           function(object) .Call("ltRMatrix_validate", object, PACKAGE = "Matrix")           function(object) .Call(ltRMatrix_validate, object)
366           )           )
367    
368  ## logical, sparse, sorted compressed sparse row-oriented symmetric matrices  ## logical, sparse, sorted compressed sparse row-oriented symmetric matrices
369  setClass("lsRMatrix",  setClass("lsRMatrix",
370           contains = c("RsparseMatrix", "lsparseMatrix", "symmetricMatrix"),           contains = c("RsparseMatrix", "lsparseMatrix", "symmetricMatrix"),
371           validity =           validity =
372           function(object) .Call("lsRMatrix_validate", object, PACKAGE = "Matrix")           function(object) .Call(lsRMatrix_validate, object)
373           )           )
374    
375  ### Factorization classes ---------------------------------------------  ### Factorization classes ---------------------------------------------
# Line 386  Line 386 
386           representation(perm = "integer"),           representation(perm = "integer"),
387           contains = "dtrMatrix",           contains = "dtrMatrix",
388           validity =           validity =
389           function(object) .Call("BunchKaufman_validate", object, PACKAGE = "Matrix")           function(object) .Call(BunchKaufman_validate, object)
390           )           )
391    
392  setClass("pBunchKaufman",  setClass("pBunchKaufman",
393           representation(perm = "integer"),           representation(perm = "integer"),
394           contains = "dtpMatrix",           contains = "dtpMatrix",
395           validity =           validity =
396           function(object) .Call("pBunchKaufman_validate", object, PACKAGE = "Matrix")           function(object) .Call(pBunchKaufman_validate, object)
397           )           )
398    
399  setClass("dCholCMatrix",  setClass("dCholCMatrix",
400           representation(perm = "integer", Parent = "integer", D = "numeric"),           representation(perm = "integer", Parent = "integer", D = "numeric"),
401           contains = "dtCMatrix",           contains = "dtCMatrix",
402           validity =           validity =
403           function(object) .Call("dCholCMatrix_validate", object, PACKAGE = "Matrix")           function(object) .Call(dCholCMatrix_validate, object)
404           )           )
405    
406  setClass("lCholCMatrix",  setClass("lCholCMatrix",
407           representation(perm = "integer", Parent = "integer"),           representation(perm = "integer", Parent = "integer"),
408           contains = "ltCMatrix",           contains = "ltCMatrix",
409           validity =           validity =
410           function(object) .Call("lCholCMatrix_validate", object, PACKAGE = "Matrix")           function(object) .Call(lCholCMatrix_validate, object)
411           )           )
412    
413  setClass("CHMfactor",            # cholmod_factor struct as S4 object  setClass("CHMfactor",            # cholmod_factor struct as S4 object
414           representation(colcount = "integer", perm = "integer",           representation(colcount = "integer", perm = "integer",
415                          type = "integer", "VIRTUAL"),                          type = "integer", "VIRTUAL"),
416           validity =           validity =
417           function(object) .Call("CHMfactor_validate", object, PACKAGE = "Matrix")           function(object) .Call(CHMfactor_validate, object)
418           )           )
419    
420  setClass("CHMsuper",                   # supernodal cholmod_factor  setClass("CHMsuper",                   # supernodal cholmod_factor
# Line 422  Line 422 
422                          s = "integer", "VIRTUAL"),                          s = "integer", "VIRTUAL"),
423           contains = "CHMfactor",           contains = "CHMfactor",
424           validity =           validity =
425           function(object) .Call("CHMsuper_validate", object, PACKAGE = "Matrix"))           function(object) .Call(CHMsuper_validate, object))
426    
427  setClass("CHMsimpl",                   # simplicial cholmod_factor  setClass("CHMsimpl",                   # simplicial cholmod_factor
428           representation(p = "integer", i = "integer",           representation(p = "integer", i = "integer",
429                          nz = "integer", nxt = "integer", prv = "integer", "VIRTUAL"),                          nz = "integer", nxt = "integer", prv = "integer", "VIRTUAL"),
430           contains = "CHMfactor",           contains = "CHMfactor",
431           validity =           validity =
432           function(object) .Call("CHMsuper_validate", object, PACKAGE = "Matrix"))           function(object) .Call(CHMsuper_validate, object))
433    
434  setClass("dCHMsuper", representation(x = "numeric"), contains = "CHMsuper")  setClass("dCHMsuper", representation(x = "numeric"), contains = "CHMsuper")
435    
# Line 484  Line 484 
484    
485  setClass("LU",  setClass("LU",
486           representation(x = "numeric", perm = "integer"),           representation(x = "numeric", perm = "integer"),
487           validity = function(object) .Call("LU_validate", object, PACKAGE = "Matrix")           validity = function(object) .Call(LU_validate, object)
488           )           )
489    
490  ## -------------------- lmer-related Classes --------------------------------  ## -------------------- lmer-related Classes --------------------------------

Legend:
Removed from v.1279  
changed lines
  Added in v.1280

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