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 1036, Thu Nov 10 23:37:09 2005 UTC revision 1037, Fri Nov 11 14:57:22 2005 UTC
# Line 87  Line 87 
87  ## numeric, dense, general matrices  ## numeric, dense, general matrices
88  setClass("dgeMatrix", contains = "ddenseMatrix",  setClass("dgeMatrix", contains = "ddenseMatrix",
89           ## checks that length( @ x) == prod( @ Dim):           ## checks that length( @ x) == prod( @ Dim):
90           validity = function(object) .Call("dgeMatrix_validate", object)           validity =
91             function(object) .Call("dgeMatrix_validate", object, PACKAGE = "Matrix")
92           )           )
93  ## i.e. "dgeMatrix" cannot be packed, but "ddenseMatrix" can ..  ## i.e. "dgeMatrix" cannot be packed, but "ddenseMatrix" can ..
94    
# Line 100  Line 101 
101           ##> contains = c("ddenseMatrix", "dgeMatrix", "triangularMatrix"),           ##> contains = c("ddenseMatrix", "dgeMatrix", "triangularMatrix"),
102           contains = c("dgeMatrix", "triangularMatrix"),           contains = c("dgeMatrix", "triangularMatrix"),
103           prototype = prototype(uplo = "U", diag = "N"),           prototype = prototype(uplo = "U", diag = "N"),
104           validity = function(object) .Call("dtrMatrix_validate", object)           validity =
105             function(object) .Call("dtrMatrix_validate", object, PACKAGE = "Matrix")
106           )           )
107    
108  ## numeric, dense, packed, triangular matrices  ## numeric, dense, packed, triangular matrices
109  setClass("dtpMatrix",  setClass("dtpMatrix",
110           contains = c("ddenseMatrix", "triangularMatrix"),           contains = c("ddenseMatrix", "triangularMatrix"),
111           prototype = prototype(uplo = "U", diag = "N"),           prototype = prototype(uplo = "U", diag = "N"),
112           validity = function(object) .Call("dtpMatrix_validate", object)           validity =
113             function(object) .Call("dtpMatrix_validate", object, PACKAGE = "Matrix")
114           )           )
115    
116  ## numeric, dense, non-packed symmetric matrices  ## numeric, dense, non-packed symmetric matrices
# Line 119  Line 122 
122           ##> contains = c("ddenseMatrix", "dgeMatrix", "symmetricMatrix"),           ##> contains = c("ddenseMatrix", "dgeMatrix", "symmetricMatrix"),
123           contains = c("dgeMatrix", "symmetricMatrix"),           contains = c("dgeMatrix", "symmetricMatrix"),
124           prototype = prototype(uplo = "U"),           prototype = prototype(uplo = "U"),
125           validity = function(object) .Call("dsyMatrix_validate", object)           validity =
126             function(object) .Call("dsyMatrix_validate", object, PACKAGE = "Matrix")
127           )           )
128    
129  ## numeric, dense, packed symmetric matrices  ## numeric, dense, packed symmetric matrices
130  setClass("dspMatrix",  setClass("dspMatrix",
131           prototype = prototype(uplo = "U"),           prototype = prototype(uplo = "U"),
132           contains = c("ddenseMatrix", "symmetricMatrix"),           contains = c("ddenseMatrix", "symmetricMatrix"),
133           validity = function(object) .Call("dspMatrix_validate", object)           validity =
134             function(object) .Call("dspMatrix_validate", object, PACKAGE = "Matrix")
135           )           )
136    
137  ## numeric, dense, non-packed, positive-definite, symmetric matrices  ## numeric, dense, non-packed, positive-definite, symmetric matrices
138  setClass("dpoMatrix", contains = "dsyMatrix",  setClass("dpoMatrix", contains = "dsyMatrix",
139           validity = function(object) .Call("dpoMatrix_validate", object)           validity =
140             function(object) .Call("dpoMatrix_validate", object, PACKAGE = "Matrix")
141           )           )
142    
143  ## numeric, dense, packed, positive-definite, symmetric matrices  ## numeric, dense, packed, positive-definite, symmetric matrices
144  setClass("dppMatrix", contains = "dspMatrix",  setClass("dppMatrix", contains = "dspMatrix",
145           validity = function(object) .Call("dppMatrix_validate", object)           validity =
146             function(object) .Call("dppMatrix_validate", object, PACKAGE = "Matrix")
147           )           )
148    
149  ##----- logical dense Matrices -- e.g. as result of <ddenseMatrix>  COMPARISON  ##----- logical dense Matrices -- e.g. as result of <ddenseMatrix>  COMPARISON
# Line 164  Line 171 
171  setClass("lsyMatrix",  setClass("lsyMatrix",
172           contains = c("lgeMatrix", "symmetricMatrix"),           contains = c("lgeMatrix", "symmetricMatrix"),
173           prototype = prototype(uplo = "U")           prototype = prototype(uplo = "U")
174           ##, validity = function(object) .Call("lsyMatrix_validate", object)           ##, validity = function(object) .Call("lsyMatrix_validate", object, PACKAGE = "Matrix")
175           )           )
176    
177  ## numeric, dense, packed symmetric matrices  ## numeric, dense, packed symmetric matrices
178  setClass("lspMatrix",  setClass("lspMatrix",
179           prototype = prototype(uplo = "U"),           prototype = prototype(uplo = "U"),
180           contains = c("ldenseMatrix", "symmetricMatrix"),           contains = c("ldenseMatrix", "symmetricMatrix"),
181           validity = function(object) .Call("dspMatrix_validate", object)           validity = function(object)
182             .Call("dspMatrix_validate", object, PACKAGE = "Matrix")
183           ## "dsp" and "lsp" have the same validate           ## "dsp" and "lsp" have the same validate
184           )           )
185    
# Line 182  Line 190 
190  ## numeric, sparse, triplet general matrices  ## numeric, sparse, triplet general matrices
191  setClass("dgTMatrix",  setClass("dgTMatrix",
192           contains = c("TsparseMatrix", "dsparseMatrix"),           contains = c("TsparseMatrix", "dsparseMatrix"),
193           validity = function(object) .Call("dgTMatrix_validate", object)           validity =
194             function(object) .Call("dgTMatrix_validate", object, PACKAGE = "Matrix")
195           )           )
196    
197  ## Should not have dtTMatrix inherit from dgTMatrix because a dtTMatrix could  ## Should not have dtTMatrix inherit from dgTMatrix because a dtTMatrix could
# Line 194  Line 203 
203  setClass("dtTMatrix",  setClass("dtTMatrix",
204           contains = c("TsparseMatrix", "dsparseMatrix", "triangularMatrix"),           contains = c("TsparseMatrix", "dsparseMatrix", "triangularMatrix"),
205           prototype = prototype(uplo = "U", diag = "N"),           prototype = prototype(uplo = "U", diag = "N"),
206           validity = function(object) .Call("dtTMatrix_validate", object)           validity =
207             function(object) .Call("dtTMatrix_validate", object, PACKAGE = "Matrix")
208           )           )
209    
210  ## Should not have dsTMatrix inherit from dgTMatrix because a dsTMatrix  ## Should not have dsTMatrix inherit from dgTMatrix because a dsTMatrix
# Line 205  Line 215 
215  setClass("dsTMatrix",  setClass("dsTMatrix",
216           contains = c("TsparseMatrix", "dsparseMatrix", "symmetricMatrix"),           contains = c("TsparseMatrix", "dsparseMatrix", "symmetricMatrix"),
217           prototype = prototype(uplo = "U"),           prototype = prototype(uplo = "U"),
218           validity = function(object) .Call("dsTMatrix_validate", object)           validity =
219             function(object) .Call("dsTMatrix_validate", object, PACKAGE = "Matrix")
220           )           )
221    
222  ## numeric, sparse, sorted compressed sparse column-oriented general matrices  ## numeric, sparse, sorted compressed sparse column-oriented general matrices
223  setClass("dgCMatrix",  setClass("dgCMatrix",
224           contains = c("CsparseMatrix", "dsparseMatrix"),           contains = c("CsparseMatrix", "dsparseMatrix"),
225           prototype = prototype(p = 0:0),# to be valid           prototype = prototype(p = 0:0),# to be valid
226           validity = function(object) .Call("dgCMatrix_validate", object)           validity =
227             function(object) .Call("dgCMatrix_validate", object, PACKAGE = "Matrix")
228           )           )
229    
230  ## see comments for dtTMatrix above  ## see comments for dtTMatrix above
# Line 220  Line 232 
232  setClass("dtCMatrix",  setClass("dtCMatrix",
233           contains = c("CsparseMatrix", "dsparseMatrix", "triangularMatrix"),           contains = c("CsparseMatrix", "dsparseMatrix", "triangularMatrix"),
234           prototype = prototype(p = 0:0, uplo = "U", diag = "N"),# to be valid           prototype = prototype(p = 0:0, uplo = "U", diag = "N"),# to be valid
235           validity = function(object) .Call("tsc_validate", object)           validity =
236             function(object) .Call("tsc_validate", object, PACKAGE = "Matrix")
237           )           )
238    
239  ## see comments for dsTMatrix above  ## see comments for dsTMatrix above
# Line 228  Line 241 
241  setClass("dsCMatrix",  setClass("dsCMatrix",
242           contains = c("CsparseMatrix", "dsparseMatrix", "symmetricMatrix"),           contains = c("CsparseMatrix", "dsparseMatrix", "symmetricMatrix"),
243           prototype = prototype(p = 0:0, uplo = "U"),# to be valid           prototype = prototype(p = 0:0, uplo = "U"),# to be valid
244           validity = function(object) .Call("dsCMatrix_validate", object)           validity =
245             function(object) .Call("dsCMatrix_validate", object, PACKAGE = "Matrix")
246           )           )
247    
248  ## numeric, sparse, sorted compressed sparse row-oriented general matrices  ## numeric, sparse, sorted compressed sparse row-oriented general matrices
249  setClass("dgRMatrix",  setClass("dgRMatrix",
250           representation(j = "integer", p = "integer"),           representation(j = "integer", p = "integer"),
251           contains = "dsparseMatrix",           contains = "dsparseMatrix",
252           ##TODO: validity = function(object) .Call("dgRMatrix_validate", object)           ##TODO: validity = function(object) .Call("dgRMatrix_validate", object, PACKAGE = "Matrix")
253           )           )
254    
255  ## numeric, sparse, sorted compressed sparse row-oriented triangular matrices  ## numeric, sparse, sorted compressed sparse row-oriented triangular matrices
256  setClass("dtRMatrix",  setClass("dtRMatrix",
257           contains = c("dgRMatrix", "triangularMatrix"),           contains = c("dgRMatrix", "triangularMatrix"),
258           ##TODO: validity = function(object) .Call("dtRMatrix_validate", object)           ##TODO: validity = function(object) .Call("dtRMatrix_validate", object, PACKAGE = "Matrix")
259           )           )
260    
261  ## numeric, sparse, sorted compressed sparse row-oriented symmetric matrices  ## numeric, sparse, sorted compressed sparse row-oriented symmetric matrices
262  setClass("dsRMatrix",  setClass("dsRMatrix",
263           contains = c("dgRMatrix", "symmetricMatrix"),           contains = c("dgRMatrix", "symmetricMatrix"),
264           ##TODO: validity = function(object) .Call("dsRMatrix_validate", object)           ##TODO: validity = function(object) .Call("dsRMatrix_validate", object, PACKAGE = "Matrix")
265           )           )
266    
267  ##---------- logical sparse matrix classes --------------------------------  ##---------- logical sparse matrix classes --------------------------------
# Line 258  Line 272 
272  ## logical, sparse, triplet general matrices  ## logical, sparse, triplet general matrices
273  setClass("lgTMatrix",  setClass("lgTMatrix",
274           contains = c("TsparseMatrix", "lsparseMatrix"),           contains = c("TsparseMatrix", "lsparseMatrix"),
275           validity = function(object) .Call("lgTMatrix_validate", object)           validity =
276             function(object) .Call("lgTMatrix_validate", object, PACKAGE = "Matrix")
277           )           )
278    
279  ## logical, sparse, triplet triangular matrices  ## logical, sparse, triplet triangular matrices
280  setClass("ltTMatrix",  setClass("ltTMatrix",
281           contains = c("TsparseMatrix", "lsparseMatrix", "triangularMatrix"),           contains = c("TsparseMatrix", "lsparseMatrix", "triangularMatrix"),
282           validity = function(object) .Call("ltTMatrix_validate", object)           validity =
283             function(object) .Call("ltTMatrix_validate", object, PACKAGE = "Matrix")
284           )           )
285    
286  ## logical, sparse, triplet symmetric matrices  ## logical, sparse, triplet symmetric matrices
287  setClass("lsTMatrix",  setClass("lsTMatrix",
288           contains = c("TsparseMatrix", "lsparseMatrix", "symmetricMatrix"),           contains = c("TsparseMatrix", "lsparseMatrix", "symmetricMatrix"),
289           validity = function(object) .Call("lsTMatrix_validate", object)           validity =
290             function(object) .Call("lsTMatrix_validate", object, PACKAGE = "Matrix")
291           )           )
292    
293  ## logical, sparse, sorted compressed sparse column-oriented general matrices  ## logical, sparse, sorted compressed sparse column-oriented general matrices
294  setClass("lgCMatrix",  setClass("lgCMatrix",
295           contains = c("lsparseMatrix", "CsparseMatrix"),           contains = c("lsparseMatrix", "CsparseMatrix"),
296           prototype = prototype(p = 0:0),# to be valid           prototype = prototype(p = 0:0),# to be valid
297           validity = function(object) .Call("lgCMatrix_validate", object)           validity =
298             function(object) .Call("lgCMatrix_validate", object, PACKAGE = "Matrix")
299           )           )
300    
301  ## logical, sparse, sorted compressed sparse column-oriented triangular matrices  ## logical, sparse, sorted compressed sparse column-oriented triangular matrices
302  setClass("ltCMatrix",  setClass("ltCMatrix",
303           contains = c("lsparseMatrix", "CsparseMatrix", "triangularMatrix"),           contains = c("lsparseMatrix", "CsparseMatrix", "triangularMatrix"),
304           prototype = prototype(p = 0:0, uplo = "U", diag = "N"),# to be valid           prototype = prototype(p = 0:0, uplo = "U", diag = "N"),# to be valid
305           validity = function(object) .Call("ltCMatrix_validate", object)           validity =
306             function(object) .Call("ltCMatrix_validate", object, PACKAGE = "Matrix")
307           )           )
308    
309  ## logical, sparse, sorted compressed sparse column-oriented symmetric matrices  ## logical, sparse, sorted compressed sparse column-oriented symmetric matrices
310  setClass("lsCMatrix",  setClass("lsCMatrix",
311           contains = c("lsparseMatrix", "CsparseMatrix", "symmetricMatrix"),           contains = c("lsparseMatrix", "CsparseMatrix", "symmetricMatrix"),
312           prototype = prototype(p = 0:0, uplo = "U"),# to be valid           prototype = prototype(p = 0:0, uplo = "U"),# to be valid
313           validity = function(object) .Call("lsCMatrix_validate", object)           validity =
314             function(object) .Call("lsCMatrix_validate", object, PACKAGE = "Matrix")
315           )           )
316    
317  ## logical, sparse, sorted compressed sparse row-oriented general matrices  ## logical, sparse, sorted compressed sparse row-oriented general matrices
318  setClass("lgRMatrix",  setClass("lgRMatrix",
319           representation(j = "integer", p = "integer"),           representation(j = "integer", p = "integer"),
320           contains = "lsparseMatrix",           contains = "lsparseMatrix",
321           validity = function(object) .Call("lgRMatrix_validate", object)           validity =
322             function(object) .Call("lgRMatrix_validate", object, PACKAGE = "Matrix")
323           )           )
324    
325  ## logical, sparse, sorted compressed sparse row-oriented triangular matrices  ## logical, sparse, sorted compressed sparse row-oriented triangular matrices
326  setClass("ltRMatrix",  setClass("ltRMatrix",
327           contains = c("lgRMatrix", "triangularMatrix"),           contains = c("lgRMatrix", "triangularMatrix"),
328           validity = function(object) .Call("ltRMatrix_validate", object)           validity =
329             function(object) .Call("ltRMatrix_validate", object, PACKAGE = "Matrix")
330           )           )
331    
332  ## logical, sparse, sorted compressed sparse row-oriented symmetric matrices  ## logical, sparse, sorted compressed sparse row-oriented symmetric matrices
333  setClass("lsRMatrix",  setClass("lsRMatrix",
334           contains = c("lgRMatrix", "symmetricMatrix"),           contains = c("lgRMatrix", "symmetricMatrix"),
335           validity = function(object) .Call("lsRMatrix_validate", object)           validity =
336             function(object) .Call("lsRMatrix_validate", object, PACKAGE = "Matrix")
337           )           )
338    
339  ## Compressed sparse column matrix in blocks  ## Compressed sparse column matrix in blocks
# Line 324  Line 347 
347    
348  setClass("pCholesky", contains = "dtpMatrix")  setClass("pCholesky", contains = "dtpMatrix")
349    
350  setClass("BunchKaufman", representation(perm = "integer"), contains = "dtrMatrix",  setClass("BunchKaufman",
351           validity = function(object) .Call("BunchKaufman_validate", object));           representation(perm = "integer"),
352             contains = "dtrMatrix",
353             validity =
354             function(object) .Call("BunchKaufman_validate", object, PACKAGE = "Matrix")
355             )
356    
357  setClass("pBunchKaufman", representation(perm = "integer"), contains = "dtpMatrix",  setClass("pBunchKaufman",
358           validity = function(object) .Call("pBunchKaufman_validate", object));           representation(perm = "integer"),
359             contains = "dtpMatrix",
360             validity =
361             function(object) .Call("pBunchKaufman_validate", object, PACKAGE = "Matrix")
362             )
363    
364  setClass("dCholCMatrix",  setClass("dCholCMatrix",
365           representation(perm = "integer", Parent = "integer", D = "numeric"),           representation(perm = "integer", Parent = "integer", D = "numeric"),
366           contains = "dtCMatrix",           contains = "dtCMatrix",
367           validity = function(object) .Call("dCholCMatrix_validate", object))           validity =
368             function(object) .Call("dCholCMatrix_validate", object, PACKAGE = "Matrix")
369             )
370    
371  setClass("lCholCMatrix",  setClass("lCholCMatrix",
372           representation(perm = "integer", Parent = "integer"),           representation(perm = "integer", Parent = "integer"),
373           contains = "ltCMatrix",           contains = "ltCMatrix",
374           validity = function(object) .Call("lCholCMatrix_validate", object))           validity =
375             function(object) .Call("lCholCMatrix_validate", object, PACKAGE = "Matrix")
376             )
377    
378  ##-------------------- permutation ----------------------------------------  ##-------------------- permutation ----------------------------------------
379    
# Line 378  Line 413 
413                          sign = "integer",                          sign = "integer",
414                          call = "call"))                          call = "call"))
415    
416  setClass("LU", representation(x = "numeric",  setClass("LU",
417                                perm = "integer"),           representation(x = "numeric", perm = "integer"),
418           validity = function(object) .Call("LU_validate", object))           validity = function(object) .Call("LU_validate", object, PACKAGE = "Matrix")
419             )
420    
421  ## Deprecated:  ## Deprecated:
422                         ## positive-definite symmetric matrices as matrices                         ## positive-definite symmetric matrices as matrices

Legend:
Removed from v.1036  
changed lines
  Added in v.1037

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