23 
keep triangular and symmetric Matrices when appropriate: 
keep triangular and symmetric Matrices when appropriate: 
24 
particularly desirable for "Math2": round(), signif() 
particularly desirable for "Math2": round(), signif() 
25 


26 

For triangular matrices, more specifically make sure the four rules of 
27 

"triangular matrix algebra" (Golub+Van Loan 1996, 3.1.8, p.93) are 
28 

fulfilled; now(20080306) ok for Csparse; not yet for <dtr> %*% <dtr> 
29 


30 
 "d" <> "l" coercion for all "[TCR]" sparse matrices is really trivial: 
 "d" <> "l" coercion for all "[TCR]" sparse matrices is really trivial: 
31 
"d" > "l" : drops the 'x' slot 
"d" > "l" : drops the 'x' slot 
32 
"l" > "d" : construct an 'x' slot of all '1' 
"l" > "d" : construct an 'x' slot of all '1' 
116 
present factorization and rather uses one with more '0' in x slot. 
present factorization and rather uses one with more '0' in x slot. 
117 


118 
 diag(m) < val currently automatically works via m[cbind(i,i)] < val 
 diag(m) < val currently automatically works via m[cbind(i,i)] < val 
119 
However, 
This (`[<` method) is now "smart" for diagonalMatrix, but needs also to 
120 
we need methods for 'diag<' at least for diagonalMatrix, 
be for triangularMatrix, and probably also "dense*general*Matrix" since the 

triangularMatrix, and probably also "dense*general*Matrix" since the 

121 
above currently goes via "matrix" and back instead of using the 'x' slot 
above currently goes via "matrix" and back instead of using the 'x' slot 
122 
directly. 
directly; in particular, the triangular* "class property" is lost! 




 image(M, ..): Think about an optional smart option which keeps 


"0 > transparent" and allows colors to differentiate negative and 


positive entries. 

123 


124 
 examples for solve( Cholesky(.), b, system = c("A", "LDLt"....)) 
 examples for solve( Cholesky(.), b, system = c("A", "LDLt"....)) 
125 
probably rather in man/CHMfactorclass.Rd than man/Cholesky.Rd 
probably rather in man/CHMfactorclass.Rd than man/Cholesky.Rd 
126 


127 

 LDL(<CHMsimpl>) looks relatively easy; via "tCsparse_diag()" 
128 

{diagonal entries of *triangular* Csparse} 
129 

> see comment in determinant(<dsC>) in R/dsCMatrix.R, will give 
130 

faster determinant 
131 


132 
 tr(A %*% B) {and even tr(A %*% B %*% C) ...} are also needed 
 tr(A %*% B) {and even tr(A %*% B %*% C) ...} are also needed 
133 
frequently in some computations {conditional normal distr. ...}. 
frequently in some computations {conditional normal distr. ...}. 
134 
Since this can be done faster than by 
Since this can be done faster than by 
145 


146 
This is not really acceptable and currently influences rcond() as well. 
This is not really acceptable and currently influences rcond() as well. 
147 



 chol() and qr() generic: currently have *two* arguments, and give the msg 





> New generic for "chol" does not agree with implicit generic from package 


> "base"; a new generic will be assigned with package "Matrix" 





(and ditto for "qr") 





It was mentioned by an Rcore member that he thought it did not make 


sense to also dispatch on 'tol' or 'pivot' ... > maybe change that.. 




148 
 eigen() should become generic, and get a method at least for diagonal, 
 eigen() should become generic, and get a method at least for diagonal, 
149 
but also for symmetric > dsyMatrix [LAPACK dsyev() uses UPLO !], 
but also for symmetric > dsyMatrix [LAPACK dsyev() uses UPLO !], 
150 
but also simply for dgeMatrix (without going via tradition matrices). 
but also simply for dgeMatrix (without going via tradition matrices). 
161 
Consider going via asTuniq() or something very close to 
Consider going via asTuniq() or something very close to 
162 
.Arith.Csparse() in R/Ops.R 
.Arith.Csparse() in R/Ops.R 
163 


164 
 grep for '*HORRENDOUSLY* slow' in tests/simple.R 
 many setAs(*, "[dl]..Matrix") are still needed, as long as e.g. 
165 
and do better than 
replCmat() uses as_CspClass() and drop0(.) which itself call 
166 
unlist(lapply(seq_len(m), function(j) x[i1[j], i2[j]])) 
as_CspClass() quite a bit. > try to replace these by 
167 
in R/Matrix.R 
as(*, "CsparseMatrix"); forceSymmetric, etc. 
168 
> now fixed for sparseMatrices : 'ss < slp[ij]' in tests/simple.R 

169 

 implement fast diag(<triangularCsparse>) via calling new 
170 
But need similar fix for m[ <ijmatrix> ] < value 
src/Csparse.c's diag_tC_ptr() 
171 
and the same for *dense* Matrices 

172 

 add examples (and tests!) for update(<CHMfactor>, ..) and 
173 

Cholesky(......, Imult), also tests for hidden {hence no examples} 
174 

ldetL2up() { R/CHMfactor.R } 
175 


176 

 chol(<nsCMatrix>) gives "temporarily disabled" 
177 

but should give the *symbolic* factorization; 
178 

similarly Cholesky(.) is not enabled 
179 


180 

 writeMM(obj, file=stdout()) creates file "1" since file is silently 
181 

assumed to be a string, i.e. cannot be a connection. 
182 

An R (instead of C) version should be pretty simple, and would work with 
183 

connections automatically ["lsparse" become either "real" or 
184 

"pattern", "depending if they have NAs or not]. 