dune-istl  2.3beta2
Public Types | Public Member Functions | Friends | List of all members
Dune::Amg::MatrixGraph< M >::EdgeIteratorT< C > Class Template Reference

Iterator over all edges starting from a vertex. More...

#include <dune/istl/paamg/graph.hh>

Public Types

enum  { isMutable = is_same<C, MutableContainer>::value }
typedef remove_const< C >::type MutableContainer
 The mutable type of the container type.
typedef const remove_const< C >
::type 
ConstContainer
 The constant type of the container type.
typedef conditional< isMutable
&&C::mutableMatrix, typename
Matrix::row_type::Iterator,
typename
Matrix::row_type::ConstIterator >
::type 
ColIterator
 The column iterator of the matrix we use.
typedef conditional< isMutable
&&C::mutableMatrix, typename
M::block_type, const typename
M::block_type >::type 
Weight
 The matrix block type we use as weights.
typedef conditional< is_same
< C, typename remove_const< C >
::type >::value
&&C::mutableMatrix, typename
M::block_type, const typename
M::block_type >::type 
WeightType

Public Member Functions

 EdgeIteratorT (const VertexDescriptor &source, const ColIterator &block, const ColIterator &end, const EdgeDescriptor &edge)
 Constructor.
 EdgeIteratorT (const ColIterator &block)
 Constructor for the end iterator.
template<class C1 >
 EdgeIteratorT (const EdgeIteratorT< C1 > &other)
 Copy Constructor.
WeightTypeweight () const
 Access the edge weight.
EdgeIteratorT< C > & operator++ ()
 preincrement operator.
bool operator!= (const EdgeIteratorT< typename remove_const< C >::type > &other) const
 Inequality operator.
bool operator!= (const EdgeIteratorT< const typename remove_const< C >::type > &other) const
 Inequality operator.
bool operator== (const EdgeIteratorT< typename remove_const< C >::type > &other) const
 Equality operator.
bool operator== (const EdgeIteratorT< const typename remove_const< C >::type > &other) const
 Equality operator.
VertexDescriptor target () const
 The index of the target vertex of the current edge.
VertexDescriptor source () const
 The index of the source vertex of the current edge.
const EdgeDescriptoroperator* () const
 Get the edge descriptor.
const EdgeDescriptoroperator-> () const
 Get the edge descriptor.

Friends

class EdgeIteratorT< MutableContainer >
class EdgeIteratorT< ConstContainer >

Detailed Description

template<class M>
template<class C>
class Dune::Amg::MatrixGraph< M >::EdgeIteratorT< C >

Iterator over all edges starting from a vertex.

Member Typedef Documentation

template<class M>
template<class C>
typedef conditional<isMutable && C::mutableMatrix,typename Matrix::row_type::Iterator, typename Matrix::row_type::ConstIterator>::type Dune::Amg::MatrixGraph< M >::EdgeIteratorT< C >::ColIterator

The column iterator of the matrix we use.

template<class M>
template<class C>
typedef const remove_const<C>::type Dune::Amg::MatrixGraph< M >::EdgeIteratorT< C >::ConstContainer

The constant type of the container type.

template<class M>
template<class C>
typedef remove_const<C>::type Dune::Amg::MatrixGraph< M >::EdgeIteratorT< C >::MutableContainer

The mutable type of the container type.

template<class M>
template<class C>
typedef conditional<isMutable && C::mutableMatrix,typename M::block_type, const typename M::block_type>::type Dune::Amg::MatrixGraph< M >::EdgeIteratorT< C >::Weight

The matrix block type we use as weights.

template<class M>
template<class C>
typedef conditional<is_same<C, typename remove_const<C>::type>::value && C::mutableMatrix, typename M::block_type, const typename M::block_type>::type Dune::Amg::MatrixGraph< M >::EdgeIteratorT< C >::WeightType

Member Enumeration Documentation

template<class M>
template<class C>
anonymous enum
Enumerator:
isMutable 

whether C is mutable.

Constructor & Destructor Documentation

template<class M>
template<class C>
Dune::Amg::MatrixGraph< M >::EdgeIteratorT< C >::EdgeIteratorT ( const VertexDescriptor source,
const ColIterator block,
const ColIterator end,
const EdgeDescriptor edge 
)

Constructor.

Parameters
sourceThe source vertex of the edges.
blockThe matrix column block the iterator is initialized to,
endThe end iterator of the matrix row.
edgeThe edge descriptor of the current edge.
template<class M>
template<class C>
Dune::Amg::MatrixGraph< M >::EdgeIteratorT< C >::EdgeIteratorT ( const ColIterator block)

Constructor for the end iterator.

Variables not needed by operator== or operator!= will not be initialized.

Parameters
blockThe matrix column block the iterator is initialized to.
template<class M>
template<class C>
template<class C1 >
Dune::Amg::MatrixGraph< M >::EdgeIteratorT< C >::EdgeIteratorT ( const EdgeIteratorT< C1 > &  other)

Copy Constructor.

Parameters
otherThe iterator to copy.

Member Function Documentation

template<class M>
template<class C>
bool Dune::Amg::MatrixGraph< M >::EdgeIteratorT< C >::operator!= ( const EdgeIteratorT< typename remove_const< C >::type > &  other) const

Inequality operator.

template<class M>
template<class C>
bool Dune::Amg::MatrixGraph< M >::EdgeIteratorT< C >::operator!= ( const EdgeIteratorT< const typename remove_const< C >::type > &  other) const

Inequality operator.

template<class M>
template<class C>
const EdgeDescriptor& Dune::Amg::MatrixGraph< M >::EdgeIteratorT< C >::operator* ( ) const

Get the edge descriptor.

template<class M>
template<class C>
EdgeIteratorT<C>& Dune::Amg::MatrixGraph< M >::EdgeIteratorT< C >::operator++ ( )

preincrement operator.

template<class M>
template<class C>
const EdgeDescriptor* Dune::Amg::MatrixGraph< M >::EdgeIteratorT< C >::operator-> ( ) const

Get the edge descriptor.

template<class M>
template<class C>
bool Dune::Amg::MatrixGraph< M >::EdgeIteratorT< C >::operator== ( const EdgeIteratorT< typename remove_const< C >::type > &  other) const

Equality operator.

template<class M>
template<class C>
bool Dune::Amg::MatrixGraph< M >::EdgeIteratorT< C >::operator== ( const EdgeIteratorT< const typename remove_const< C >::type > &  other) const

Equality operator.

template<class M>
template<class C>
VertexDescriptor Dune::Amg::MatrixGraph< M >::EdgeIteratorT< C >::source ( ) const

The index of the source vertex of the current edge.

template<class M>
template<class C>
VertexDescriptor Dune::Amg::MatrixGraph< M >::EdgeIteratorT< C >::target ( ) const

The index of the target vertex of the current edge.

template<class M>
template<class C>
WeightType& Dune::Amg::MatrixGraph< M >::EdgeIteratorT< C >::weight ( ) const

Access the edge weight.

Friends And Related Function Documentation

template<class M>
template<class C>
friend class EdgeIteratorT< ConstContainer >
friend
template<class M>
template<class C>
friend class EdgeIteratorT< MutableContainer >
friend

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