17 #ifndef __deal2__vector_slice_h
18 #define __deal2__vector_slice_h
20 #include <deal.II/base/config.h>
23 DEAL_II_NAMESPACE_OPEN
49 template <
class VECTOR>
80 unsigned int size()
const;
87 typename VECTOR::reference
operator[] (
unsigned int i);
95 typename VECTOR::const_reference
operator[] (
unsigned int i)
const;
100 typename VECTOR::iterator
begin();
105 typename VECTOR::const_iterator
begin()
const;
110 typename VECTOR::iterator
end();
115 typename VECTOR::const_iterator
end()
const;
140 template <
class VECTOR>
158 template <
class VECTOR>
162 const unsigned int start,
163 const unsigned int length)
174 template <
class VECTOR>
178 v(v), start(0), length(v.size())
182 template <
class VECTOR>
188 v(v), start(start), length(length)
190 Assert((start+length<=v.size()),
195 template <
class VECTOR>
204 template <
class VECTOR>
206 typename VECTOR::reference
215 template <
class VECTOR>
217 typename VECTOR::const_reference
226 template <
class VECTOR>
228 typename VECTOR::const_iterator
231 return v.begin()+start;
235 template <
class VECTOR>
237 typename VECTOR::iterator
240 return v.begin()+start;
244 template <
class VECTOR>
246 typename VECTOR::const_iterator
249 return v.begin()+start+length;
253 template <
class VECTOR>
255 typename VECTOR::iterator
258 return v.begin()+start+length;
261 DEAL_II_NAMESPACE_CLOSE
unsigned int size() const
const unsigned int length
VECTOR::reference operator[](unsigned int i)
#define Assert(cond, exc)
::ExceptionBase & ExcIndexRange(int arg1, int arg2, int arg3)
const VectorSlice< const VECTOR > make_slice(VECTOR &v)
const VectorSlice< const VECTOR > make_slice(VECTOR &v, const unsigned int start, const unsigned int length)