Opm::SparseVector< T > Class Template Reference
Detailed Descriptiontemplate<typename T> class Opm::SparseVector< T > A SparseVector stores a vector with possibly many empty elements as efficiently as possible. It is supposed to behave similarly to a standard vector, but since direct indexing is a O(log n) operation instead of O(1), we do not supply it as operator[]. Constructor & Destructor Documentation◆ SparseVector() [1/3]
template<typename T >
Default constructor. Yields an empty SparseVector. ◆ SparseVector() [2/3]
template<typename T >
Constructs a SparseVector with a given size, but no nonzero elements. ◆ SparseVector() [3/3]
template<typename T >
template<typename DataIter , typename IntegerIter >
A constructor taking all the element data for the vector and their indices.
References index, OPM_ERROR_IF, and OPM_THROW. Member Function Documentation◆ addElement()
template<typename T >
◆ clear()
template<typename T >
Makes the vector empty(). ◆ element()
template<typename T >
O(log n) element access.
References index, and OPM_ERROR_IF. ◆ empty()
template<typename T >
◆ nonzeroElement()
template<typename T >
O(1) element access.
References Opm::SparseVector< T >::nonzeroSize(), and OPM_ERROR_IF. ◆ nonzeroIndex()
template<typename T >
O(1) index access.
References Opm::SparseVector< T >::nonzeroSize(). ◆ nonzeroSize()
template<typename T >
Returns the number of nonzero data elements. Referenced by Opm::SparseVector< T >::nonzeroElement(), and Opm::SparseVector< T >::nonzeroIndex(). ◆ operator==()
template<typename T >
Equality. ◆ size()
template<typename T >
Returns the size of the vector. Recall that most or all of the vector may be default/zero. The documentation for this class was generated from the following file: |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||