1 #ifndef OPENGM_VECTOR_VIEW
2 #define OPENGM_VECTOR_VIEW
6 template<
class VECTOR,
class INDEX_TYPE>
18 typedef typename VectorType::iterator
iterator;
24 const VectorType & vector
25 ) : vectorPtr_(&vector),
33 const VectorType & vector,
34 const IndexType start,
36 ) : vectorPtr_(&vector),
43 const VectorType & vector,
44 const IndexType start,
54 const VectorType & vector
61 return vectorPtr_->begin()+start_;
64 return vectorPtr_->begin()+start_+size_;
68 return vectorPtr_->begin()+start_;
70 const_iterator
end()
const{
71 return vectorPtr_->begin()+start_+size_;
75 const IndexType
size()
const{
79 return (*vectorPtr_)[start_+i];
82 return (*vectorPtr_)[start_+i];
87 const VectorType * vectorPtr_;
VectorType::value_type ValueType
const_iterator begin() const
const ValueType & operator[](const IndexType i) const
void assignPtr(const VectorType &vector)
VectorType::const_iterator const_iterator
const_iterator end() const
VectorType::iterator iterator
ValueType & operator[](const IndexType i)
const IndexType size() const
void assign(const VectorType &vector, const IndexType start, const IndexType size)
VectorView(const VectorType &vector, const IndexType start, const IndexType size)
VectorView(const VectorType &vector)