Interface for a class of dense vectors over a given field. More...

#include <dune/common/densevector.hh>

Inheritance diagram for Dune::DenseVector< V >:
Inheritance graph

List of all members.

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 Traits::value_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_typeoperator= (const value_type &k)
 Assignment operator for scalar.
value_typeoperator[] (size_type i)
 random access
const value_typeoperator[] (size_type i) const
size_type size () const
 size method
Iterator begin ()
 begin iterator
Iterator end ()
 end iterator
Iterator rbegin ()
Iterator beforeEnd ()
Iterator rend ()
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 rbegin () const
ConstIterator beforeEnd () const
ConstIterator rend () const
ConstIterator beforeBegin () const
ConstIterator find (size_type i) const
 return iterator to given element or end()
derived_typeoperator+= (const DenseVector &y)
 vector space addition
derived_typeoperator-= (const DenseVector &y)
 vector space subtraction
derived_type operator+ (const DenseVector &b) const
 Binary vector addition.
derived_type operator- (const DenseVector &b) const
 Binary vector subtraction.
derived_typeoperator+= (const value_type &k)
 vector space add scalar to all comps
derived_typeoperator-= (const value_type &k)
 vector space subtract scalar from all comps
derived_typeoperator*= (const value_type &k)
 vector space multiplication with scalar
derived_typeoperator/= (const value_type &k)
 vector space division by scalar
bool operator== (const DenseVector &y) const
 Binary vector comparison.
bool operator!= (const DenseVector &y) const
 Binary vector incomparison.
derived_typeaxpy (const value_type &a, const DenseVector &y)
 vector space axpy operation ( *this += a y )
value_type operator* (const DenseVector &y) const
 scalar product (x^T y)
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
FieldTraits< value_type >
::real_type 
infinity_norm () const
 infinity norm (maximum of absolute values of entries)
FieldTraits< value_type >
::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 V >
std::ostream & operator<< (std::ostream &s, const DenseVector< V > &v)
 Write a DenseVector to an output stream.

Detailed Description

template<typename V>
class Dune::DenseVector< V >

Interface for a class of dense vectors over a given field.

Template Parameters:
V implementation class of the vector
T value type
S size type

V has to provide the following members:

 T &       _access (size_type);
 const T & _access (size_type) const;
 size_type _size   () const;

Member Typedef Documentation

template<typename V>
typedef Traits::value_type Dune::DenseVector< V >::block_type

export the type representing the components

template<typename V>
typedef ConstIterator Dune::DenseVector< V >::const_iterator

typedef for stl compliant access

template<typename V>
typedef DenseIterator<const DenseVector,const value_type> Dune::DenseVector< V >::ConstIterator

ConstIterator class for sequential access.

template<typename V>
typedef Traits::derived_type Dune::DenseVector< V >::derived_type

type of derived vector class

template<typename V>
typedef Traits::value_type Dune::DenseVector< V >::field_type

export the type representing the field

template<typename V>
typedef Iterator Dune::DenseVector< V >::iterator

typedef for stl compliant access

template<typename V>
typedef DenseIterator<DenseVector,value_type> Dune::DenseVector< V >::Iterator

Iterator class for sequential access.

template<typename V>
typedef Traits::size_type Dune::DenseVector< V >::size_type
template<typename V>
typedef Traits::value_type Dune::DenseVector< V >::value_type

Member Enumeration Documentation

template<typename V>
anonymous enum

We are at the leaf of the block recursion.

Enumerator:
blocklevel 

The number of block levels we contain.


Member Function Documentation

template<typename V>
derived_type& Dune::DenseVector< V >::axpy ( const value_type a,
const DenseVector< V > &  y 
) [inline]

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

template<typename V>
ConstIterator Dune::DenseVector< V >::beforeBegin (  )  const [inline]
Returns:
an iterator that is positioned before the first entry of the vector.
template<typename V>
Iterator Dune::DenseVector< V >::beforeBegin (  )  [inline]
Returns:
an iterator that is positioned before the first entry of the vector.

Referenced by Dune::DenseVector< FieldVector< K, SIZE > >::rbegin(), and Dune::DenseVector< FieldVector< K, SIZE > >::rend().

template<typename V>
Iterator Dune::DenseVector< V >::beforeEnd (  )  [inline]
Returns:
an iterator that is positioned before the end iterator of the vector, i.e. at the last entry.

Referenced by Dune::DenseVector< FieldVector< K, SIZE > >::rbegin().

template<typename V>
ConstIterator Dune::DenseVector< V >::beforeEnd (  )  const [inline]
Returns:
an iterator that is positioned before the end iterator of the vector. i.e. at the last element
template<typename V>
Iterator Dune::DenseVector< V >::begin (  )  [inline]

begin iterator

template<typename V>
ConstIterator Dune::DenseVector< V >::begin (  )  const [inline]

begin ConstIterator

template<typename V>
size_type Dune::DenseVector< V >::dim (  )  const [inline]

dimension of the vector space

template<typename V>
Iterator Dune::DenseVector< V >::end (  )  [inline]

end iterator

template<typename V>
ConstIterator Dune::DenseVector< V >::end (  )  const [inline]

end ConstIterator

template<typename V>
ConstIterator Dune::DenseVector< V >::find ( size_type  i  )  const [inline]

return iterator to given element or end()

template<typename V>
Iterator Dune::DenseVector< V >::find ( size_type  i  )  [inline]

return iterator to given element or end()

template<typename V>
FieldTraits<value_type>::real_type Dune::DenseVector< V >::infinity_norm (  )  const [inline]

infinity norm (maximum of absolute values of entries)

template<typename V>
FieldTraits<value_type>::real_type Dune::DenseVector< V >::infinity_norm_real (  )  const [inline]

simplified infinity norm (uses Manhattan norm for complex values)

template<typename V>
size_type Dune::DenseVector< V >::N (  )  const [inline]

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

template<typename V>
FieldTraits<value_type>::real_type Dune::DenseVector< V >::one_norm (  )  const [inline]

one norm (sum over absolute values of entries)

template<typename V>
FieldTraits<value_type>::real_type Dune::DenseVector< V >::one_norm_real (  )  const [inline]

simplified one norm (uses Manhattan norm for complex values)

template<typename V>
bool Dune::DenseVector< V >::operator!= ( const DenseVector< V > &  y  )  const [inline]

Binary vector incomparison.

template<typename V>
value_type Dune::DenseVector< V >::operator* ( const DenseVector< V > &  y  )  const [inline]

scalar product (x^T y)

template<typename V>
derived_type& Dune::DenseVector< V >::operator*= ( const value_type k  )  [inline]

vector space multiplication with scalar

template<typename V>
derived_type Dune::DenseVector< V >::operator+ ( const DenseVector< V > &  b  )  const [inline]

Binary vector addition.

template<typename V>
derived_type& Dune::DenseVector< V >::operator+= ( const DenseVector< V > &  y  )  [inline]

vector space addition

template<typename V>
derived_type& Dune::DenseVector< V >::operator+= ( const value_type k  )  [inline]

vector space add scalar to all comps

template<typename V>
derived_type Dune::DenseVector< V >::operator- ( const DenseVector< V > &  b  )  const [inline]

Binary vector subtraction.

template<typename V>
derived_type& Dune::DenseVector< V >::operator-= ( const DenseVector< V > &  y  )  [inline]

vector space subtraction

template<typename V>
derived_type& Dune::DenseVector< V >::operator-= ( const value_type k  )  [inline]

vector space subtract scalar from all comps

template<typename V>
derived_type& Dune::DenseVector< V >::operator/= ( const value_type k  )  [inline]

vector space division by scalar

template<typename V>
derived_type& Dune::DenseVector< V >::operator= ( const value_type k  )  [inline]

Assignment operator for scalar.

template<typename V>
bool Dune::DenseVector< V >::operator== ( const DenseVector< V > &  y  )  const [inline]

Binary vector comparison.

Referenced by Dune::DenseVector< FieldVector< K, SIZE > >::operator!=().

template<typename V>
const value_type& Dune::DenseVector< V >::operator[] ( size_type  i  )  const [inline]
template<typename V>
value_type& Dune::DenseVector< V >::operator[] ( size_type  i  )  [inline]

random access

template<typename V>
Iterator Dune::DenseVector< V >::rbegin (  )  [inline]
Deprecated:
This method was renamed to make it distinct from the STL version which returns a reverse iterator. Use the new method beforeEnd instead.
Deprecated:
template<typename V>
ConstIterator Dune::DenseVector< V >::rbegin (  )  const [inline]
Deprecated:
This method was renamed to make it distinct from the STL version which returns a reverse iterator. Use the new method beforeEnd instead.
Deprecated:
template<typename V>
Iterator Dune::DenseVector< V >::rend (  )  [inline]
Deprecated:
This method was renamed to make it distinct from the STL version which returns a reverse iterator. Use the new method beforeBegin instead.
Deprecated:
template<typename V>
ConstIterator Dune::DenseVector< V >::rend (  )  const [inline]
Deprecated:
This method was renamed to make

it distinct from the STL version which returns a reverse iterator. Use the new method beforeBegin instead.

Deprecated:
template<typename V>
FieldTraits<value_type>::real_type Dune::DenseVector< V >::two_norm (  )  const [inline]

two norm sqrt(sum over squared values of entries)

template<typename V>
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


The documentation for this class was generated from the following file:

Generated on Fri Apr 29 2011 with Doxygen (ver 1.7.1) [doxygen-log,error-log].