42 #ifndef SPARSE_ELEMENT_H
43 #define SPARSE_ELEMENT_H
45 #include "AbstractLinAlgPack_Types.hpp"
47 namespace AbstractLinAlgPack {
59 template <
class T_Index,
class T_Value>
85 idx_pad_.index_ =
index;
107 return idx_pad_.index_;
111 idx_pad_.index_ =
index;
117 idx_pad_.index_ =
index;
123 union index_and_padding {
127 index_and_padding idx_pad_;
134 #endif // SPARSE_ELEMENT_H
void change_index(index_type index)
Change the index.
const index_type & index() const
SparseElement()
Construct uninitialized (value() == 0.0#, index() == 0#).
SparseElement(index_type index, value_type value)
Construct with a value and index set.
const value_type & value() const
Sparse storage element type.
void initialize(index_type index, value_type value)
Initialize.