Dune::FieldVector< K, SIZE > Class Template Reference
[Dense Matrix and Vector Template Library]

Construct a vector space out of a tensor product of fields. More...

#include <dune/common/fvector.hh>

Inheritance diagram for Dune::FieldVector< K, SIZE >:
Inheritance graph

List of all members.

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.
FieldVectoroperator= (const K &k)
 Assignment operator for scalar.
 FieldVector (const FieldVector &other)
 copy constructor
FieldVectoroperator= (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()
FieldVectoroperator+= (const FieldVector &y)
 vector space addition
FieldVectoroperator-= (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.
FieldVectoroperator+= (const K &k)
 vector space add scalar to all comps
FieldVectoroperator-= (const K &k)
 vector space subtract scalar from all comps
FieldVectoroperator*= (const K &k)
 vector space multiplication with scalar
FieldVectoroperator/= (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.
FieldVectoraxpy (const K &a, const FieldVector &y)
 vector space axpy operation ( *this += a y )
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.

Detailed Description

template<class K, int SIZE>
class Dune::FieldVector< K, SIZE >

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).


Member Typedef Documentation

template<class K, int SIZE>
typedef K Dune::FieldVector< K, SIZE >::block_type

export the type representing the components

template<class K, int SIZE>
typedef ConstIterator Dune::FieldVector< K, SIZE >::const_iterator

typedef for stl compliant access

template<class K, int SIZE>
typedef FieldIterator<const FieldVector<K,SIZE>,const K> Dune::FieldVector< K, SIZE >::ConstIterator

ConstIterator class for sequential access.

template<class K, int SIZE>
typedef K Dune::FieldVector< K, SIZE >::field_type

export the type representing the field

template<class K, int SIZE>
typedef Iterator Dune::FieldVector< K, SIZE >::iterator

typedef for stl compliant access

template<class K, int SIZE>
typedef FieldIterator<FieldVector<K,SIZE>,K> Dune::FieldVector< K, SIZE >::Iterator

Iterator class for sequential access.

template<class K, int SIZE>
typedef std::size_t Dune::FieldVector< K, SIZE >::size_type

The type used for the index access and size operation.


Member Enumeration Documentation

template<class K, int SIZE>
anonymous enum
Enumerator:
dimension 
template<class K, int SIZE>
anonymous enum

We are at the leaf of the block recursion.

Enumerator:
blocklevel 

The number of block levels we contain.

template<class K, int SIZE>
anonymous enum

export size

Enumerator:
size 

The size of this vector.


Constructor & Destructor Documentation

template<class K, int SIZE>
Dune::FieldVector< K, SIZE >::FieldVector (  )  [inline]

Constructor making uninitialized vector.

template<class K, int SIZE>
Dune::FieldVector< K, SIZE >::FieldVector ( const K &  t  )  [inline, explicit]

Constructor making vector with identical coordinates.

template<class K, int SIZE>
Dune::FieldVector< K, SIZE >::FieldVector ( const FieldVector< K, SIZE > &  other  )  [inline]

copy constructor


Member Function Documentation

template<class K, int SIZE>
FieldVector& Dune::FieldVector< K, SIZE >::axpy ( const K &  a,
const FieldVector< K, SIZE > &  y 
) [inline]

vector space axpy operation ( *this += a y )

template<class K, int SIZE>
ConstIterator Dune::FieldVector< K, SIZE >::begin (  )  const [inline]

begin ConstIterator

template<class K, int SIZE>
Iterator Dune::FieldVector< K, SIZE >::begin (  )  [inline]

begin iterator

template<class K, int SIZE>
size_type Dune::FieldVector< K, SIZE >::dim (  )  const [inline]

dimension of the vector space

template<class K, int SIZE>
ConstIterator Dune::FieldVector< K, SIZE >::end (  )  const [inline]

end ConstIterator

template<class K, int SIZE>
Iterator Dune::FieldVector< K, SIZE >::end (  )  [inline]

end iterator

template<class K, int SIZE>
ConstIterator Dune::FieldVector< K, SIZE >::find ( size_type  i  )  const [inline]

return iterator to given element or end()

template<class K, int SIZE>
Iterator Dune::FieldVector< K, SIZE >::find ( size_type  i  )  [inline]

return iterator to given element or end()

template<class K, int SIZE>
FieldTraits<K>::real_type Dune::FieldVector< K, SIZE >::infinity_norm (  )  const [inline]

infinity norm (maximum of absolute values of entries)

template<class K, int SIZE>
FieldTraits<K>::real_type Dune::FieldVector< K, SIZE >::infinity_norm_real (  )  const [inline]

simplified infinity norm (uses Manhattan norm for complex values)

template<class K, int SIZE>
size_type Dune::FieldVector< K, SIZE >::N (  )  const [inline]

number of blocks in the vector (are of size 1 here)

template<class K, int SIZE>
FieldTraits<K>::real_type Dune::FieldVector< K, SIZE >::one_norm (  )  const [inline]

one norm (sum over absolute values of entries)

template<class K, int SIZE>
FieldTraits<K>::real_type Dune::FieldVector< K, SIZE >::one_norm_real (  )  const [inline]

simplified one norm (uses Manhattan norm for complex values)

template<class K, int SIZE>
bool Dune::FieldVector< K, SIZE >::operator!= ( const FieldVector< K, SIZE > &  y  )  const [inline]

Binary vector incomparison.

template<class K, int SIZE>
K Dune::FieldVector< K, SIZE >::operator* ( const FieldVector< K, SIZE > &  y  )  const [inline]

scalar product (x^T y)

template<class K, int SIZE>
FieldVector& Dune::FieldVector< K, SIZE >::operator*= ( const K &  k  )  [inline]

vector space multiplication with scalar

template<class K, int SIZE>
FieldVector<K, size> Dune::FieldVector< K, SIZE >::operator+ ( const FieldVector< K, size > &  b  )  const [inline]

Binary vector addition.

template<class K, int SIZE>
FieldVector& Dune::FieldVector< K, SIZE >::operator+= ( const K &  k  )  [inline]

vector space add scalar to all comps

template<class K, int SIZE>
FieldVector& Dune::FieldVector< K, SIZE >::operator+= ( const FieldVector< K, SIZE > &  y  )  [inline]

vector space addition

template<class K, int SIZE>
FieldVector<K, size> Dune::FieldVector< K, SIZE >::operator- ( const FieldVector< K, size > &  b  )  const [inline]

Binary vector subtraction.

template<class K, int SIZE>
FieldVector& Dune::FieldVector< K, SIZE >::operator-= ( const K &  k  )  [inline]

vector space subtract scalar from all comps

template<class K, int SIZE>
FieldVector& Dune::FieldVector< K, SIZE >::operator-= ( const FieldVector< K, SIZE > &  y  )  [inline]

vector space subtraction

template<class K, int SIZE>
FieldVector& Dune::FieldVector< K, SIZE >::operator/= ( const K &  k  )  [inline]

vector space division by scalar

template<class K, int SIZE>
FieldVector& Dune::FieldVector< K, SIZE >::operator= ( const FieldVector< K, SIZE > &  other  )  [inline]

Assigment from other vector.

template<class K, int SIZE>
FieldVector& Dune::FieldVector< K, SIZE >::operator= ( const K &  k  )  [inline]

Assignment operator for scalar.

template<class K, int SIZE>
bool Dune::FieldVector< K, SIZE >::operator== ( const FieldVector< K, SIZE > &  y  )  const [inline]

Binary vector comparison.

Referenced by Dune::FieldVector< T, s >::operator!=().

template<class K, int SIZE>
const K& Dune::FieldVector< K, SIZE >::operator[] ( size_type  i  )  const [inline]

same for read only access

template<class K, int SIZE>
K& Dune::FieldVector< K, SIZE >::operator[] ( size_type  i  )  [inline]

random access

template<class K, int SIZE>
ConstIterator Dune::FieldVector< K, SIZE >::rbegin (  )  const [inline]

begin ConstIterator

template<class K, int SIZE>
Iterator Dune::FieldVector< K, SIZE >::rbegin (  )  [inline]

begin iterator

template<class K, int SIZE>
ConstIterator Dune::FieldVector< K, SIZE >::rend (  )  const [inline]

end ConstIterator

template<class K, int SIZE>
Iterator Dune::FieldVector< K, SIZE >::rend (  )  [inline]

end iterator

template<class K, int SIZE>
FieldTraits<K>::real_type Dune::FieldVector< K, SIZE >::two_norm (  )  const [inline]

two norm sqrt(sum over squared values of entries)

template<class K, int SIZE>
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


The documentation for this class was generated from the following file:
Generated on Mon Apr 26 10:45:23 2010 for dune-common by  doxygen 1.6.3