16 template <
typename T,
typename indexT,
bool columnMajor>
29 vals = &mat.vals[mat.outerPtr[vec]];
30 indices = &mat.innerIdx[mat.outerPtr[vec]];
31 endPtr = &mat.innerIdx[mat.outerPtr[vec + 1]];
39 template <
typename T,
typename indexT,
bool columnMajor>
45 indices = vec.indexPtr();
46 endPtr = vec.indexPtr() + vec.
nonZeros();
56 template <
typename T,
typename indexT,
bool columnMajor>
62 if (indices == endPtr) {
return; }
70 template <
typename T,
typename indexT,
bool columnMajor>
71 bool SparseMatrix<T, indexT, 1, columnMajor>::InnerIterator::operator==(
const InnerIterator &other) {
return (vals == other.vals && indices == other.index); }
74 template <
typename T,
typename indexT,
bool columnMajor>
75 bool SparseMatrix<T, indexT, 1, columnMajor>::InnerIterator::operator!=(
const InnerIterator &other) {
return (vals != other.vals || indices != other.index); }
78 template <
typename T,
typename indexT,
bool columnMajor>
79 bool SparseMatrix<T, indexT, 1, columnMajor>::InnerIterator::operator<(
const InnerIterator &other) {
return (vals < other.vals && indices < other.index); }
82 template <
typename T,
typename indexT,
bool columnMajor>
83 bool SparseMatrix<T, indexT, 1, columnMajor>::InnerIterator::operator>(
const InnerIterator &other) {
return (vals > other.vals && indices > other.index); }
86 template <
typename T,
typename indexT,
bool columnMajor>
87 T &SparseMatrix<T, indexT, 1, columnMajor>::InnerIterator::operator*() {
return val; }
92 template <
typename T,
typename indexT,
bool columnMajor>
96 template <
typename T,
typename indexT,
bool columnMajor>
100 template <
typename T,
typename indexT,
bool columnMajor>
102 if (columnMajor) {
return index; }
103 else {
return outer; }
107 template <
typename T,
typename indexT,
bool columnMajor>
109 if (columnMajor) {
return outer; }
110 else {
return index; }
114 template <
typename T,
typename indexT,
bool columnMajor>
118 template <
typename T,
typename indexT,
bool columnMajor>
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: IVCSC_Vector.hpp:27
uint32_t nonZeros()
Definition: IVCSC_Vector_Methods.hpp:163
Definition: CSC_SparseMatrix.hpp:24
indexT * getOuterPointers() const
Definition: CSC_Methods.hpp:33
Definition: IVCSC_SparseMatrix.hpp:27