![]() |
SenK
SenK is a C++ library for high-performance linear solvers.
|
Sparse vector class. More...
#include <senk_class.hpp>
Public Member Functions | |
SpVec () | |
Constructor. More... | |
~SpVec () | |
Destructor. More... | |
void | Append (T1 t_val, T2 t_lev, int t_idx) |
Append argument values to the arrays. More... | |
void | Append (T1 *t_val, T2 *t_lev, int *t_idx, int t_len) |
Append argument values to the arrays. More... | |
int | GetLen () |
Return len. More... | |
T1 | GetVal (int i) |
Return i-th value of val. More... | |
T2 | GetLev (int i) |
Return i-th value of lev. More... | |
int | GetIdx (int i) |
Return i-th value of idx. More... | |
std::tuple< T1, T2, int > | Get (int i) |
Return the tuple of i-th values of val, lev, and idx. More... | |
void | Clear () |
Set the value of len to 0. More... | |
Private Attributes | |
T1 * | val |
An array that stores the values of the nonzero elements. More... | |
T2 * | lev |
An array that stores the supplemental values of the nonzero elements. More... | |
int * | idx |
An array that stores the indices of the nonzero elements. More... | |
int | len |
The number of the nonzero elements. More... | |
int | mlen |
The size of allocated memories. More... | |
Sparse vector class.
T1 | Type of the val array. |
T2 | Type of the lev array. |
Definition at line 24 of file senk_class.hpp.
|
inline |
|
inline |
|
inline |
Append argument values to the arrays.
t_val | Values to be appended to val. |
t_lev | Values to be appended to lev. |
t_idx | Values to be appended to idx. |
t_len | Length of these argument values. |
Definition at line 82 of file senk_class.hpp.
|
inline |
Append argument values to the arrays.
t_val | A value to be appended to val. |
t_lev | A value to be appended to lev. |
t_idx | A value to be appended to idx. |
Definition at line 63 of file senk_class.hpp.
|
inline |
Set the value of len to 0.
Definition at line 122 of file senk_class.hpp.
|
inline |
Return the tuple of i-th values of val, lev, and idx.
Definition at line 115 of file senk_class.hpp.
|
inline |
Return i-th value of idx.
Definition at line 111 of file senk_class.hpp.
|
inline |
Return len.
Definition at line 99 of file senk_class.hpp.
|
inline |
Return i-th value of lev.
Definition at line 107 of file senk_class.hpp.
|
inline |
Return i-th value of val.
Definition at line 103 of file senk_class.hpp.
|
private |
An array that stores the indices of the nonzero elements.
Definition at line 31 of file senk_class.hpp.
|
private |
The number of the nonzero elements.
Definition at line 33 of file senk_class.hpp.
|
private |
An array that stores the supplemental values of the nonzero elements.
Definition at line 29 of file senk_class.hpp.
|
private |
The size of allocated memories.
Definition at line 35 of file senk_class.hpp.
|
private |
An array that stores the values of the nonzero elements.
Definition at line 27 of file senk_class.hpp.