#include <CS_ZZ_ICRS.hpp>
Collaboration diagram for CS_ZZ_ICRS< T >:
Public Member Functions | |
CS_ZZ_ICRS (const ULI number_of_nonzeros, const ULI number_of_rows, const ULI number_of_cols, T zero) | |
Base constructor which only initialises the internal arrays. | |
CS_ZZ_ICRS (CS_ZZ_ICRS< T > &toCopy) | |
Copy constructor. | |
CS_ZZ_ICRS (std::vector< Triplet< T > > &input, const ULI m, const ULI n, const T zero) | |
Constructor which transforms a collection of input triplets to CRS format. | |
T * | zax (T *x_orig) |
Calculates and returns z=Ax. | |
~CS_ZZ_ICRS () | |
Base deconstructor. | |
Static Protected Member Functions | |
bool | compareTriplets (const Triplet< T > &one, const Triplet< T > &two) |
Comparison function used for sorting input data. | |
Protected Attributes | |
CS_ELEMENT< ULI > | nnz |
Number of non-zeros. | |
CS_ELEMENT< ULI > | nor |
Number of rows. | |
CS_ELEMENT< ULI > | noc |
Number of cols. | |
CS_ARRAY< T > * | nzs |
Array containing the actual nnz non-zeros. | |
CS_ARRAY< ULI > * | c_ind |
Array containing the column jumps. | |
CS_ARRAY< ULI > * | r_ind |
Array containing the row jumps. | |
CS_ELEMENT< T > | zero_element |
Which element is considered as zero. |
|
Base constructor which only initialises the internal arrays. Note that to gain a valid CRS structure, these arrays have to be filled by some external mechanism (i.e., after calling this constructor, the internal arrays contain garbage, resuling in invalid datastructure).
|
|
Copy constructor.
|
|
Constructor which transforms a collection of input triplets to CRS format. The input collection is considered to have at most one triplet with unique pairs of indeces. Unspecified behaviour occurs when this assumption is not met.
|
|
Calculates and returns z=Ax. The vector x should have appropiately set length; this is not strictly enforced. Bus errors, segmentation faults, the works; one or more of these will occur if dimensions do not make sense. The return array is allocated to length equal to the number of rows in this function.
|