SCM

SCM Repository

[matrix] Annotation of /pkg/TODO
ViewVC logotype

Annotation of /pkg/TODO

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2204 - (view) (download)

1 : maechler 2112 - Check for DimNames propagation in coercion and other operations.
2 :    
3 : bates 344 - Report the problem in the Linux ldexp manual page. The second and
4 :     third calls in the Synopsis should be to ldexpf and ldexpl.
5 : maechler 472
6 : maechler 634 - provide methods for "dspMatrix" and "dppMatrix"!
7 :    
8 : maechler 538 - implement (more) methods for supporting "packed" (symmetric / triangular)
9 : maechler 634 matrices; particularly something like pack() and unpack() [to/from our
10 :     classes from/to "numeric"] --- have already man/unpack.Rd but no method yet!
11 : maechler 538
12 : maechler 834 (have some dtr* <-> dtp*)
13 :    
14 : bates 645 - combine the C functions for multiplication by special forms and
15 :     solution wrt special forms by using a 'right' argument and a
16 :     'classed' argument.
17 : maechler 675 [done with dgeMatrix_matrix_mm(); not yet for other classes;
18 :     and for _crossprod()]
19 :    
20 : bates 1578 -----
21 : bates 712
22 : maechler 935 - "Math2" , "Math", "Arith":
23 :     keep triangular and symmetric Matrices when appropriate:
24 :     particularly desirable for "Math2": round(), signif()
25 : maechler 956
26 : maechler 2120 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 : maechler 2125 fulfilled; now(2008-03-06) ok for Csparse; not yet for <dtr> %*% <dtr>
29 : maechler 2120
30 : maechler 956 - "d" <-> "l" coercion for all "[TCR]" sparse matrices is really trivial:
31 :     "d" -> "l" : drops the 'x' slot
32 :     "l" -> "d" : construct an 'x' slot of all '1'
33 :     We currently have many of these conversions explicitly, e.g.
34 :     setAs("dsTMatrix", "lsTMatrix",
35 :     function(from) new("lsTMatrix", i = from@i, j = from@j, uplo = from@uplo,
36 :     Dim = from@Dim, Dimnames = from@Dimnames))
37 :     but I would rather want to automatically construct all these coercion
38 :     methods at once by a ``method constructor'', i.e.,
39 :     for all "dsparse*" -> "lsparse*" and vice versa.
40 :     How can one do this {in a documented way} ?
41 : maechler 1087
42 : maechler 2048 - Think of constructing setAs(...) calls automatically in order to
43 :     basically enable all ``sensible'' as(fromMatrix, toMatrix) calls,
44 :     possibly using canCoerce(.)
45 :    
46 :     - setAs(<Mcl>, "[dln]Matrix") for <Mcl> in {Matrix or denseMatrix + sparseMatrix}
47 :    
48 :     - When we have a packed matrix, it's a waste to go through "full" to "sparse":
49 :     ==> implement
50 :     setAs("dspMatrix", "sparseMatrix")
51 :     setAs("dppMatrix", "sparseMatrix")
52 :     setAs("dtpMatrix", "sparseMatrix")
53 :     and the same for "lsp" , "ltp" and "nsp" , "ntp" !
54 :    
55 : maechler 1097 - tcrossprod(x, y) : do provide methods for y != NULL
56 :     calling Lapack's DGEMM for "dense"
57 : maechler 1109 [2005-12-xx: done for dgeMatrix at least]
58 :    
59 : maechler 1201 - BUGlet: Shouldn't lose factorization here:
60 :     h6 <- Hilbert(6); chol(h6) ; str(h6) # has factor
61 :     str(H6 <- as(h6, "dspMatrix")) # has lost factor
62 :     ## and the same in a similar situation involving "dpo", "dpp"
63 : maechler 1226
64 : maechler 1592 - Factorizations: LU done; also Schur() for *sparse* Matrices.
65 : maechler 1253
66 : maechler 1575 - is.na() method for all our matrices [ ==> which(*, arr.ind=TRUE) might work ]
67 : maechler 1592
68 : maechler 1619 - use .Call(Csparse_drop, M, tol) in more places,
69 :     both with 'tol = 0.' to drop "values that happen to be 0" and for
70 :     zapsmall() methods for Csparse*
71 : maechler 1654
72 :     - implement .Call(Csparse_scale, ....) interfacing to cholmod_scale()
73 :     in src/CHOLMOD/Include/cholmod_matrixops.h : for another function
74 :     specifically for multiplying a cholmod_sparse object by a diagonal matrix.
75 :     Use it in %*% and [t]crossprod methods.
76 :    
77 : mmaechler 2193 - chol() should ``work'': proper result or "good" error message.
78 : maechler 1659
79 : maechler 1714 - make sure *all* group methods have (maybe "bail-out") setMethod for "Matrix".
80 :     e.g. zapsmall(<pMatrix>) fails "badly"
81 : maechler 1725
82 : maechler 1738 - Implement expand(.) for the Cholesky() results
83 :     "dCHMsimpl" and "dCHMsuper" -- currently have no *decent* way to get at
84 :     the matrix factors of the corresponding matrix factorization !!
85 :    
86 : maechler 2112 - rbind2(<sparse>, <dense>) does not work (e.g. <dgC>, <dge>)
87 : maechler 1799
88 : maechler 1833 - <sparse> %*% <dense> {also in crossprod/tcrossprod} currently always
89 :     returns <dense>, since --> Csparse_dense_prod --> cholmod_sdmult
90 :     and that does only return dense.
91 :     When the sparse matrix is very sparse, i.e. has many rows with only zero
92 :     entries, it would make much sense to return sparse.
93 :    
94 :     - sparse-symmetric + diagonal should stay sparse-symmetric
95 :     (only stays sparse): Matrix(0, 4, 4) + Diagonal(4, 1:4)
96 : maechler 1845 --> R/diagMatrix.R ('FIXME')
97 :     but also R/Ops.R to ensure sp-sym. + sp-sym. |-> sp-sym. etc
98 : maechler 1833
99 :     - ! <symmetricMatrix> loses symmetry, both for dense and sparse matrices.
100 :     !M where M is "sparseMatrix", currently always gives dense. This only
101 :     makes sense when M is ``really sparse''.
102 : maechler 1855
103 : maechler 2018 - example(Cholesky, echo=FALSE) ; cm <- chol(mtm); str(cm); str(mtm)
104 :    
105 :     shows that chol() does not seems to make use of an already
106 :     present factorization and rather uses one with more '0' in x slot.
107 :    
108 : maechler 2005 - diag(m) <- val currently automatically works via m[cbind(i,i)] <- val
109 : maechler 2115 This (`[<-` method) is now "smart" for diagonalMatrix, but needs also to
110 :     be for triangularMatrix, and probably also "dense*general*Matrix" since the
111 : maechler 2005 above currently goes via "matrix" and back instead of using the 'x' slot
112 : maechler 2115 directly; in particular, the triangular* "class property" is lost!
113 : maechler 2043
114 :     - examples for solve( Cholesky(.), b, system = c("A", "LDLt"....))
115 :     probably rather in man/CHMfactor-class.Rd than man/Cholesky.Rd
116 : maechler 2072
117 : maechler 2137 - LDL(<CHMsimpl>) looks relatively easy; via "tCsparse_diag()"
118 :     {diagonal entries of *triangular* Csparse}
119 :     --> see comment in determinant(<dsC>) in R/dsCMatrix.R, will give
120 :     faster determinant
121 :    
122 : maechler 2072 - tr(A %*% B) {and even tr(A %*% B %*% C) ...} are also needed
123 :     frequently in some computations {conditional normal distr. ...}.
124 :     Since this can be done faster than by
125 :     sum(diag(A %*% B)) even for traditional matrices, e.g.
126 :     sum(A * t(B)) or {even faster for "full" mat}
127 :     crossprod(as.vector(A), as.vector(B))
128 :     and even more so for, e.g. <sparse> %*% <dense>
129 :     {used in Soeren's 'gR' computations},
130 :     we should also provide a generic and methods.
131 : maechler 2103
132 :     - qr.R(qr(x)) may differ for the "same" matrix, depending on it being
133 :     sparse or dense:
134 :     "qr.R(<sparse>) may differ from qr.R(<dense>) because of permutations"
135 :    
136 :     This is not really acceptable and currently influences rcond() as well.
137 : maechler 2105
138 : maechler 2106 - eigen() should become generic, and get a method at least for diagonal,
139 :     but also for symmetric -> dsyMatrix [LAPACK dsyev() uses UPLO !],
140 :     but also simply for dgeMatrix (without going via tradition matrices).
141 :     What about Sparse? There's fill-in, but it may still be sensible, e.g.
142 :     mlist <- list(1, 2:3, diag(x=5:3), 27, cbind(1,3:6), 100:101)
143 :     ee <- eigen(tcrossprod(bdiag(lapply(mlist, as.matrix))))
144 :     Matrix( signif(ee$vectors, 3) )
145 :    
146 :     - facmul() has no single method defined; it looks like a good idea though
147 :     (instead of the infamous qr.qy, qr.qty,.... functions)
148 : maechler 2112
149 :     - symmpart() and skewpart() for *sparse* matrices still use (x +/- t(x))/2
150 :     and could be made more efficient.
151 :     Consider going via asTuniq() or something very close to
152 :     .Arith.Csparse() in R/Ops.R
153 :    
154 : maechler 2115 - many setAs(*, "[dl]..Matrix") are still needed, as long as e.g.
155 :     replCmat() uses as_CspClass() and drop0(.) which itself call
156 :     as_CspClass() quite a bit. --> try to replace these by
157 :     as(*, "CsparseMatrix"); forceSymmetric, etc.
158 : maechler 2151
159 : maechler 2154 - implement fast diag(<triangularCsparse>) via calling new
160 :     src/Csparse.c's diag_tC_ptr()
161 :    
162 : maechler 2151 - add examples (and tests!) for update(<CHMfactor>, ..) and
163 :     Cholesky(......, Imult), also tests for hidden {hence no examples}
164 :     ldetL2up() { R/CHMfactor.R }
165 : maechler 2154
166 :     - chol(<nsCMatrix>) gives "temporarily disabled"
167 :     but should give the *symbolic* factorization;
168 :     similarly Cholesky(.) is not enabled
169 : mmaechler 2175
170 :     - writeMM(obj, file=stdout()) creates file "1" since file is silently
171 :     assumed to be a string, i.e. cannot be a connection.
172 :     An R (instead of C) version should be pretty simple, and would work with
173 :     connections automatically ["lsparse" become either "real" or
174 :     "pattern", "depending if they have NAs or not].
175 : mmaechler 2196
176 :     - <diagMatrix> o <ddenseMatrix> currently works via sparse, but
177 :     should return <diagMatrix> in the same cases where
178 :     <diagMatrix> o <numeric> does.

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