comparison doc/interpreter/sparse.txi @ 7515:f3c00dc0912b

Eliminate the rest of the dispatched sparse functions
author David Bateman <dbateman@free.fr>
date Fri, 22 Feb 2008 15:50:51 +0100
parents f5005d9510f4
children 56012914972a
comparison
equal deleted inserted replaced
7514:4f6a73fd8df9 7515:f3c00dc0912b
172 There are several means to create sparse matrix. 172 There are several means to create sparse matrix.
173 173
174 @table @asis 174 @table @asis
175 @item Returned from a function 175 @item Returned from a function
176 There are many functions that directly return sparse matrices. These include 176 There are many functions that directly return sparse matrices. These include
177 @dfn{speye}, @dfn{sprand}, @dfn{spdiag}, etc. 177 @dfn{speye}, @dfn{sprand}, @dfn{diag}, etc.
178 @item Constructed from matrices or vectors 178 @item Constructed from matrices or vectors
179 The function @dfn{sparse} allows a sparse matrix to be constructed from 179 The function @dfn{sparse} allows a sparse matrix to be constructed from
180 three vectors representing the row, column and data. Alternatively, the 180 three vectors representing the row, column and data. Alternatively, the
181 function @dfn{spconvert} uses a three column matrix format to allow easy 181 function @dfn{spconvert} uses a three column matrix format to allow easy
182 importation of data from elsewhere. 182 importation of data from elsewhere.
200 the same calling convention, where @code{sprand (@var{r}, @var{c}, @var{d})}, 200 the same calling convention, where @code{sprand (@var{r}, @var{c}, @var{d})},
201 creates an @var{r}-by-@var{c} sparse matrix with a density of filled 201 creates an @var{r}-by-@var{c} sparse matrix with a density of filled
202 elements of @var{d}. 202 elements of @var{d}.
203 203
204 Other functions of interest that directly create sparse matrices, are 204 Other functions of interest that directly create sparse matrices, are
205 @dfn{spdiag} or its generalization @dfn{spdiags}, that can take the 205 @dfn{diag} or its generalization @dfn{spdiags}, that can take the
206 definition of the diagonals of the matrix and create the sparse matrix 206 definition of the diagonals of the matrix and create the sparse matrix
207 that corresponds to this. For example 207 that corresponds to this. For example
208 208
209 @example 209 @example
210 s = spdiag (sparse(randn(1,n)), -1); 210 s = diag (sparse(randn(1,n)), -1);
211 @end example 211 @end example
212 212
213 creates a sparse (@var{n}+1)-by-(@var{n}+1) sparse matrix with a single 213 creates a sparse (@var{n}+1)-by-(@var{n}+1) sparse matrix with a single
214 diagonal defined. 214 diagonal defined.
215 215
216 @DOCSTRING(spcumprod)
217
218 @DOCSTRING(spcumsum)
219
220 @DOCSTRING(spdiag)
221 216
222 @DOCSTRING(spdiags) 217 @DOCSTRING(spdiags)
223 218
224 @DOCSTRING(speye) 219 @DOCSTRING(speye)
225 220
229 224
230 @DOCSTRING(spmin) 225 @DOCSTRING(spmin)
231 226
232 @DOCSTRING(spones) 227 @DOCSTRING(spones)
233 228
234 @DOCSTRING(spprod)
235
236 @DOCSTRING(sprand) 229 @DOCSTRING(sprand)
237 230
238 @DOCSTRING(sprandn) 231 @DOCSTRING(sprandn)
239 232
240 @DOCSTRING(sprandsym) 233 @DOCSTRING(sprandsym)
241
242 @DOCSTRING(spsum)
243
244 @DOCSTRING(spsumsq)
245 234
246 The recommended way for the user to create a sparse matrix, is to create 235 The recommended way for the user to create a sparse matrix, is to create
247 two vectors containing the row and column index of the data and a third 236 two vectors containing the row and column index of the data and a third
248 vector of the same size containing the data to be stored. For example 237 vector of the same size containing the data to be stored. For example
249 238
482 @item Sparse matrix reordering: 471 @item Sparse matrix reordering:
483 @dfn{ccolamd}, @dfn{colamd}, @dfn{colperm}, @dfn{csymamd}, 472 @dfn{ccolamd}, @dfn{colamd}, @dfn{colperm}, @dfn{csymamd},
484 @dfn{dmperm}, @dfn{symamd}, @dfn{randperm}, @dfn{symrcm} 473 @dfn{dmperm}, @dfn{symamd}, @dfn{randperm}, @dfn{symrcm}
485 474
486 @item Linear algebra: 475 @item Linear algebra:
487 @dfn{matrix_type}, @dfn{spchol}, @dfn{cpcholinv}, 476 @dfn{matrix_type}, @dfn{normest}, @dfn{condest}, @dfn{sprank}
488 @dfn{spchol2inv}, @dfn{spinv},
489 @dfn{splchol}, @dfn{splu}, @dfn{normest}, @dfn{condest},
490 @dfn{sprank}
491 @c @dfn{spaugment} 477 @c @dfn{spaugment}
492 @c @dfn{eigs}, @dfn{svds} but these are in octave-forge for now 478 @c @dfn{eigs}, @dfn{svds} but these are in octave-forge for now
493 479
494 @item Iterative techniques: 480 @item Iterative techniques:
495 @dfn{luinc}, @dfn{pcg}, @dfn{pcr} 481 @dfn{luinc}, @dfn{pcg}, @dfn{pcr}
496 @c @dfn{bicg}, @dfn{bicgstab}, @dfn{cholinc}, @dfn{cgs}, @dfn{gmres}, 482 @c @dfn{bicg}, @dfn{bicgstab}, @dfn{cholinc}, @dfn{cgs}, @dfn{gmres},
497 @c @dfn{lsqr}, @dfn{minres}, @dfn{qmr}, @dfn{symmlq} 483 @c @dfn{lsqr}, @dfn{minres}, @dfn{qmr}, @dfn{symmlq}
498 484
499 @item Miscellaneous: 485 @item Miscellaneous:
500 @dfn{spparms}, @dfn{symbfact}, @dfn{spstats}, 486 @dfn{spparms}, @dfn{symbfact}, @dfn{spstats}
501 @dfn{spprod}, @dfn{spcumsum}, @dfn{spsum},
502 @dfn{spsumsq}, @dfn{spdiag}
503 @end table 487 @end table
504 488
505 In addition all of the standard Octave mapper functions (ie. basic 489 In addition all of the standard Octave mapper functions (ie. basic
506 math functions that take a single argument) such as @dfn{abs}, etc 490 math functions that take a single argument) such as @dfn{abs}, etc
507 can accept sparse matrices. The reader is referred to the documentation 491 can accept sparse matrices. The reader is referred to the documentation
830 used with care. 814 used with care.
831 815
832 @DOCSTRING(normest) 816 @DOCSTRING(normest)
833 817
834 @DOCSTRING(condest) 818 @DOCSTRING(condest)
835
836 @DOCSTRING(spchol)
837
838 @DOCSTRING(spcholinv)
839
840 @DOCSTRING(spchol2inv)
841
842 @DOCSTRING(spinv)
843
844 @DOCSTRING(splchol)
845
846 @DOCSTRING(splu)
847 819
848 @DOCSTRING(spparms) 820 @DOCSTRING(spparms)
849 821
850 @DOCSTRING(sprank) 822 @DOCSTRING(sprank)
851 823