|
MyraMath
|
Convenience type for building SparseMatrix's, uses coordinate/triplet format. More...
#include <SparseMatrixBuilder.h>
Public Types | |
| typedef SparseMatrixTriplet< Number > | Triplet |
| typedef std::vector< Triplet > | Triplets |
| typedef const Triplet * | Iterator |
Public Member Functions | |
| SparseMatrixBuilder () | |
| Default constructor, makes empty SparseMatrixBuilder with size = 0x0. | |
| SparseMatrixBuilder (int in_I, int in_J) | |
| Constructor, requires size (I,J). Initialized to empty (contains no nonzeros). | |
| SparseMatrixBuilder (std::pair< int, int > in_IJ) | |
| SparseMatrixBuilder (const SparseMatrixBuilder &that) | |
| Copy constructor. | |
| void | swap (SparseMatrixBuilder &that) |
| Member swap. | |
| SparseMatrixBuilder (SparseMatrixBuilder &&that) | |
| Move constructor - default construct and swap idiom. | |
| SparseMatrixBuilder & | operator= (SparseMatrixBuilder that) |
| Assignment operator - copy construct and swap idiom. | |
| SparseMatrixBuilder & | operator= (const CSparseMatrixRange< Number > &that) |
| Assignment operator from a CSparseMatrixRange. | |
| SparseMatrixBuilder (const CSparseMatrixRange< Number > &that) | |
| Constructs from a CSparseMatrixRange (same size, values copied) | |
| SparseMatrixBuilder (InputStream &in) | |
| InputStream constructor. Layout compatible with SparseMatrix. | |
| void | write (OutputStream &out) const |
| Writes to OutputStream. Layout compatible with SparseMatrix. | |
| ~SparseMatrixBuilder () | |
| Releases internal resources. | |
| Iterator | begin () const |
| Presents a const range of (i,j,value) triplets. Note this range may contain duplicates, which are to be summed. | |
| Iterator | end () const |
| std::pair< int, int > | size () const |
| Size inspector. | |
| Number & | operator() (int i, int j) |
| Random mutator. Appends a new nonzero and returns a reference to it. | |
| void | erase (int i, int j) |
| void | operator+= (const SparseMatrixBuilder &that) |
| Adds this += that. | |
| void | operator+= (const CSparseMatrixRange< Number > &that) |
| void | operator-= (const SparseMatrixBuilder &that) |
| Subtracts this -= that. | |
| void | operator-= (const CSparseMatrixRange< Number > &that) |
| void | operator*= (Number alpha) |
| Scales this *= alpha. | |
| void | operator/= (Number alpha) |
| Scales this /= alpha. | |
| Pattern | make_Pattern () const |
| Returns an equivalent nonzero Pattern. | |
| SparseMatrix< Number > | make_SparseMatrix () const |
| Returns an equivalent SparseMatrix. | |
| Matrix< Number > | make_Matrix () const |
| Returns an equivalent Matrix A. | |
Static Public Member Functions | |
| static SparseMatrixBuilder< Number > | identity (int IJ) |
| Generates identity SparseMatrix of specified size. | |
| static SparseMatrixBuilder< Number > | random (int I, int J, int N) |
| Generates a random SparseMatrix with size IxJ and (approximately) N nonzeros. | |
| static SparseMatrixBuilder< Number > | random (const PatternRange &P) |
| Generates a random SparseMatrix with the specified Pattern. | |
Convenience type for building SparseMatrix's, uses coordinate/triplet format.
1.8.13