##### 22.1.4.1 Sparse Functions

An important consideration in the use of the sparse functions of Octave is that many of the internal functions of Octave, such as diag, can not accept sparse matrices as an input. The sparse implementation in Octave therefore uses the dispatch function to overload the normal Octave functions with equivalent functions that work with sparse matrices. However, at any time the sparse matrix specific version of the function can be used by explicitly calling its function name.

The table below lists all of the sparse functions of Octave together (with possible future extensions that are currently unimplemented, listed last). Note that in this specific sparse forms of the functions are typically the same as the general versions with a sp prefix. In the table below, and the rest of this article the specific sparse versions of the functions are used.

Generate sparse matrices:
  spalloc, spdiags, speye, sprand, sprandn, sprandsym
Sparse matrix conversion:
  full, sparse, spconvert, spfind
Manipulate sparse matrices
  issparse, nnz, nonzeros, nzmax, spfun, spones, spy,
Graph Theory:
  etree, etreeplot, gplot, treeplot, (treelayout)
Sparse matrix reordering:
  ccolamd, colamd, colperm, csymamd, dmperm, symamd, randperm, (symrcm)
Linear algebra:
  matrix\_type, spchol, cpcholinv, spchol2inv, spdet, spinv, spkron, splchol, splu, spqr, (condest, eigs, normest, sprank, svds, spaugment)
Iterative techniques:
  luinc, pcg, pcr, (bicg, bicgstab, cholinc, cgs, gmres, lsqr, minres, qmr, symmlq)
Miscellaneous:
  spparms, symbfact, spstats, spprod, spcumsum, spsum, spsumsq, spmin, spmax, spatan2, spdiag

In addition all of the standard Octave mapper functions (ie. basic math functions that take a single argument) such as abs, etc can accept sparse matrices. The reader is referred to the documentation supplied with these functions within Octave itself for further details.