Interface for a class of dense vectors over a given field. More...
#include <dune/common/densevector.hh>
Inherited by Dune::FieldVector< K, n >.
Public Types | |
enum | { blocklevel = 1 } |
We are at the leaf of the block recursion. More... | |
typedef Traits::derived_type | derived_type |
type of derived vector class | |
typedef Traits::value_type | value_type |
export the type representing the field | |
typedef FieldTraits < value_type >::field_type | field_type |
export the type representing the field | |
typedef Traits::value_type | block_type |
export the type representing the components | |
typedef Traits::size_type | size_type |
The type used for the index access and size operation. | |
typedef DenseIterator < DenseVector, value_type > | Iterator |
Iterator class for sequential access. | |
typedef Iterator | iterator |
typedef for stl compliant access | |
typedef DenseIterator< const DenseVector, const value_type > | ConstIterator |
ConstIterator class for sequential access. | |
typedef ConstIterator | const_iterator |
typedef for stl compliant access | |
Public Member Functions | |
derived_type & | operator= (const value_type &k) |
Assignment operator for scalar. | |
value_type & | operator[] (size_type i) |
random access | |
const value_type & | operator[] (size_type i) const |
size_type | size () const |
size method | |
Iterator | begin () |
begin iterator | |
Iterator | end () |
end iterator | |
Iterator | beforeEnd () |
Iterator | beforeBegin () |
Iterator | find (size_type i) |
return iterator to given element or end() | |
ConstIterator | begin () const |
begin ConstIterator | |
ConstIterator | end () const |
end ConstIterator | |
ConstIterator | beforeEnd () const |
ConstIterator | beforeBegin () const |
ConstIterator | find (size_type i) const |
return iterator to given element or end() | |
template<class Other > | |
derived_type & | operator+= (const DenseVector< Other > &y) |
vector space addition | |
template<class Other > | |
derived_type & | operator-= (const DenseVector< Other > &y) |
vector space subtraction | |
template<class Other > | |
derived_type | operator+ (const DenseVector< Other > &b) const |
Binary vector addition. | |
template<class Other > | |
derived_type | operator- (const DenseVector< Other > &b) const |
Binary vector subtraction. | |
template<typename ValueType > | |
std::enable_if < std::is_convertible < ValueType, value_type > ::value, derived_type >::type & | operator+= (const ValueType &kk) |
vector space add scalar to all comps | |
template<typename ValueType > | |
std::enable_if < std::is_convertible < ValueType, value_type > ::value, derived_type >::type & | operator-= (const ValueType &kk) |
vector space subtract scalar from all comps | |
template<typename FieldType > | |
std::enable_if < std::is_convertible < FieldType, field_type > ::value, derived_type >::type & | operator*= (const FieldType &kk) |
vector space multiplication with scalar | |
template<typename FieldType > | |
std::enable_if < std::is_convertible < FieldType, field_type > ::value, derived_type >::type & | operator/= (const FieldType &kk) |
vector space division by scalar | |
template<class Other > | |
bool | operator== (const DenseVector< Other > &y) const |
Binary vector comparison. | |
template<class Other > | |
bool | operator!= (const DenseVector< Other > &y) const |
Binary vector incomparison. | |
template<class Other > | |
derived_type & | axpy (const field_type &a, const DenseVector< Other > &y) |
vector space axpy operation ( *this += a y ) | |
template<class Other > | |
PromotionTraits< field_type, typename DenseVector< Other > ::field_type >::PromotedType | operator* (const DenseVector< Other > &y) const |
indefinite vector dot product ![]() | |
template<class Other > | |
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) | |
FieldTraits< value_type > ::real_type | one_norm_real () const |
simplified one norm (uses Manhattan norm for complex values) | |
FieldTraits< value_type > ::real_type | two_norm () const |
two norm sqrt(sum over squared values of entries) | |
FieldTraits< value_type > ::real_type | two_norm2 () const |
square of two norm (sum over squared values of entries), need for block recursion | |
template<typename vt = value_type, typename std::enable_if<!has_nan< vt >::value, int >::type = 0> | |
FieldTraits< vt >::real_type | infinity_norm () const |
infinity norm (maximum of absolute values of entries) | |
template<typename vt = value_type, typename std::enable_if<!has_nan< vt >::value, int >::type = 0> | |
FieldTraits< vt >::real_type | infinity_norm_real () const |
simplified infinity norm (uses Manhattan norm for complex values) | |
template<typename vt = value_type, typename std::enable_if< has_nan< vt >::value, int >::type = 0> | |
FieldTraits< vt >::real_type | infinity_norm () const |
infinity norm (maximum of absolute values of entries) | |
template<typename vt = value_type, typename std::enable_if< has_nan< vt >::value, int >::type = 0> | |
FieldTraits< vt >::real_type | infinity_norm_real () const |
simplified infinity norm (uses Manhattan norm for complex values) | |
size_type | N () const |
number of blocks in the vector (are of size 1 here) | |
size_type | dim () const |
dimension of the vector space | |
Protected Member Functions | |
constexpr | DenseVector () |
Interface for a class of dense vectors over a given field.
V | implementation class of the vector | |
T | value type | |
S | size type |
V has to provide the following members:
typedef Traits::value_type Dune::DenseVector< V >::block_type |
export the type representing the components
typedef ConstIterator Dune::DenseVector< V >::const_iterator |
typedef for stl compliant access
typedef DenseIterator<const DenseVector,const value_type> Dune::DenseVector< V >::ConstIterator |
ConstIterator class for sequential access.
typedef Traits::derived_type Dune::DenseVector< V >::derived_type |
type of derived vector class
typedef FieldTraits< value_type >::field_type Dune::DenseVector< V >::field_type |
export the type representing the field
typedef Iterator Dune::DenseVector< V >::iterator |
typedef for stl compliant access
typedef DenseIterator<DenseVector,value_type> Dune::DenseVector< V >::Iterator |
Iterator class for sequential access.
typedef Traits::size_type Dune::DenseVector< V >::size_type |
The type used for the index access and size operation.
Reimplemented in Dune::DynamicVector< K, Allocator >, Dune::FieldVector< K, SIZE >, Dune::DynamicVector< K >, and Dune::FieldVector< K, n >.
typedef Traits::value_type Dune::DenseVector< V >::value_type |
export the type representing the field
Reimplemented in Dune::DynamicVector< K, Allocator >, Dune::FieldVector< K, SIZE >, Dune::DynamicVector< K >, and Dune::FieldVector< K, n >.
anonymous enum |
constexpr Dune::DenseVector< V >::DenseVector | ( | ) | [inline, protected] |
derived_type& Dune::DenseVector< V >::axpy | ( | const field_type & | a, | |
const DenseVector< Other > & | y | |||
) | [inline] |
vector space axpy operation ( *this += a y )
ConstIterator Dune::DenseVector< V >::beforeBegin | ( | ) | const [inline] |
Iterator Dune::DenseVector< V >::beforeBegin | ( | ) | [inline] |
ConstIterator Dune::DenseVector< V >::beforeEnd | ( | ) | const [inline] |
Iterator Dune::DenseVector< V >::beforeEnd | ( | ) | [inline] |
ConstIterator Dune::DenseVector< V >::begin | ( | ) | const [inline] |
begin ConstIterator
Iterator Dune::DenseVector< V >::begin | ( | ) | [inline] |
begin iterator
size_type Dune::DenseVector< V >::dim | ( | ) | const [inline] |
dimension of the vector space
PromotionTraits<field_type,typename DenseVector<Other>::field_type>::PromotedType Dune::DenseVector< V >::dot | ( | const DenseVector< Other > & | y | ) | const [inline] |
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 |
ConstIterator Dune::DenseVector< V >::end | ( | ) | const [inline] |
end ConstIterator
Iterator Dune::DenseVector< V >::end | ( | ) | [inline] |
end iterator
ConstIterator Dune::DenseVector< V >::find | ( | size_type | i | ) | const [inline] |
return iterator to given element or end()
Iterator Dune::DenseVector< V >::find | ( | size_type | i | ) | [inline] |
return iterator to given element or end()
FieldTraits<vt>::real_type Dune::DenseVector< V >::infinity_norm | ( | ) | const [inline] |
infinity norm (maximum of absolute values of entries)
FieldTraits<vt>::real_type Dune::DenseVector< V >::infinity_norm | ( | ) | const [inline] |
infinity norm (maximum of absolute values of entries)
FieldTraits<vt>::real_type Dune::DenseVector< V >::infinity_norm_real | ( | ) | const [inline] |
simplified infinity norm (uses Manhattan norm for complex values)
FieldTraits<vt>::real_type Dune::DenseVector< V >::infinity_norm_real | ( | ) | const [inline] |
simplified infinity norm (uses Manhattan norm for complex values)
size_type Dune::DenseVector< V >::N | ( | ) | const [inline] |
number of blocks in the vector (are of size 1 here)
FieldTraits<value_type>::real_type Dune::DenseVector< V >::one_norm | ( | ) | const [inline] |
one norm (sum over absolute values of entries)
FieldTraits<value_type>::real_type Dune::DenseVector< V >::one_norm_real | ( | ) | const [inline] |
simplified one norm (uses Manhattan norm for complex values)
bool Dune::DenseVector< V >::operator!= | ( | const DenseVector< Other > & | y | ) | const [inline] |
Binary vector incomparison.
PromotionTraits<field_type,typename DenseVector<Other>::field_type>::PromotedType Dune::DenseVector< V >::operator* | ( | const DenseVector< Other > & | y | ) | const [inline] |
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 |
std::enable_if< std::is_convertible<FieldType, field_type>::value, derived_type >::type& Dune::DenseVector< V >::operator*= | ( | const FieldType & | kk | ) | [inline] |
vector space multiplication with scalar
we use enable_if to avoid an ambiguity, if the function parameter can be converted to field_type implicitly. (see FS#1457)
The function is only enabled, if the parameter is directly convertible to field_type.
derived_type Dune::DenseVector< V >::operator+ | ( | const DenseVector< Other > & | b | ) | const [inline] |
Binary vector addition.
std::enable_if< std::is_convertible<ValueType, value_type>::value, derived_type >::type& Dune::DenseVector< V >::operator+= | ( | const ValueType & | kk | ) | [inline] |
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.
derived_type& Dune::DenseVector< V >::operator+= | ( | const DenseVector< Other > & | y | ) | [inline] |
vector space addition
derived_type Dune::DenseVector< V >::operator- | ( | const DenseVector< Other > & | b | ) | const [inline] |
Binary vector subtraction.
std::enable_if< std::is_convertible<ValueType, value_type>::value, derived_type >::type& Dune::DenseVector< V >::operator-= | ( | const ValueType & | kk | ) | [inline] |
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.
derived_type& Dune::DenseVector< V >::operator-= | ( | const DenseVector< Other > & | y | ) | [inline] |
vector space subtraction
std::enable_if< std::is_convertible<FieldType, field_type>::value, derived_type >::type& Dune::DenseVector< V >::operator/= | ( | const FieldType & | kk | ) | [inline] |
vector space division by scalar
we use enable_if to avoid an ambiguity, if the function parameter can be converted to field_type implicitly. (see FS#1457)
The function is only enabled, if the parameter is directly convertible to field_type.
derived_type& Dune::DenseVector< V >::operator= | ( | const value_type & | k | ) | [inline] |
Assignment operator for scalar.
bool Dune::DenseVector< V >::operator== | ( | const DenseVector< Other > & | y | ) | const [inline] |
Binary vector comparison.
const value_type& Dune::DenseVector< V >::operator[] | ( | size_type | i | ) | const [inline] |
Reimplemented in Dune::DynamicVector< K >, and Dune::FieldVector< K, n >.
value_type& Dune::DenseVector< V >::operator[] | ( | size_type | i | ) | [inline] |
random access
Reimplemented in Dune::DynamicVector< K >, and Dune::FieldVector< K, n >.
size_type Dune::DenseVector< V >::size | ( | ) | const [inline] |
size method
Reimplemented in Dune::DynamicVector< K, Allocator >, and Dune::DynamicVector< K >.
FieldTraits<value_type>::real_type Dune::DenseVector< V >::two_norm | ( | ) | const [inline] |
two norm sqrt(sum over squared values of entries)
FieldTraits<value_type>::real_type Dune::DenseVector< V >::two_norm2 | ( | ) | const [inline] |
square of two norm (sum over squared values of entries), need for block recursion