16 template <
typename T,
typename indexT,
bool columnMajor>
22 this->counts =
nullptr;
23 this->indices =
nullptr;
46 this->index = indices[0];
47 this->count = counts[0];
51 template <
typename T,
typename indexT,
bool columnMajor>
54 if (vector.nonZeros() == 0) {
56 this->counts =
nullptr;
57 this->indices =
nullptr;
71 this->vals = vector.getValues();
72 this->counts = vector.getCounts();
73 this->indices = vector.getIndices();
75 this->valsSize = vector.uniqueVals();
76 this->indexSize = vector.nonZeros();
80 this->index = indices[0];
81 this->count = counts[0];
87 template <
typename T,
typename indexT,
bool columnMajor>
91 template <
typename T,
typename indexT,
bool columnMajor>
95 template <
typename T,
typename indexT,
bool columnMajor>
99 template <
typename T,
typename indexT,
bool columnMajor>
103 template <
typename T,
typename indexT,
bool columnMajor>
105 if constexpr (!columnMajor) {
return outer;}
110 template <
typename T,
typename indexT,
bool columnMajor>
112 if constexpr (!columnMajor) {
return index;}
119 template <
typename T,
typename indexT,
bool columnMajor>
120 T &SparseMatrix<T, indexT, 2, columnMajor>::InnerIterator::operator*() {
return *val; }
123 template <
typename T,
typename indexT,
bool columnMajor>
124 bool SparseMatrix<T, indexT, 2, columnMajor>::InnerIterator::operator==(
const InnerIterator &other) {
return values == other.values; }
127 template <
typename T,
typename indexT,
bool columnMajor>
128 bool SparseMatrix<T, indexT, 2, columnMajor>::InnerIterator::operator!=(
const InnerIterator &other) {
return values != other.values; }
131 template <
typename T,
typename indexT,
bool columnMajor>
132 bool SparseMatrix<T, indexT, 2, columnMajor>::InnerIterator::operator<(
const InnerIterator &other) {
return values < other.values; }
135 template <
typename T,
typename indexT,
bool columnMajor>
136 bool SparseMatrix<T, indexT, 2, columnMajor>::InnerIterator::operator>(
const InnerIterator &other) {
return values > other.values; }
139 template <
typename T,
typename indexT,
bool columnMajor>
140 inline void SparseMatrix<T, indexT, 2, columnMajor>::InnerIterator::operator++() {
151 if (countIndex >= indexSize) {
return; }
void coeff(T newValue)
Definition: IVCSC_Iterator_Methods.hpp:97
T value()
Definition: IVCSC_Iterator_Methods.hpp:89
indexT row()
Definition: IVCSC_Iterator_Methods.hpp:101
indexT col()
Definition: IVCSC_Iterator_Methods.hpp:108
indexT outerDim()
Definition: IVCSC_Iterator_Methods.hpp:85
indexT getIndex()
Definition: IVCSC_Iterator_Methods.hpp:93
InnerIterator()
Definition: IVCSC_Iterator.hpp:58
Definition: VCSC_SparseMatrix.hpp:22
indexT getNumUniqueVals(uint32_t vec) const
Definition: VCSC_Methods.hpp:38
indexT * getCounts(uint32_t vec) const
Definition: VCSC_Methods.hpp:30
indexT getNumIndices(uint32_t vec) const
Definition: VCSC_Methods.hpp:46
indexT * getIndices(uint32_t vec) const
Definition: VCSC_Methods.hpp:34
T * getValues(uint32_t vec) const
Definition: VCSC_Methods.hpp:26