Next: Accessing Global Variables in Oct-Files, Previous: Structures in Oct-Files, Up: Oct-Files [Contents][Index]
There are three classes of sparse objects that are of interest to the user.
SparseMatrixA double precision sparse matrix class
SparseComplexMatrixA complex sparse matrix class
SparseBoolMatrixA boolean sparse matrix class
All of these classes inherit from the Sparse<T> template class,
and so all have similar capabilities and usage. The Sparse<T>
class was based on Octave’s Array<T> class, and so users familiar
with Octave’s Array classes will be comfortable with the use of
the sparse classes.
The sparse classes will not be entirely described in this section, due
to their similarity with the existing Array classes. However,
there are a few differences due the different nature of sparse objects,
and these will be described. First, although it is fundamentally
possible to have N-dimensional sparse objects, the Octave sparse classes do
not allow them at this time; All instances of the sparse classes
must be 2-dimensional. This means that SparseMatrix is actually
more similar to Octave’s Matrix class than its NDArray class.
| • Array and Sparse Class Differences: | ||
| • Creating Sparse Matrices in Oct-Files: | ||
| • Using Sparse Matrices in Oct-Files: |