SCM

SCM Repository

[matrix] Diff of /pkg/Matrix/TODO
ViewVC logotype

Diff of /pkg/Matrix/TODO

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

revision 2111, Thu Jan 31 17:06:57 2008 UTC revision 2112, Mon Feb 18 08:24:46 2008 UTC
# Line 1  Line 1 
1  Check for DimNames propagation in coercion and other operations.  - Check for DimNames propagation in coercion and other operations.
2  ------  
3  - Report the problem in the Linux ldexp manual page.  The second and  - Report the problem in the Linux ldexp manual page.  The second and
4    third calls in the Synopsis should be to ldexpf and ldexpl.    third calls in the Synopsis should be to ldexpf and ldexpl.
5    
 - [,] indexing: for sparse "works", but not yet for negative indices!  
   
 - consider moving alloc3Darray from ./src/Mutils.c to  
   $(RSRC)/src/base/array.c  
 ------  
6  - provide methods for "dspMatrix" and "dppMatrix"!  - provide methods for "dspMatrix" and "dppMatrix"!
7    
8  - implement (more) methods for supporting "packed" (symmetric / triangular)  - implement (more) methods for supporting "packed" (symmetric / triangular)
# Line 16  Line 11 
11    
12    (have some dtr* <-> dtp*)    (have some dtr* <-> dtp*)
13    
 -----  
   
14  - combine the C functions for multiplication by special forms and  - combine the C functions for multiplication by special forms and
15    solution wrt special forms by using a 'right' argument and a    solution wrt special forms by using a 'right' argument and a
16    'classed' argument.    'classed' argument.
17     [done with dgeMatrix_matrix_mm();  not yet for other classes;     [done with dgeMatrix_matrix_mm();  not yet for other classes;
18      and for _crossprod()]      and for _crossprod()]
19    
 - add more comprehensive examples / tests for Schur decomposition  
   
 - arithmetic for sparse matrices:  
              <sparseMatrix>  o  <same-dim-sparseMatrix>  
   should return a sparse matrix  for at least "+" and "*" , also %%,  
   and "/" and "%/%" at least when the RHS is non-zero a scalar.  
   Challenge: nice implementation (``common non-0''; but Tsparse* is not uniq).  
   
20  -----  -----
21    
22  - "Math2" , "Math", "Arith":  - "Math2" , "Math", "Arith":
# Line 72  Line 57 
57    str(H6 <- as(h6, "dspMatrix"))       # has lost factor    str(H6 <- as(h6, "dspMatrix"))       # has lost factor
58    ## and the same in a similar situation involving  "dpo", "dpp"    ## and the same in a similar situation involving  "dpo", "dpp"
59    
 - Things like  M[upper.tri(M)] are not really most useful for  sparse  
   matrices.  --> provide generic functions  
   upperTriMatrix(), lowerTriMatrix()  both with argument  'diag = TRUE'  
   (which can be set to FALSE of course) which are used to extract a  
   triangle from an arbitrary sparse matrix and  return a  "dtCMatrix".  
   
60  - Factorizations: LU done; also Schur()  for  *sparse*  Matrices.  - Factorizations: LU done; also Schur()  for  *sparse*  Matrices.
61    
 - band(), triu(), tril() for *all* including "matrix", not just sparse matrices  
   
62  - is.na() method for all our matrices [ ==> which(*, arr.ind=TRUE) might work ]  - is.na() method for all our matrices [ ==> which(*, arr.ind=TRUE) might work ]
63    
64  - use  .Call(Csparse_drop, M, tol) in more places,  - use  .Call(Csparse_drop, M, tol) in more places,
# Line 99  Line 76 
76  - make sure *all* group methods have (maybe "bail-out") setMethod for "Matrix".  - make sure *all* group methods have (maybe "bail-out") setMethod for "Matrix".
77    e.g. zapsmall(<pMatrix>) fails "badly"    e.g. zapsmall(<pMatrix>) fails "badly"
78    
 - speedup: pass class definition to non0ind() [check all calls ..]  
   
79  - sum(): implement methods which work for *all* our matrices.  - sum(): implement methods which work for *all* our matrices.
80    
81  - Implement  expand(.) for the Cholesky() results  - Implement  expand(.) for the Cholesky() results
82    "dCHMsimpl" and  "dCHMsuper"  -- currently have no *decent* way to get at    "dCHMsimpl" and  "dCHMsuper"  -- currently have no *decent* way to get at
83    the matrix factors of the corresponding matrix factorization !!    the matrix factors of the corresponding matrix factorization !!
84    
85  - rbind(<sparse>, <dense>) does not work  (e.g. <dgC>, <dge>)  - rbind2(<sparse>, <dense>) does not work  (e.g. <dgC>, <dge>)
   
 - make sure  M[FALSE, FALSE]  works for all Matrices  
   {e.g. fails for M <- Diagonal(4)}  
86    
87  - <sparse> %*% <dense>  {also in crossprod/tcrossprod}  currently always  - <sparse> %*% <dense>  {also in crossprod/tcrossprod}  currently always
88    returns <dense>, since --> Csparse_dense_prod --> cholmod_sdmult    returns <dense>, since --> Csparse_dense_prod --> cholmod_sdmult
# Line 125  Line 97 
97    
98  - Diagonal(n) %*% A ---  too slow!! --> ~/R/MM/Pkg-ex/Matrix/diag-Tamas-ex.R  - Diagonal(n) %*% A ---  too slow!! --> ~/R/MM/Pkg-ex/Matrix/diag-Tamas-ex.R
99    
 - For a square sparse matrix 'b' {typically dgCMatrix or dgTMatrix},  
   we'd want a function  "Mat_plus_t_Mat" <- function(b) {....}  
   which computes the symmetric sparse matrix   b + t(b)  
   in way that never works with size-doubled vectors from  b@i etc..  
   
100  - ! <symmetricMatrix>  loses symmetry, both for dense and sparse matrices.  - ! <symmetricMatrix>  loses symmetry, both for dense and sparse matrices.
101    !M  where M is "sparseMatrix", currently always gives dense. This only    !M  where M is "sparseMatrix", currently always gives dense. This only
102    makes sense when M is ``really sparse''.    makes sense when M is ``really sparse''.
# Line 158  Line 125 
125  - examples for solve( Cholesky(.), b, system = c("A", "LDLt"....))  - examples for solve( Cholesky(.), b, system = c("A", "LDLt"....))
126    probably rather in man/CHMfactor-class.Rd than man/Cholesky.Rd    probably rather in man/CHMfactor-class.Rd than man/Cholesky.Rd
127    
 - (A + tr(A))/2  := the symmetric part of A, is needed in several  
   circumstances; unfortunately it's not "smart" (preserving symmetry, ...)  
   --> define a generic and methods for it!  
   Names:  symPart(A) or  symMat(A) or symmetrize(A) or ... ?  
   Googling around I found that Nick Higham has a GPL contributed Matlab  
   toolbox where he uses  symmpart(A) := (A + A') /. 2  
   {and  skewpart(A) := (A - A') /. 2}  
   
128  - tr(A %*% B) {and even  tr(A %*% B %*% C) ...} are also needed  - tr(A %*% B) {and even  tr(A %*% B %*% C) ...} are also needed
129    frequently in some computations {conditional normal distr. ...}.    frequently in some computations {conditional normal distr. ...}.
130    Since this can be done faster than by    Since this can be done faster than by
# Line 182  Line 141 
141    
142    This is not really acceptable and currently influences  rcond() as well.    This is not really acceptable and currently influences  rcond() as well.
143    
144  - chol() and qr() generic:  currently have *two* arguments, and give  - chol() and qr() generic:  currently have *two* arguments, and give the msg
145    
146      >  New generic for "chol" does not agree with implicit generic from package
147      >  "base"; a new generic will be assigned with package "Matrix"
148    
   New generic for "chol" does not agree with implicit generic from package  
   "base"; a new generic will be assigned with package "Matrix"  
149    (and ditto for "qr")    (and ditto for "qr")
150    
151    It was mentioned by an R-core member that he thought it did not make    It was mentioned by an R-core member that he thought it did not make
# Line 201  Line 161 
161    
162  - facmul() has no single method defined;  it looks like a good idea though  - facmul() has no single method defined;  it looks like a good idea though
163    (instead of the infamous qr.qy, qr.qty,.... functions)    (instead of the infamous qr.qy, qr.qty,.... functions)
164    
165    - symmpart() and skewpart()  for *sparse* matrices still use (x +/- t(x))/2
166      and could be made more efficient.
167      Consider going via  asTuniq() or something very close to
168      .Arith.Csparse() in R/Ops.R
169    
170    - grep for '*HORRENDOUSLY* slow' in tests/simple.R
171      and do better than
172            unlist(lapply(seq_len(m), function(j) x[i1[j], i2[j]]))
173      in R/Matrix.R
174      --> now fixed for sparseMatrices : 'ss <- slp[ij]' in tests/simple.R
175    
176      But need similar fix for  m[ <ij-matrix> ] <- value
177      and the same for *dense* Matrices

Legend:
Removed from v.2111  
changed lines
  Added in v.2112

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