SparseVector.hpp
Go to the documentation of this file.
85 OPM_ERROR_IF(indices_.size() != data_.size(), "The number of indices of a SparseVector must equal to the number of entries");
91 OPM_THROW(std::logic_error, "Error in SparseVector construction, index is nonincreasing or out of range.");
150 OPM_ERROR_IF(index < 0, "The index of a SparseVector must be non-negative (is " << index << ")");
151 OPM_ERROR_IF(index >= size_, "The index of a SparseVector must be smaller than the maximum value (is " << index << ", max value: " << size_ <<")");
153 std::vector<int>::const_iterator lb = std::lower_bound(indices_.begin(), indices_.end(), index);
167 OPM_ERROR_IF(nzindex < 0, "The index of a SparseVector must be non-negative (is " << nzindex << ")");
168 OPM_ERROR_IF(nzindex >= nonzeroSize(), "The index of a SparseVector must be smaller than the maximum value (is " << nzindex << ", max value: " << nonzeroSize() <<")");
Definition: SparseVector.hpp:55 Definition: AnisotropicEikonal.hpp:43 SparseVector(int sz, DataIter data_beg, DataIter data_end, IntegerIter index_beg, IntegerIter index_end) Definition: SparseVector.hpp:77 bool operator==(const SparseVector &other) const Equality. Definition: SparseVector.hpp:138 const T & nonzeroElement(int nzindex) const Definition: SparseVector.hpp:164 int nonzeroSize() const Returns the number of nonzero data elements. Definition: SparseVector.hpp:124 void addElement(const T &elem, int index) Definition: SparseVector.hpp:102 SparseVector() Default constructor. Yields an empty SparseVector. Definition: SparseVector.hpp:59 |