dune-common
2.5.0
|
Construct a vector with a dynamic size. More...
#include <dune/common/dynvector.hh>
Public Types | |
typedef Base::size_type | size_type |
typedef Base::value_type | value_type |
typedef Allocator | allocator_type |
enum | |
We are at the leaf of the block recursion. More... | |
typedef Traits::derived_type | derived_type |
type of derived vector class More... | |
typedef Traits::value_type | field_type |
export the type representing the field More... | |
typedef Traits::value_type | block_type |
export the type representing the components More... | |
typedef DenseIterator< DenseVector, value_type > | Iterator |
Iterator class for sequential access. More... | |
typedef Iterator | iterator |
typedef for stl compliant access More... | |
typedef DenseIterator< const DenseVector, const value_type > | ConstIterator |
ConstIterator class for sequential access. More... | |
typedef ConstIterator | const_iterator |
typedef for stl compliant access More... | |
Public Member Functions | |
DynamicVector (const allocator_type &a=allocator_type()) | |
Constructor making uninitialized vector. More... | |
DynamicVector (size_type n, const allocator_type &a=allocator_type()) | |
DynamicVector (size_type n, value_type c, const allocator_type &a=allocator_type()) | |
Constructor making vector with identical coordinates. More... | |
DynamicVector (std::initializer_list< K > const &l) | |
Construct from a std::initializer_list. More... | |
DynamicVector (const DynamicVector &x) | |
Constructor making vector with identical coordinates. More... | |
DynamicVector (DynamicVector &&x) | |
Move constructor. More... | |
template<class T > | |
DynamicVector (const DynamicVector< T, Allocator > &x) | |
template<class X > | |
DynamicVector (const DenseVector< X > &x, const allocator_type &a=allocator_type()) | |
Copy constructor from another DenseVector. More... | |
DynamicVector & | operator= (const DynamicVector &other) |
Copy assignment operator. More... | |
DynamicVector & | operator= (DynamicVector &&other) |
Move assignment operator. More... | |
size_type | capacity () const |
Number of elements for which memory has been allocated. More... | |
void | resize (size_type n, value_type c=value_type()) |
void | reserve (size_type n) |
size_type | size () const |
K & | operator[] (size_type i) |
const K & | operator[] (size_type i) const |
Iterator | begin () |
begin iterator More... | |
ConstIterator | begin () const |
begin ConstIterator More... | |
Iterator | end () |
end iterator More... | |
ConstIterator | end () const |
end ConstIterator More... | |
Iterator | beforeEnd () |
ConstIterator | beforeEnd () const |
Iterator | beforeBegin () |
ConstIterator | beforeBegin () const |
Iterator | find (size_type i) |
return iterator to given element or end() More... | |
ConstIterator | find (size_type i) const |
return iterator to given element or end() More... | |
derived_type & | operator+= (const DenseVector< Other > &y) |
vector space addition More... | |
std::enable_if< std::is_convertible< ValueType, value_type >::value, derived_type >::type & | operator+= (const ValueType &kk) |
vector space add scalar to all comps More... | |
derived_type & | operator-= (const DenseVector< Other > &y) |
vector space subtraction More... | |
std::enable_if< std::is_convertible< ValueType, value_type >::value, derived_type >::type & | operator-= (const ValueType &kk) |
vector space subtract scalar from all comps More... | |
derived_type | operator+ (const DenseVector< Other > &b) const |
Binary vector addition. More... | |
derived_type | operator- (const DenseVector< Other > &b) const |
Binary vector subtraction. More... | |
std::enable_if< std::is_convertible< ValueType, value_type >::value, derived_type >::type & | operator*= (const ValueType &kk) |
vector space multiplication with scalar More... | |
std::enable_if< std::is_convertible< ValueType, value_type >::value, derived_type >::type & | operator/= (const ValueType &kk) |
vector space division by scalar More... | |
bool | operator== (const DenseVector< Other > &y) const |
Binary vector comparison. More... | |
bool | operator!= (const DenseVector< Other > &y) const |
Binary vector incomparison. More... | |
derived_type & | axpy (const value_type &a, const DenseVector< Other > &y) |
vector space axpy operation ( *this += a y ) More... | |
PromotionTraits< field_type, typename DenseVector< Other >::field_type >::PromotedType | operator* (const DenseVector< Other > &y) const |
indefinite vector dot product ![]() | |
PromotionTraits< field_type, typename DenseVector< Other >::field_type >::PromotedType | dot (const DenseVector< Other > &y) const |
vector dot product ![]() | |
FieldTraits< value_type >::real_type | one_norm () const |
one norm (sum over absolute values of entries) More... | |
FieldTraits< value_type >::real_type | one_norm_real () const |
simplified one norm (uses Manhattan norm for complex values) More... | |
FieldTraits< value_type >::real_type | two_norm () const |
two norm sqrt(sum over squared values of entries) More... | |
FieldTraits< value_type >::real_type | two_norm2 () const |
square of two norm (sum over squared values of entries), need for block recursion More... | |
FieldTraits< vt >::real_type | infinity_norm () const |
infinity norm (maximum of absolute values of entries) More... | |
FieldTraits< vt >::real_type | infinity_norm () const |
infinity norm (maximum of absolute values of entries) More... | |
FieldTraits< vt >::real_type | infinity_norm_real () const |
simplified infinity norm (uses Manhattan norm for complex values) More... | |
FieldTraits< vt >::real_type | infinity_norm_real () const |
simplified infinity norm (uses Manhattan norm for complex values) More... | |
size_type | N () const |
number of blocks in the vector (are of size 1 here) More... | |
size_type | dim () const |
dimension of the vector space More... | |
Related Functions | |
(Note that these are not member functions.) | |
template<class K , class Allocator > | |
std::istream & | operator>> (std::istream &in, DynamicVector< K, Allocator > &v) |
Read a DynamicVector from an input stream. More... | |
std::ostream & | operator<< (std::ostream &s, const DenseVector< DynamicVector< K, Allocator > > &v) |
Write a DenseVector to an output stream. More... | |
Construct a vector with a dynamic size.
K | is the field type (use float, double, complex, etc) |
Allocator | type of allocator object used to define the storage allocation model, default Allocator = std::allocator< K >. |
typedef Allocator Dune::DynamicVector< K, Allocator >::allocator_type |
|
inherited |
export the type representing the components
|
inherited |
typedef for stl compliant access
|
inherited |
ConstIterator class for sequential access.
|
inherited |
type of derived vector class
|
inherited |
export the type representing the field
|
inherited |
Iterator class for sequential access.
|
inherited |
typedef for stl compliant access
typedef Base::size_type Dune::DynamicVector< K, Allocator >::size_type |
typedef Base::value_type Dune::DynamicVector< K, Allocator >::value_type |
|
inherited |
We are at the leaf of the block recursion.
|
inlineexplicit |
Constructor making uninitialized vector.
|
inlineexplicit |
|
inline |
Constructor making vector with identical coordinates.
|
inline |
Construct from a std::initializer_list.
|
inline |
Constructor making vector with identical coordinates.
|
inline |
Move constructor.
|
inline |
|
inline |
Copy constructor from another DenseVector.
|
inlineinherited |
vector space axpy operation ( *this += a y )
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
begin iterator
|
inlineinherited |
begin ConstIterator
|
inline |
Number of elements for which memory has been allocated.
capacity() is always greater than or equal to size().
|
inlineinherited |
dimension of the vector space
|
inlineinherited |
vector dot product which corresponds to Petsc's VecDot
http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Vec/VecDot.html
y | other vector |
|
inlineinherited |
end iterator
|
inlineinherited |
end ConstIterator
|
inlineinherited |
return iterator to given element or end()
|
inlineinherited |
return iterator to given element or end()
|
inlineinherited |
infinity norm (maximum of absolute values of entries)
|
inlineinherited |
infinity norm (maximum of absolute values of entries)
|
inlineinherited |
simplified infinity norm (uses Manhattan norm for complex values)
|
inlineinherited |
simplified infinity norm (uses Manhattan norm for complex values)
|
inlineinherited |
number of blocks in the vector (are of size 1 here)
|
inlineinherited |
one norm (sum over absolute values of entries)
|
inlineinherited |
simplified one norm (uses Manhattan norm for complex values)
|
inlineinherited |
Binary vector incomparison.
|
inlineinherited |
indefinite vector dot product which corresponds to Petsc's VecTDot
http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Vec/VecTDot.html
y | other vector |
|
inlineinherited |
vector space multiplication with scalar
we use enable_if to avoid an ambiguity, if the function parameter can be converted to value_type implicitly. (see FS#1457)
The function is only enabled, if the parameter is directly convertible to value_type.
|
inlineinherited |
Binary vector addition.
|
inlineinherited |
vector space addition
|
inlineinherited |
vector space add scalar to all comps
we use enable_if to avoid an ambiguity, if the function parameter can be converted to value_type implicitly. (see FS#1457)
The function is only enabled, if the parameter is directly convertible to value_type.
|
inlineinherited |
Binary vector subtraction.
|
inlineinherited |
vector space subtraction
|
inlineinherited |
vector space subtract scalar from all comps
we use enable_if to avoid an ambiguity, if the function parameter can be converted to value_type implicitly. (see FS#1457)
The function is only enabled, if the parameter is directly convertible to value_type.
|
inlineinherited |
vector space division by scalar
we use enable_if to avoid an ambiguity, if the function parameter can be converted to value_type implicitly. (see FS#1457)
The function is only enabled, if the parameter is directly convertible to value_type.
|
inline |
Copy assignment operator.
|
inline |
Move assignment operator.
|
inlineinherited |
Binary vector comparison.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineinherited |
two norm sqrt(sum over squared values of entries)
|
inlineinherited |
square of two norm (sum over squared values of entries), need for block recursion
|
related |
Write a DenseVector to an output stream.
[in] | s | std :: ostream to write to |
[in] | v | DenseVector to write |