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 2896, Sun Sep 1 18:50:16 2013 UTC revision 2897, Mon Sep 2 15:46:24 2013 UTC
# Line 1  Line 1 
1  ##-*- mode: org -*-  ##-*- mode: org -*-
2    
3  * *Urgent* in some sense ------------------------------------------------------  * *Urgent* in some sense ---------------------------------------------------
4  ** TODO src/CHOLMOD/MatrixOps/cholmod_symmetry.c  is "cool" and fast;  ** TODO src/CHOLMOD/MatrixOps/cholmod_symmetry.c  is "cool" and fast;
5  Definitely should use it for solve(<dgCMatrix>)  {it seems MATLAB does};  Definitely should use it for solve(<dgCMatrix>)  {it seems MATLAB does};
6  alternatively also is_sym() [in src/cs_utils.c], see below.  alternatively also is_sym() [in src/cs_utils.c], see below.
7  ** diagonalMatrix inherits from sparseMatrix, *BUT*  ** TODO diagonalMatrix inherits from sparseMatrix, *BUT*
8  "ddiMatrix" does not inherit from "dsparseMatrix", nor does  "ddiMatrix" does not inherit from "dsparseMatrix", nor does
9  "ldiMatrix" from "lparseMatrix".   Seems an undesirable inconsistency   "ldiMatrix" from "lparseMatrix".   Seems an undesirable inconsistency.
10  ** Look at Paul Bailey's problem -- CHOLMOD error (even seg.fault for him)    Try changing
11       setClass("ddiMatrix", contains = c("diagonalMatrix", "dMatrix"))
12      to
13       setClass("ddiMatrix", contains = c("diagonalMatrix", "dsparseMatrix"))
14    
15    ** TODO Look at Paul Bailey's problem -- CHOLMOD error (even seg.fault for him)
16    --> ~/R/MM/Pkg-ex/Matrix/sparseOrderedLogit.R    --> ~/R/MM/Pkg-ex/Matrix/sparseOrderedLogit.R
17  ** BunchKaufman()'s result is not really useful yet {but it is used on C  ** TODO BunchKaufman()'s result is not really useful yet {but it is used on C
18   level e.g. for solve(<dsyMatrix>).   Should define  expand() method or   level e.g. for solve(<dsyMatrix>).   Should define  expand() method or
19   similar, see man/BunchKaufman-methods.Rd and R/dsyMatrix.R (at end).   similar, see man/BunchKaufman-methods.Rd and R/dsyMatrix.R (at end).
20  ** src/cs_utils.c : I think is_sym() [only used in Matrix_cs_to_SEXP()] can be made sped up:  ** TODO src/cs_utils.c : I think is_sym() [only used in Matrix_cs_to_SEXP()] can be made sped up:
21  leave the for loops, as soon as is_lower == is_upper == 0.  leave the for loops, as soon as is_lower == is_upper == 0.
22    
23    * New smallish ideas, relatively urgent for MM -----------------------------
24    ** TODO new "indMatrix" class from Fabian:
25      generalize it to allow 0 repetitions, of some samples, i.e., columns of
26      all 0 s.
27      It's mathematically more natural... --> typically will be useful somewhere.
28    
29  * New smallish ideas, relatively urgent for MM --------------------------------  ** TODO Investigate the "band changing (and getting) ideas  'band<-' etc,
   
 - Investigate the "band changing (and getting) ideas  'band<-' etc,  
30    from Jeremy D Silver, per posts to R-devel on Aug.26,2011    from Jeremy D Silver, per posts to R-devel on Aug.26,2011
31    {MM: ~/R/MM/Pkg-ex/Matrix/bands-Jeremy_Silver-ex.R }    {MM: ~/R/MM/Pkg-ex/Matrix/bands-Jeremy_Silver-ex.R }
32    
33  - cbind2() / rbind2() for sparseMatrices: dimnames propagation should  ** TODO FIXME(2) and (3) in R/products.R: t(.Call(Csparse_dense_*))
34    ** TODO cbind2() / rbind2() for sparseMatrices: dimnames propagation should
35    happen in C, see  R/bind2.R and src/Csparse.c (Csparse_horzcat etc).    happen in C, see  R/bind2.R and src/Csparse.c (Csparse_horzcat etc).
36    
37  - Check for DimNames propagation in coercion and other operations.  ** TODO Check for DimNames propagation in coercion and other operations.
38    Done for (%*%, crossprod, tcrossprod).    Done for (%*%, crossprod, tcrossprod).
39    
40  - Report the problem in the Linux ldexp manual page.  The second and  ** TODO Report the problem in the Linux ldexp manual page.  The second and
41    third calls in the Synopsis should be to ldexpf and ldexpl.    third calls in the Synopsis should be to ldexpf and ldexpl.
42    
43  - provide methods for "dspMatrix" and "dppMatrix"!  ** TODO provide methods for "dspMatrix" and "dppMatrix"!
44    2012-07: mostly(?) DONE, with Ops, etc, also pack() / unpack()    2012-07: mostly(?) DONE, with Ops, etc, also pack() / unpack()
45    
46  - combine the C functions for multiplication by special forms and  ** TODO combine the C functions for multiplication by special forms and
47    solution wrt special forms by using a 'right' argument and a    solution wrt special forms by using a 'right' argument and a
48    'classed' argument.    'classed' argument.
49     [done with dgeMatrix_matrix_mm();  not yet for other classes;     [done with dgeMatrix_matrix_mm();  not yet for other classes;
50      and for _crossprod()]      and for _crossprod()]
51    
52  * Generalization of Existing Classes and Methods --------------------------  ** DONE Cache '@factors' components also from R, e.g., for "Tsparse.."
53       via .set.factors()
54  - "Math2" , "Math", "Arith":  ** TODO chol() and Cholesky() caching unfinished: the *name* [Ss][Pp][Dd]Cholesky
55     keep triangular and symmetric Matrices when appropriate:     depends on (perm, LDL, super) arguments:
56    *** DONE .chkName.CHM(name, perm, LDL, super) and .CHM.factor.name()
57    *** TODO use the above
58    ** TODO new arg 'cache=FALSE': allow  cache=FALSE to disable the caching
59    * Generalization of Existing Classes and Methods ---------------------------
60    ** TODO "Math2" , "Math", "Arith": keep triangular and symmetric
61     Matrices when appropriate:
62     particularly desirable for  "Math2": round(), signif()     particularly desirable for  "Math2": round(), signif()
63    ** TODO For triangular matrices, ensure the four rules of "triangular matrix algebra"
64  - For triangular matrices, make sure the four rules of    (Golub+Van Loan 1996, 3.1.8, p.93)"
65    "triangular matrix algebra" (Golub+Van Loan 1996, 3.1.8, p.93) are fulfilled.  *** DONE since 2008-03-06 for Csparse
66    - since 2008-03-06 ok for Csparse  *** DONE since 2010-07-23 for <dtr> %*% <dtr>
67    - since 2010-07-23 ok for <dtr> %*% <dtr>  *** TODO e.g. for  <ltr> %*% <dtC>
68    TODO: e.g. for  <ltr> %*% <dtC>  ** TODO "d" <-> "l" coercion for all "[TCR]" sparse matrices is really trivial:
   
 - "d" <-> "l" coercion for all "[TCR]" sparse matrices is really trivial:  
69    "d" -> "l" : drops the 'x' slot    "d" -> "l" : drops the 'x' slot
70    "l" -> "d" : construct an 'x' slot of all '1'    "l" -> "d" : construct an 'x' slot of all '1'
71    We currently have many of these conversions explicitly, e.g.    We currently have many of these conversions explicitly, e.g.
# Line 64  Line 77 
77    for all  "dsparse*" -> "lsparse*" and vice versa.    for all  "dsparse*" -> "lsparse*" and vice versa.
78    How can one do this {in a documented way} ?    How can one do this {in a documented way} ?
79    
80  - Think of constructing  setAs(...) calls automatically in order to  ** TODO Think of constructing  setAs(...) calls automatically in order to
81    basically enable all ``sensible'' as(fromMatrix, toMatrix)  calls,    basically enable all ``sensible'' as(fromMatrix, toMatrix)  calls,
82    possibly using canCoerce(.)    possibly using canCoerce(.)
83    
84  - When we have a packed matrix, it's a waste to go through "full" to "sparse":  ** TODO When we have a packed matrix, it's a waste to go through "full" to "sparse":
85    ==> implement    ==> implement
86          setAs("dspMatrix", "sparseMatrix")          setAs("dspMatrix", "sparseMatrix")
87          setAs("dppMatrix", "sparseMatrix")          setAs("dppMatrix", "sparseMatrix")
88          setAs("dtpMatrix", "sparseMatrix")          setAs("dtpMatrix", "sparseMatrix")
89    and the same for "lsp" , "ltp"  and  "nsp" , "ntp" !    and the same for "lsp" , "ltp"  and  "nsp" , "ntp" !
90    
91  - tcrossprod(x, y) : do provide methods for y != NULL  ** TODO tcrossprod(x, y) : do provide methods for y != NULL
92    calling Lapack's DGEMM for "dense"    calling Lapack's DGEMM for "dense"
93    [2005-12-xx: done for dgeMatrix at least]    [2005-12-xx: done for dgeMatrix at least]
94    
95  - Factorizations: LU done; also Schur()  for  *sparse*  Matrices.  ** TODO Factorizations: LU done; also Schur()  for  *sparse*  Matrices.
96    
97  - use  .Call(Csparse_drop, M, tol) in more places,  ** TODO use  .Call(Csparse_drop, M, tol) in more places,
98    both with 'tol = 0.' to drop "values that happen to be 0" and for    both with 'tol = 0.' to drop "values that happen to be 0" and for
99    zapsmall() methods for Csparse*    zapsmall() methods for Csparse*
100    
101  - implement .Call(Csparse_scale, ....) interfacing to cholmod_scale()  ** TODO implement .Call(Csparse_scale, ....) interfacing to cholmod_scale()
102    in src/CHOLMOD/Include/cholmod_matrixops.h : for another function    in src/CHOLMOD/Include/cholmod_matrixops.h : for another function
103    specifically for multiplying a cholmod_sparse object by a diagonal matrix.    specifically for multiplying a cholmod_sparse object by a diagonal matrix.
104    Use it in %*% and [t]crossprod methods.    Use it in %*% and [t]crossprod methods.
105    
106  - make sure *all* group methods have (maybe "bail-out") setMethod for "Matrix".  ** TODO make sure *all* group methods have (maybe "bail-out") setMethod for "Matrix".
107    e.g. zapsmall(<pMatrix>) fails "badly"    e.g. zapsmall(<pMatrix>) fails "badly"
108    
109  - rbind2(<sparse>, <dense>) does not work  (e.g. <dgC>, <dge>)  ** TODO rbind2(<sparse>, <dense>) does not work  (e.g. <dgC>, <dge>)
110    
111  - <sparse> %*% <dense>  {also in crossprod/tcrossprod}  currently always  ** TODO <sparse> %*% <dense>  {also in crossprod/tcrossprod}  currently always
112    returns <dense>, since --> Csparse_dense_prod --> cholmod_sdmult    returns <dense>, since --> Csparse_dense_prod --> cholmod_sdmult
113    and that does only return dense.    and that does only return dense.
114    When the sparse matrix is very sparse, i.e. has many rows with only zero    When the sparse matrix is very sparse, i.e. has many rows with only zero
115    entries, it would make much sense to return sparse.    entries, it would make much sense to return sparse.
116    
117  - ! <symmetricMatrix>  loses symmetry, both for dense and sparse matrices.  ** TODO ! <symmetricMatrix>  loses symmetry, both for dense and sparse matrices.
118    !M  where M is "sparseMatrix", currently always gives dense. This only    !M  where M is "sparseMatrix", currently always gives dense. This only
119    makes sense when M is ``really sparse''.    makes sense when M is ``really sparse''.
120    
121  - diag(m) <- val    currently automatically works via  m[cbind(i,i)] <- val  ** TODO diag(m) <- val currently automatically works via  m[cbind(i,i)] <- val
122    This (`[<-` method) is now "smart" for diagonalMatrix, but needs also to    This (`[<-` method) is now "smart" for diagonalMatrix, but needs also to
123    be for triangularMatrix, and probably also "dense*general*Matrix" since the    be for triangularMatrix, and probably also "dense*general*Matrix" since the
124    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
125    directly; in particular, the triangular* "class property" is lost!    directly; in particular, the triangular* "class property" is lost!
126    [current ??]    [current ??]
127    
128  - The "[<-" now uses  src/t_Csparse_subassign.c and no longer explodes  ** TODO The "[<-" now uses  src/t_Csparse_subassign.c and no longer explodes
129    memory.  *However* it is still too slow when the replacment region is large.    memory.  *However* it is still too slow when the replacment region is large.
130    
131  * Cholesky(), chol() etc ------------------  * Cholesky(), chol() etc ---------------------------------------------------
132    ** chol() should ``work'': proper result or "good" error message.
 - chol() should ``work'': proper result or "good" error message.  
133    (mostly done ?)    (mostly done ?)
134    
135  - example(Cholesky, echo=FALSE) ; cm <- chol(mtm); str(cm); str(mtm)  ** example(Cholesky, echo=FALSE) ; cm <- chol(mtm); str(cm); str(mtm)
136    
137    shows that chol() does not seem to make use of an already    shows that chol() does not seem to make use of an already
138    present factorization and rather uses one with more '0' in x slot.    present factorization and rather uses one with more '0' in x slot.
139    
140  - examples for solve( Cholesky(.), b, system = c("A", "LDLt"....))  ** examples for solve( Cholesky(.), b, system = c("A", "LDLt"....))
141    probably rather in man/CHMfactor-class.Rd than man/Cholesky.Rd    probably rather in man/CHMfactor-class.Rd than man/Cholesky.Rd
142    
143  - LDL(<CHMsimpl>) looks relatively easy; via  "tCsparse_diag()"  ** LDL(<CHMsimpl>) looks relatively easy; via  "tCsparse_diag()"
144     {diagonal entries of *triangular* Csparse}     {diagonal entries of *triangular* Csparse}
145    --> see comment in determinant(<dsC>) in R/dsCMatrix.R, will give    --> see comment in determinant(<dsC>) in R/dsCMatrix.R, will give
146    faster determinant    faster determinant
147    
148  - Allow  Cholesky(A,..) when A is not symmetric *AND*  ** Allow  Cholesky(A,..) when A is not symmetric *AND*
149    we really _mean_ to factorize  AA' ( + beta * I)    we really _mean_ to factorize  AA' ( + beta * I)
150    
151  - update(Cholesky(..), *): make *also* use of the possibility to update  ** update(Cholesky(..), *): make *also* use of the possibility to update
152    with non-symmetric A and then  AA' + mult * I   is really meant.    with non-symmetric A and then  AA' + mult * I   is really meant.
153    .updateCHMfactor() ## allows that already(?)    .updateCHMfactor() ## allows that already(?)
154    
155  - add examples (and tests!) for update(<CHMfactor>, ..) and  ** TODO add examples (and tests!) for update(<CHMfactor>, ..) and
156    Cholesky(......, Imult), also tests for hidden {hence no examples}    Cholesky(......, Imult), also tests for hidden {hence no examples}
157    ldetL2up() { R/CHMfactor.R }; see ex in man/wrld_1deg.Rd    ldetL2up() { R/CHMfactor.R }; see ex in man/wrld_1deg.Rd
158    MM: See e.g. ~/R/MM/Pkg-ex/Matrix/CholUpdate.R -- for solve(<CHM>, <type>)    MM: See e.g. ~/R/MM/Pkg-ex/Matrix/CholUpdate.R -- for solve(<CHM>, <type>)
159    
160  - implement fast diag(<triangularCsparse>) via calling new  ** TODO implement fast diag(<triangularCsparse>) via calling new
161    src/Csparse.c's diag_tC_ptr() .    src/Csparse.c's diag_tC_ptr() .
162   -- diag_tC_ptr() functionality now exported via   - diag_tC_ptr() functionality now exported via
163    R/dsCMatrix.R   .diag.dsC() -- the name is silly, but    R/dsCMatrix.R   .diag.dsC() : the name is silly, but
164    functionality nice.  See (hidden) example in man/Cholesky.Rd    functionality nice.  See (hidden) example in man/Cholesky.Rd
165    
166  - chol(<nsCMatrix>)  gives "temporarily disabled"  ** TODO chol(<nsCMatrix>)  gives "temporarily disabled"
167    but should give the *symbolic* factorization;    but should give the *symbolic* factorization;
168    similarly Cholesky(.) is not enabled    similarly Cholesky(.) is not enabled
169    
170  * "Basic" new functionality -- "nice to have" (non-urgent)  * "Basic" new functionality -- "nice to have" (non-urgent) -----------------
171    ** TODO tr(A %*% B) {and even  tr(A %*% B %*% C) ...} are also needed
 - tr(A %*% B) {and even  tr(A %*% B %*% C) ...} are also needed  
172    frequently in some computations {conditional normal distr. ...}.    frequently in some computations {conditional normal distr. ...}.
173    Since this can be done faster than by    Since this can be done faster than by
174      sum(diag(A %*% B))  even for traditional matrices, e.g.      sum(diag(A %*% B))  even for traditional matrices, e.g.
# Line 166  Line 177 
177    and even more so for, e.g.  <sparse> %*% <dense>    and even more so for, e.g.  <sparse> %*% <dense>
178    {used in Soeren's 'gR' computations},    {used in Soeren's 'gR' computations},
179    we should also provide a generic and methods.    we should also provide a generic and methods.
180  - diag(A %*% B) might look like a "generalization" of tr(A %*% B),  ** TODO diag(A %*% B) might look like a "generalization" of tr(A %*% B),
181    but as the above tricks show, is not really.    but as the above tricks show, is not really.
182    Still, it's well worth to provide  diag.prod(A, B):    Still, it's well worth to provide  diag.prod(A, B):
183    
184    Well, if A %*% B is square,   diag(A %*% B)  ===  colSums(t(A) * B)    Well, if A %*% B is square,   diag(A %*% B)  ===  colSums(t(A) * B)
185    and we should probably teach people about that !    and we should probably teach people about that !
186    
187  - eigen() should become generic, and get a method at least for diagonal,  ** TODO eigen() should become generic, and get a method at least for diagonal,
188    but also for symmetric -> dsyMatrix  [LAPACK dsyev() uses UPLO !],    but also for symmetric -> dsyMatrix  [LAPACK dsyev() uses UPLO !],
189    but also simply for dgeMatrix (without going via tradition matrices).    but also simply for dgeMatrix (without going via tradition matrices).
190    What about Sparse?  There's fill-in, but it may still be sensible, e.g.    What about Sparse?  There's fill-in, but it may still be sensible, e.g.
# Line 181  Line 192 
192    ee <- eigen(tcrossprod(bdiag(lapply(mlist, as.matrix))))    ee <- eigen(tcrossprod(bdiag(lapply(mlist, as.matrix))))
193    Matrix( signif(ee$vectors, 3) )    Matrix( signif(ee$vectors, 3) )
194    
195  * Everything else aka "Miscellaneous" ----------------------------------------  * Everything else aka "Miscellaneous" --------------------------------------
196    ** qr.R(qr(x)) may differ for the "same" matrix, depending on it being
 - qr.R(qr(x)) may differ for the "same" matrix, depending on it being  
197    sparse or dense:    sparse or dense:
198      "qr.R(<sparse>) may differ from qr.R(<dense>) because of permutations"      "qr.R(<sparse>) may differ from qr.R(<dense>) because of permutations"
199    
200    This is not really acceptable and currently influences  rcond() as well.    This is not really acceptable and currently influences  rcond() as well.
201    
202  - 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
203    (instead of the infamous qr.qy, qr.qty,.... functions)    (instead of the infamous qr.qy, qr.qty,.... functions)
204    
205  - symmpart() and skewpart()  for *sparse* matrices still use (x +/- t(x))/2  ** TODO symmpart() and skewpart()  for *sparse* matrices still use (x +/- t(x))/2
206    and could be made more efficient.    and could be made more efficient.
207    Consider going via  asTuniq() or something very close to    Consider going via  asTuniq() or something very close to
208    .Arith.Csparse() in R/Ops.R    .Arith.Csparse() in R/Ops.R
209    For a traditional "matrix" object, we should speedup, using C code ..    For a traditional "matrix" object, we should speedup, using C code ..
210    
211  - many setAs(*, "[dl]..Matrix") are still needed, as long as e.g.  ** TODO many setAs(*, "[dl]..Matrix") are still needed, as long as e.g.
212    replCmat() uses as_CspClass() and drop0(.) which itself call    replCmat() uses as_CspClass() and drop0(.) which itself call
213    as_CspClass() quite a bit.  --> try to replace these by    as_CspClass() quite a bit.  --> try to replace these by
214    as(*, "CsparseMatrix"); forceSymmetric, etc.    as(*, "CsparseMatrix"); forceSymmetric, etc.
215    
216  - writeMM(obj, file=stdout()) creates file "1" since file is silently  ** writeMM(obj, file=stdout()) creates file "1" since file is silently
217    assumed to be a string, i.e. cannot be a connection.    assumed to be a string, i.e. cannot be a connection.
218    An R (instead of C) version should be pretty simple, and would work with    An R (instead of C) version should be pretty simple, and would work with
219    connections automatically ["lsparse" become either "real" or    connections automatically ["lsparse" become either "real" or
220    "pattern", "depending if they have NAs or not].    "pattern", "depending if they have NAs or not].
221    
222  - <diagMatrix> o <ddenseMatrix> still works via sparse in some cases, but  ** <diagMatrix> o <ddenseMatrix> still works via sparse in some cases, but
223    could return <diagMatrix> in the same cases where <diagMatrix> o <numeric> does.    could return <diagMatrix> in the same cases where <diagMatrix> o <numeric> does.
224    
225  - look at solve.QP.compact() in \pkg{quadprog} and how to do that using  ** look at solve.QP.compact() in \pkg{quadprog} and how to do that using
226    our sparse matrices.  Maybe this needs to be re-implemented using CHOLMOD    our sparse matrices.  Maybe this needs to be re-implemented using CHOLMOD
227    routines.    routines.
228    
229  - We allow "over-allocated" (i,x)-slots for CsparseMatrix objects,  ** We allow "over-allocated" (i,x)-slots for CsparseMatrix objects,
230    as per Csparse_validate() and the tests in tests/validObj.R. This is as    as per Csparse_validate() and the tests in tests/validObj.R. This is as
231    in CHOLMOD/CSparse, where nzmax (>= .@p[n]) corresponds to length(.@i),    in CHOLMOD/CSparse, where nzmax (>= .@p[n]) corresponds to length(.@i),
232    and makes sense e.g. for M[.,.] <- v  assignments which could allocate in    and makes sense e.g. for M[.,.] <- v  assignments which could allocate in
233    chunks and would not need to re-allocate anything in many cases.    chunks and would not need to re-allocate anything in many cases.
234    HOWEVER, replCmat() in R/Csparse.R is still far from making use of that.    HOWEVER, replCmat() in R/Csparse.R is still far from making use of that.
235    
236  - advertize  rbind2() / cbind2() and (rather?) rBind() / cBind()  ** TODO advertize  rbind2() / cbind2() and (rather?) rBind() / cBind()
237               ------                            -----               ------                            -----
238    in all vignettes / talks / ... !!    in all vignettes / talks / ... !!
239    People erronously try rbind/cbind see that they don't work and then    People erronously try rbind/cbind see that they don't work and then
# Line 233  Line 243 
243        cbind() and rbind() versions that work with Matrix.        cbind() and rbind() versions that work with Matrix.
244        The "Rmpfr" package does that now.        The "Rmpfr" package does that now.
245    
246  - In  all(M1 == M2)  for sparse large matrices M1, M2 (e.g. M2 <- M1 !),  ** TODO In  all(M1 == M2)  for sparse large matrices M1, M2 (e.g. M2 <- M1 !),
247    the intermediate 'M1 == M2' typically is dense, hence potentially using    the intermediate 'M1 == M2' typically is dense, hence potentially using
248    humongous amount of memory.    humongous amount of memory.
249    We should/could devise something like   allCompare(M1, M2, `==`)    We should/could devise something like   allCompare(M1, M2, `==`)
# Line 241  Line 251 
251    
252  --------  --------
253    
254  - Reconsider the linkages in the include files for the SuiteSparse  ** Reconsider the linkages in the include files for the SuiteSparse
255    packages.  It may be better simply to add all the src/<nm>/Include    packages.  It may be better simply to add all the src/<nm>/Include
256    directories to the include path for all compilations.  I don't think    directories to the include path for all compilations.  I don't think
257    there is a big overhead.  Right now we need to modify the include    there is a big overhead.  Right now we need to modify the include
# Line 249  Line 259 
259    to have src/UFsparse and src/CHOLMOD/Include on the include path.    to have src/UFsparse and src/CHOLMOD/Include on the include path.
260    Maybe just those two should be added to the include path.    Maybe just those two should be added to the include path.
261    
262  - (systematically check that LAPACK-calling functions check for  ** (systematically check that LAPACK-calling functions check for
263     0-dimensional input themselves; LAPACK gives an integer error code)     0-dimensional input themselves; LAPACK gives an integer error code)
264    
265  - the  f[,5762] <- thisCol  now go via Csparse_subassign() call ...  ** the  f[,5762] <- thisCol  now go via Csparse_subassign() call ...
266    [ in tests/indexing.R ].    [ in tests/indexing.R ].
267    Still would be nice to be able to use abIndex (see replTmat in R/Tsparse.R)    Still would be nice to be able to use abIndex (see replTmat in R/Tsparse.R)
268    
269  - {IS THIS CURRENT?}  ** {IS THIS CURRENT?}
270    Sept. 2009:    Sept. 2009:
271    Subject: chol2inv() |-> solve(<CHMfactor>)    Subject: chol2inv() |-> solve(<CHMfactor>)
272    
# Line 268  Line 278 
278    help for defining a chol2inv() method for  *sparse* (upper)    help for defining a chol2inv() method for  *sparse* (upper)
279    triangular matrices.    triangular matrices.
280    
281  - sort(<sparseVector>, partial=..), needed, for mean(*, trim = .) or median().  ** sort(<sparseVector>, partial=..), needed, for mean(*, trim = .) or median().
282    Note that defining xtfrm() does not "help" (as sort() then goes via dense    Note that defining xtfrm() does not "help" (as sort() then goes via dense
283    index).  See "mean" in R/Matrix.R    index).  See "mean" in R/Matrix.R
284    
285  - rcond(<sparseMatrix>) - for square currently goes via *dense* -- BAD --  ** TODO rcond(<sparseMatrix>)  for square currently goes via *dense* -- BAD --
286    can we go via qr() in any case?    can we go via qr() in any case?
287    In some cases, e.g. lmer()'s  "Lambda" (block triangular, small blocks)    In some cases, e.g. lmer()'s  "Lambda" (block triangular, small blocks)
288         rcond(L) :=  1 / (norm(L) * norm(solve(L)))         rcond(L) :=  1 / (norm(L) * norm(solve(L)))
289    is simple {and remains sparse, as solve(L) is still block triangular}    is simple {and remains sparse, as solve(L) is still block triangular}
290    
291  - How can we ensure that     inst/include/cholmod.h              remains  ** TODO How can we ensure that     inst/include/cholmod.h                remains
292    correct and equivalent to  src/CHOLMOD/Include/cholmod_core.h  and  siblings ???    correct and equivalent to  src/CHOLMOD/Include/cholmod_core.h  and  siblings ???
293    {currently need to do this manually (Emacs M-x compare-windows) for the   typedefs}    {currently need to do this manually (Emacs M-x compare-windows) for the   typedefs}
294    
295  - finalize and activate the new *unused* code in src/t_sparseVector.c  ** finalize and activate the new *unused* code in src/t_sparseVector.c
296    
297  - check all uses of  alloca()/Alloca() in  src/*.[ch]  ** check all uses of  alloca()/Alloca() in  src/*.[ch]
298    ensuring that the *size* allocated cannot grow with the    ensuring that the *size* allocated cannot grow with the
299    vector/matrix/nnzero sizes of the input.    vector/matrix/nnzero sizes of the input.
300    [see the change needed in svn r2770 in src/dtCMatrix.c !]    [see the change needed in svn r2770 in src/dtCMatrix.c !]

Legend:
Removed from v.2896  
changed lines
  Added in v.2897

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