3 #ifndef DUNE_DYNVECTOR_HH
4 #define DUNE_DYNVECTOR_HH
31 template<
class K,
class Allocator >
37 typedef typename container_type::size_type
size_type;
40 template<
class K,
class Allocator >
53 template<
class K,
class Allocator = std::allocator< K > >
56 std::vector< K, Allocator > _data;
81 Base(), _data(x._data)
86 _data(std::move(x._data))
91 _data(x.
begin(), x.
end(), x.get_allocator())
102 _data.push_back( x[ i ] );
105 using Base::operator=;
117 _data = std::move(other._data);
128 return _data.capacity();
156 template<
class K,
class Allocator >
DynamicVector(const DynamicVector &x)
Constructor making vector with identical coordinates.
Definition: dynvector.hh:80
size_type size() const
size method
Definition: densevector.hh:296
std::istream & operator>>(std::istream &is, tuple< T1 > &t)
Read a tuple.
Definition: tuples.hh:203
size_type vec_size() const
Definition: dynvector.hh:140
Definition: ftraits.hh:22
size_type capacity() const
Number of elements for which memory has been allocated.
Definition: dynvector.hh:126
DynamicVector(const allocator_type &a=allocator_type())
Constructor making uninitialized vector.
Definition: dynvector.hh:66
char c
Definition: alignment.hh:33
A few common exception classes.
container_type::size_type size_type
Definition: dynvector.hh:37
T real_type
export the type representing the real type of the field
Definition: ftraits.hh:27
Construct a vector with a dynamic size.
Definition: dynvector.hh:30
Definition: matvectraits.hh:29
Base::size_type size_type
Definition: dynvector.hh:60
Interface for a class of dense vectors over a given field.
Definition: densevector.hh:18
DynamicVector(DynamicVector &&x)
Move constructor.
Definition: dynvector.hh:85
std::vector< K, Allocator > container_type
Definition: dynvector.hh:35
DynamicVector(const DenseVector< X > &x, const allocator_type &a=allocator_type())
Copy constructor from another DenseVector.
Definition: dynvector.hh:96
Implements the dense vector interface, with an exchangeable storage class.
void resize(size_type n, value_type c=value_type())
Definition: dynvector.hh:130
FieldTraits< K >::field_type field_type
Definition: dynvector.hh:43
Allocator allocator_type
Definition: dynvector.hh:63
Base::value_type value_type
Definition: dynvector.hh:61
DynamicVector(const DynamicVector< T, Allocator > &x)
Definition: dynvector.hh:90
DynamicVector(size_type n, const allocator_type &a=allocator_type())
Definition: dynvector.hh:70
DynamicVector(size_type n, value_type c, const allocator_type &a=allocator_type())
Constructor making vector with identical coordinates.
Definition: dynvector.hh:75
Iterator end()
end iterator
Definition: densevector.hh:313
T field_type
export the type representing the field
Definition: ftraits.hh:25
K & vec_access(size_type i)
Definition: dynvector.hh:141
void reserve(size_type n)
Definition: dynvector.hh:134
FieldTraits< K >::real_type real_type
Definition: dynvector.hh:44
Iterator begin()
begin iterator
Definition: densevector.hh:307
DynamicVector & operator=(const DynamicVector &other)
Copy assignment operator.
Definition: dynvector.hh:108
DynamicVector & operator=(DynamicVector &&other)
Move assignment operator.
Definition: dynvector.hh:115
Traits::size_type size_type
The type used for the index access and size operation.
Definition: densevector.hh:265
K value_type
Definition: dynvector.hh:36
DynamicVector< K, Allocator > derived_type
Definition: dynvector.hh:34
Traits::value_type value_type
export the type representing the field
Definition: densevector.hh:256
const K & vec_access(size_type i) const
Definition: dynvector.hh:142
Implements a generic iterator class for writing stl conformant iterators.