CAPD RedHom Library
capd::graph::impl::GridGraphBase< IndexerT, VertexValidator, _DIM > Class Template Reference

#include <capd/graph/GridGraph.h>

Classes

struct  Edge
 
struct  GetVertexPairOutEdges
 
struct  Vertex
 
struct  View
 

Public Types

typedef IndexerT Indexer
 
typedef Indexer::Index Index
 
typedef Indexer::Coordinates Coordinates
 
typedef Indexer::Value Id
 
typedef std::pair< Vertex, CoordinatesVertexPair
 
typedef homAux::SmallVector< Edge, NeighberhoodSizeOutEdges
 
typedef homAux::SmallVector< int, NeighberhoodSizePrecomputedNeighboursDiff
 

Public Member Functions

 GridGraphBase (Indexer indexer, VertexValidator vertexValidator, Index maxVertex, PrecomputedNeighboursDiff precomputedNeighboursDiff=PrecomputedNeighboursDiff())
 
bool isValid (const Vertex &v) const
 
template<typename Callback >
void forAllEdges (Callback cb) const
 
const Indexerindexer () const
 
size_t size () const
 
template<int NDims>
View< NDims >::type operator[] (const boost::detail::multi_array::index_gen< Indexer::DIM, NDims > &indices) const
 

Static Public Attributes

static const int DIM = _DIM
 
static const int NeighberhoodSize = DIM * 2
 

Protected Member Functions

template<typename VertexPair >
OutEdges vertexPairOutEdges (const VertexPair &v) const
 
template<typename VertexPairs , typename Callback >
void edgesImpl (VertexPairs vertexPairs, Callback callback) const
 
template<typename Indices , typename Callback >
void computeNeighbours (Indices &indices, Callback callback) const
 

Protected Attributes

Indexer _indexer
 
VertexValidator _vertexValidator
 
Index _maxVertex
 
PrecomputedNeighboursDiff _precomputedNeighboursDiff
 
 CAPD_CLASS_LOGGER
 

Member Typedef Documentation

template<typename IndexerT, typename VertexValidator, int _DIM = IndexerT::DIM>
typedef Indexer::Coordinates capd::graph::impl::GridGraphBase< IndexerT, VertexValidator, _DIM >::Coordinates
template<typename IndexerT, typename VertexValidator, int _DIM = IndexerT::DIM>
typedef Indexer::Value capd::graph::impl::GridGraphBase< IndexerT, VertexValidator, _DIM >::Id
template<typename IndexerT, typename VertexValidator, int _DIM = IndexerT::DIM>
typedef Indexer::Index capd::graph::impl::GridGraphBase< IndexerT, VertexValidator, _DIM >::Index
template<typename IndexerT, typename VertexValidator, int _DIM = IndexerT::DIM>
typedef IndexerT capd::graph::impl::GridGraphBase< IndexerT, VertexValidator, _DIM >::Indexer
template<typename IndexerT, typename VertexValidator, int _DIM = IndexerT::DIM>
typedef homAux::SmallVector<Edge, NeighberhoodSize> capd::graph::impl::GridGraphBase< IndexerT, VertexValidator, _DIM >::OutEdges
template<typename IndexerT, typename VertexValidator, int _DIM = IndexerT::DIM>
typedef homAux::SmallVector<int, NeighberhoodSize> capd::graph::impl::GridGraphBase< IndexerT, VertexValidator, _DIM >::PrecomputedNeighboursDiff
template<typename IndexerT, typename VertexValidator, int _DIM = IndexerT::DIM>
typedef std::pair<Vertex, Coordinates> capd::graph::impl::GridGraphBase< IndexerT, VertexValidator, _DIM >::VertexPair

Constructor & Destructor Documentation

template<typename IndexerT, typename VertexValidator, int _DIM = IndexerT::DIM>
capd::graph::impl::GridGraphBase< IndexerT, VertexValidator, _DIM >::GridGraphBase ( Indexer  indexer,
VertexValidator  vertexValidator,
Index  maxVertex,
PrecomputedNeighboursDiff  precomputedNeighboursDiff = PrecomputedNeighboursDiff() 
)
inline

Member Function Documentation

template<typename IndexerT, typename VertexValidator, int _DIM = IndexerT::DIM>
template<typename Indices , typename Callback >
void capd::graph::impl::GridGraphBase< IndexerT, VertexValidator, _DIM >::computeNeighbours ( Indices &  indices,
Callback  callback 
) const
inlineprotected
template<typename IndexerT, typename VertexValidator, int _DIM = IndexerT::DIM>
template<typename VertexPairs , typename Callback >
void capd::graph::impl::GridGraphBase< IndexerT, VertexValidator, _DIM >::edgesImpl ( VertexPairs  vertexPairs,
Callback  callback 
) const
inlineprotected
template<typename IndexerT, typename VertexValidator, int _DIM = IndexerT::DIM>
template<typename Callback >
void capd::graph::impl::GridGraphBase< IndexerT, VertexValidator, _DIM >::forAllEdges ( Callback  cb) const
inline
template<typename IndexerT, typename VertexValidator, int _DIM = IndexerT::DIM>
const Indexer& capd::graph::impl::GridGraphBase< IndexerT, VertexValidator, _DIM >::indexer ( ) const
inline
template<typename IndexerT, typename VertexValidator, int _DIM = IndexerT::DIM>
bool capd::graph::impl::GridGraphBase< IndexerT, VertexValidator, _DIM >::isValid ( const Vertex v) const
inline
template<typename IndexerT, typename VertexValidator, int _DIM = IndexerT::DIM>
template<int NDims>
View<NDims>::type capd::graph::impl::GridGraphBase< IndexerT, VertexValidator, _DIM >::operator[] ( const boost::detail::multi_array::index_gen< Indexer::DIM, NDims > &  indices) const
inline
template<typename IndexerT, typename VertexValidator, int _DIM = IndexerT::DIM>
size_t capd::graph::impl::GridGraphBase< IndexerT, VertexValidator, _DIM >::size ( ) const
inline
template<typename IndexerT, typename VertexValidator, int _DIM = IndexerT::DIM>
template<typename VertexPair >
OutEdges capd::graph::impl::GridGraphBase< IndexerT, VertexValidator, _DIM >::vertexPairOutEdges ( const VertexPair v) const
inlineprotected

Member Data Documentation

template<typename IndexerT, typename VertexValidator, int _DIM = IndexerT::DIM>
Indexer capd::graph::impl::GridGraphBase< IndexerT, VertexValidator, _DIM >::_indexer
protected
template<typename IndexerT, typename VertexValidator, int _DIM = IndexerT::DIM>
Index capd::graph::impl::GridGraphBase< IndexerT, VertexValidator, _DIM >::_maxVertex
protected
template<typename IndexerT, typename VertexValidator, int _DIM = IndexerT::DIM>
PrecomputedNeighboursDiff capd::graph::impl::GridGraphBase< IndexerT, VertexValidator, _DIM >::_precomputedNeighboursDiff
protected
template<typename IndexerT, typename VertexValidator, int _DIM = IndexerT::DIM>
VertexValidator capd::graph::impl::GridGraphBase< IndexerT, VertexValidator, _DIM >::_vertexValidator
protected
template<typename IndexerT, typename VertexValidator, int _DIM = IndexerT::DIM>
capd::graph::impl::GridGraphBase< IndexerT, VertexValidator, _DIM >::CAPD_CLASS_LOGGER
protected
template<typename IndexerT, typename VertexValidator, int _DIM = IndexerT::DIM>
const int capd::graph::impl::GridGraphBase< IndexerT, VertexValidator, _DIM >::DIM = _DIM
static
template<typename IndexerT, typename VertexValidator, int _DIM = IndexerT::DIM>
const int capd::graph::impl::GridGraphBase< IndexerT, VertexValidator, _DIM >::NeighberhoodSize = DIM * 2
static