#include <CS_ICRS.hpp>
Collaboration diagram for CS_ICRS< T >:
Public Member Functions | |
CS_ICRS (const ULI number_of_nonzeros, const ULI number_of_rows, const ULI number_of_cols, const T zero) | |
Base constructor which only initialises the internal arrays. | |
CS_ICRS (CS_ICRS< T > &toCopy) | |
Copy constructor. | |
CS_ICRS (std::vector< Triplet< T > > &input, const ULI m, const ULI n, T &zero) | |
Constructor which transforms a collection of input triplets to CRS format. | |
T * | zax (T *x_orig) |
Calculates and returns z=Ax. | |
T * | zaxtrace (T *x_orig) |
Calculates and returns z=Ax. | |
~CS_ICRS () | |
Base deconstructor. | |
Static Protected Member Functions | |
int | compareTriplets (const void *left, const void *right) |
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.
|
|
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. This method outputs the row and column indices of matrix elements as they are processed during multiplication to stdout. The return array is allocated to length equal to the number of rows in this function.
|