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 637, Tue Mar 15 00:41:24 2005 UTC revision 638, Tue Mar 15 00:43:21 2005 UTC
# Line 165  Line 165 
165    
166  setClass("Cholesky", contains = "dtrMatrix")  setClass("Cholesky", contains = "dtrMatrix")
167    
168    setClass("pCholesky", contains = "dtpMatrix")
169    
170  setClass("BunchKaufman", representation(perm = "integer"), contains = "dtrMatrix",  setClass("BunchKaufman", representation(perm = "integer"), contains = "dtrMatrix",
171           validity = function(object) .Call("BunchKaufman_validate", object));           validity = function(object) .Call("BunchKaufman_validate", object));
172    
173    setClass("pBunchKaufman", representation(perm = "integer"), contains = "dtpMatrix",
174             validity = function(object) .Call("pBunchKaufman_validate", object));
175    
176  setClass("dCholCMatrix",  setClass("dCholCMatrix",
177           representation(perm = "integer", Parent = "integer", D = "numeric"),           representation(perm = "integer", Parent = "integer", D = "numeric"),
178           contains = "dtCMatrix",           contains = "dtCMatrix",
179           validity = function(object) .Call("dCholCMatrix_validate", object))           validity = function(object) .Call("dCholCMatrix_validate", object))
180    
181    ##-------------------- permutation ----------------------------------------
182    
183    setClass("pMatrix", representation(perm = "integer"), contains = "Matrix",
184             validity = function(object) {
185                 dd <- object@Dim
186                 n <- dd[1]
187                 perm <- object@perm
188                 if (dd[2] != n) return("pMatrix must be symmetric")
189                 if (length(perm) != n)
190                     return(paste("length of 'perm' slot must be", n))
191                 if (!(all(range(perm) == c(1, n)) && length(unique(perm)) == n))
192                     return("'perm' slot is not a valid permutation")
193                 TRUE
194             })
195    
196  ## --------------------- non-"Matrix" Classes --------------------------------  ## --------------------- non-"Matrix" Classes --------------------------------
197    

Legend:
Removed from v.637  
changed lines
  Added in v.638

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