Construct a vector space out of a tensor product of fields. More...
#include <dune/common/fvector.hh>
Public Types | |
enum | { dimension = SIZE } |
enum | { blocklevel = 1 } |
We are at the leaf of the block recursion. More... | |
enum | { size = SIZE } |
export size More... | |
typedef K | field_type |
export the type representing the field | |
typedef K | block_type |
export the type representing the components | |
typedef std::size_t | size_type |
The type used for the index access and size operation. | |
typedef FieldIterator < FieldVector< K, SIZE >, K > | Iterator |
Iterator class for sequential access. | |
typedef Iterator | iterator |
typedef for stl compliant access | |
typedef FieldIterator< const FieldVector< K, SIZE >, const K > | ConstIterator |
ConstIterator class for sequential access. | |
typedef ConstIterator | const_iterator |
typedef for stl compliant access | |
Public Member Functions | |
FieldVector () | |
Constructor making uninitialized vector. | |
FieldVector (const K &t) | |
Constructor making vector with identical coordinates. | |
FieldVector & | operator= (const K &k) |
Assignment operator for scalar. | |
FieldVector (const FieldVector &other) | |
copy constructor | |
FieldVector & | operator= (const FieldVector &other) |
Assigment from other vector. | |
K & | operator[] (size_type i) |
random access | |
const K & | operator[] (size_type i) const |
same for read only access | |
Iterator | begin () |
begin iterator | |
Iterator | end () |
end iterator | |
Iterator | rbegin () |
begin iterator | |
Iterator | rend () |
end iterator | |
Iterator | find (size_type i) |
return iterator to given element or end() | |
ConstIterator | begin () const |
begin ConstIterator | |
ConstIterator | end () const |
end ConstIterator | |
ConstIterator | rbegin () const |
begin ConstIterator | |
ConstIterator | rend () const |
end ConstIterator | |
ConstIterator | find (size_type i) const |
return iterator to given element or end() | |
FieldVector & | operator+= (const FieldVector &y) |
vector space addition | |
FieldVector & | operator-= (const FieldVector &y) |
vector space subtraction | |
FieldVector< K, size > | operator+ (const FieldVector< K, size > &b) const |
Binary vector addition. | |
FieldVector< K, size > | operator- (const FieldVector< K, size > &b) const |
Binary vector subtraction. | |
FieldVector & | operator+= (const K &k) |
vector space add scalar to all comps | |
FieldVector & | operator-= (const K &k) |
vector space subtract scalar from all comps | |
FieldVector & | operator*= (const K &k) |
vector space multiplication with scalar | |
FieldVector & | operator/= (const K &k) |
vector space division by scalar | |
bool | operator== (const FieldVector &y) const |
Binary vector comparison. | |
bool | operator!= (const FieldVector &y) const |
Binary vector incomparison. | |
FieldVector & | axpy (const K &a, const FieldVector &y) |
vector space axpy operation ( *this += a y ) | |
K | operator* (const FieldVector &y) const |
scalar product (x^T y) | |
FieldTraits< K >::real_type | one_norm () const |
one norm (sum over absolute values of entries) | |
FieldTraits< K >::real_type | one_norm_real () const |
simplified one norm (uses Manhattan norm for complex values) | |
FieldTraits< K >::real_type | two_norm () const |
two norm sqrt(sum over squared values of entries) | |
FieldTraits< K >::real_type | two_norm2 () const |
square of two norm (sum over squared values of entries), need for block recursion | |
FieldTraits< K >::real_type | infinity_norm () const |
infinity norm (maximum of absolute values of entries) | |
FieldTraits< K >::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 | |
Related Functions | |
(Note that these are not member functions.) | |
template<typename K , int n> | |
std::ostream & | operator<< (std::ostream &s, const FieldVector< K, n > &v) |
Write a FieldVector to an output stream. | |
template<class K , int SIZE> | |
std::istream & | operator>> (std::istream &in, FieldVector< K, SIZE > &v) |
Read a FieldVector from an input stream. |
Construct a vector space out of a tensor product of fields.
K is the field type (use float, double, complex, etc) and SIZE is the number of components.
It is generally assumed that K is a numerical type compatible with double (E.g. norms are always computed in double precision).
typedef K Dune::FieldVector< K, SIZE >::block_type |
export the type representing the components
typedef ConstIterator Dune::FieldVector< K, SIZE >::const_iterator |
typedef for stl compliant access
typedef FieldIterator<const FieldVector<K,SIZE>,const K> Dune::FieldVector< K, SIZE >::ConstIterator |
ConstIterator class for sequential access.
typedef K Dune::FieldVector< K, SIZE >::field_type |
export the type representing the field
typedef Iterator Dune::FieldVector< K, SIZE >::iterator |
typedef for stl compliant access
typedef FieldIterator<FieldVector<K,SIZE>,K> Dune::FieldVector< K, SIZE >::Iterator |
Iterator class for sequential access.
typedef std::size_t Dune::FieldVector< K, SIZE >::size_type |
The type used for the index access and size operation.
anonymous enum |
Dune::FieldVector< K, SIZE >::FieldVector | ( | ) | [inline] |
Constructor making uninitialized vector.
Dune::FieldVector< K, SIZE >::FieldVector | ( | const K & | t | ) | [inline, explicit] |
Constructor making vector with identical coordinates.
Dune::FieldVector< K, SIZE >::FieldVector | ( | const FieldVector< K, SIZE > & | other | ) | [inline] |
copy constructor
FieldVector& Dune::FieldVector< K, SIZE >::axpy | ( | const K & | a, | |
const FieldVector< K, SIZE > & | y | |||
) | [inline] |
vector space axpy operation ( *this += a y )
ConstIterator Dune::FieldVector< K, SIZE >::begin | ( | ) | const [inline] |
begin ConstIterator
Iterator Dune::FieldVector< K, SIZE >::begin | ( | ) | [inline] |
begin iterator
size_type Dune::FieldVector< K, SIZE >::dim | ( | ) | const [inline] |
dimension of the vector space
ConstIterator Dune::FieldVector< K, SIZE >::end | ( | ) | const [inline] |
end ConstIterator
Iterator Dune::FieldVector< K, SIZE >::end | ( | ) | [inline] |
end iterator
ConstIterator Dune::FieldVector< K, SIZE >::find | ( | size_type | i | ) | const [inline] |
return iterator to given element or end()
Iterator Dune::FieldVector< K, SIZE >::find | ( | size_type | i | ) | [inline] |
return iterator to given element or end()
FieldTraits<K>::real_type Dune::FieldVector< K, SIZE >::infinity_norm | ( | ) | const [inline] |
infinity norm (maximum of absolute values of entries)
FieldTraits<K>::real_type Dune::FieldVector< K, SIZE >::infinity_norm_real | ( | ) | const [inline] |
simplified infinity norm (uses Manhattan norm for complex values)
size_type Dune::FieldVector< K, SIZE >::N | ( | ) | const [inline] |
number of blocks in the vector (are of size 1 here)
FieldTraits<K>::real_type Dune::FieldVector< K, SIZE >::one_norm | ( | ) | const [inline] |
one norm (sum over absolute values of entries)
FieldTraits<K>::real_type Dune::FieldVector< K, SIZE >::one_norm_real | ( | ) | const [inline] |
simplified one norm (uses Manhattan norm for complex values)
bool Dune::FieldVector< K, SIZE >::operator!= | ( | const FieldVector< K, SIZE > & | y | ) | const [inline] |
Binary vector incomparison.
K Dune::FieldVector< K, SIZE >::operator* | ( | const FieldVector< K, SIZE > & | y | ) | const [inline] |
scalar product (x^T y)
FieldVector& Dune::FieldVector< K, SIZE >::operator*= | ( | const K & | k | ) | [inline] |
vector space multiplication with scalar
FieldVector<K, size> Dune::FieldVector< K, SIZE >::operator+ | ( | const FieldVector< K, size > & | b | ) | const [inline] |
Binary vector addition.
FieldVector& Dune::FieldVector< K, SIZE >::operator+= | ( | const K & | k | ) | [inline] |
vector space add scalar to all comps
FieldVector& Dune::FieldVector< K, SIZE >::operator+= | ( | const FieldVector< K, SIZE > & | y | ) | [inline] |
vector space addition
FieldVector<K, size> Dune::FieldVector< K, SIZE >::operator- | ( | const FieldVector< K, size > & | b | ) | const [inline] |
Binary vector subtraction.
FieldVector& Dune::FieldVector< K, SIZE >::operator-= | ( | const K & | k | ) | [inline] |
vector space subtract scalar from all comps
FieldVector& Dune::FieldVector< K, SIZE >::operator-= | ( | const FieldVector< K, SIZE > & | y | ) | [inline] |
vector space subtraction
FieldVector& Dune::FieldVector< K, SIZE >::operator/= | ( | const K & | k | ) | [inline] |
vector space division by scalar
FieldVector& Dune::FieldVector< K, SIZE >::operator= | ( | const FieldVector< K, SIZE > & | other | ) | [inline] |
Assigment from other vector.
FieldVector& Dune::FieldVector< K, SIZE >::operator= | ( | const K & | k | ) | [inline] |
Assignment operator for scalar.
bool Dune::FieldVector< K, SIZE >::operator== | ( | const FieldVector< K, SIZE > & | y | ) | const [inline] |
Binary vector comparison.
Referenced by Dune::FieldVector< T, s >::operator!=().
const K& Dune::FieldVector< K, SIZE >::operator[] | ( | size_type | i | ) | const [inline] |
same for read only access
K& Dune::FieldVector< K, SIZE >::operator[] | ( | size_type | i | ) | [inline] |
random access
ConstIterator Dune::FieldVector< K, SIZE >::rbegin | ( | ) | const [inline] |
begin ConstIterator
Iterator Dune::FieldVector< K, SIZE >::rbegin | ( | ) | [inline] |
begin iterator
ConstIterator Dune::FieldVector< K, SIZE >::rend | ( | ) | const [inline] |
end ConstIterator
Iterator Dune::FieldVector< K, SIZE >::rend | ( | ) | [inline] |
end iterator
FieldTraits<K>::real_type Dune::FieldVector< K, SIZE >::two_norm | ( | ) | const [inline] |
two norm sqrt(sum over squared values of entries)
FieldTraits<K>::real_type Dune::FieldVector< K, SIZE >::two_norm2 | ( | ) | const [inline] |
square of two norm (sum over squared values of entries), need for block recursion