DGtal  0.9.3beta
Data Structures | Public Types | Static Public Member Functions
boost::graph_traits< DGtal::DigitalSurface< TDigitalSurfaceContainer > > Struct Template Reference

#include <DGtal/graph/DigitalSurfaceBoostGraphInterface.h>

Data Structures

class  adjacency_iterator
 
class  edge_iterator
 
class  out_edge_iterator
 

Public Types

typedef DGtal::DigitalSurface< TDigitalSurfaceContainer > Adapted
 
typedef undirected_tag directed_category
 
typedef DigitalSurface_graph_traversal_category traversal_category
 
typedef disallow_parallel_edge_tag edge_parallel_category
 
typedef Adapted::Size vertices_size_type
 
typedef Adapted::Size edges_size_type
 
typedef Adapted::Size degree_size_type
 
typedef Adapted::Vertex Vertex
 
typedef Vertex vertex_descriptor
 
typedef Adapted::Arc Arc
 
typedef Arc edge_descriptor
 
typedef Adapted::ConstIterator vertex_iterator
 
typedef std::vector< vertex_descriptorAdjacentVertexContainer
 
typedef Adapted::ArcRange OutEdgeContainer
 

Static Public Member Functions

static vertex_descriptor null_vertex ()
 

Detailed Description

template<class TDigitalSurfaceContainer>
struct boost::graph_traits< DGtal::DigitalSurface< TDigitalSurfaceContainer > >

Defines the boost graph traits for any kind of digital surface (see DGtal::DigitalSurface). With these definitions, a DGtal::DigitalSurface is a model of VertexListGraphConcept, AdjacencyGraphConcept, IncidenceGraphConcept, EdgeListGraphConcept. You may use DGtal::DigitalSurface as is in BOOST graph algorithms (see http://www.boost.org/doc/libs/1_52_0/libs/graph/doc/table_of_contents.html).

The difficult part is that models of DGtal::CUndirectedSimpleGraph (like DGtal::DigitalSurface) are only required to provide vertex iterators that are models of SinglePassIterator. Furthermore, no edge iterators are required, only the list of adjacent vertices. Therefore, most of the work is to create iterators over edges that are "persistent", i.e. models of MultiPassInputIterator (very similar to ForwardIterator).

Remarks
Note that, for now, vertex iterators are taken as is from the DGtal::DigitalSurface container. Hence, they must be models of MultiPassInputIterator. This is the case for containers DGtal::SetOfSurfels, DGtal::DigitalSetBoundary, DGtal::ImplicitDigitalSurface, DGtal::ExplicitDigitalSurface. This is not the case of containers DGtal::LightImplicitDigitalSurface and DGtal::LightExplicitDigitalSurface.
Template Parameters
TDigitalSurfaceContainerthe container chosen for the digital surface. Should work with DGtal::DigitalSetBoundary, DGtal::SetOfSurfels, DGtal::ExplicitDigitalSurface, DGtal::ImplicitDigitalSurface. DGtal::LightImplicitDigitalSurface and DGtal::LightExplicitDigitalSurface containers may not work since their vertex iterator is not multipass.

Definition at line 93 of file DigitalSurfaceBoostGraphInterface.h.

Member Typedef Documentation

template<class TDigitalSurfaceContainer >
typedef DGtal::DigitalSurface< TDigitalSurfaceContainer > boost::graph_traits< DGtal::DigitalSurface< TDigitalSurfaceContainer > >::Adapted

the adapted DGtal graph class.

Definition at line 96 of file DigitalSurfaceBoostGraphInterface.h.

template<class TDigitalSurfaceContainer >
typedef std::vector< vertex_descriptor > boost::graph_traits< DGtal::DigitalSurface< TDigitalSurfaceContainer > >::AdjacentVertexContainer

This is the intermediate data structure that is used for visiting adjacent vertices.

Definition at line 124 of file DigitalSurfaceBoostGraphInterface.h.

template<class TDigitalSurfaceContainer >
typedef Adapted::Arc boost::graph_traits< DGtal::DigitalSurface< TDigitalSurfaceContainer > >::Arc

(oriented) edge type

Definition at line 116 of file DigitalSurfaceBoostGraphInterface.h.

template<class TDigitalSurfaceContainer >
typedef Adapted::Size boost::graph_traits< DGtal::DigitalSurface< TDigitalSurfaceContainer > >::degree_size_type

the type for counting out or in edges

Definition at line 109 of file DigitalSurfaceBoostGraphInterface.h.

template<class TDigitalSurfaceContainer >
typedef undirected_tag boost::graph_traits< DGtal::DigitalSurface< TDigitalSurfaceContainer > >::directed_category

the graph is undirected.

Definition at line 98 of file DigitalSurfaceBoostGraphInterface.h.

template<class TDigitalSurfaceContainer >
typedef Arc boost::graph_traits< DGtal::DigitalSurface< TDigitalSurfaceContainer > >::edge_descriptor

(oriented) edge type

Definition at line 118 of file DigitalSurfaceBoostGraphInterface.h.

template<class TDigitalSurfaceContainer >
typedef disallow_parallel_edge_tag boost::graph_traits< DGtal::DigitalSurface< TDigitalSurfaceContainer > >::edge_parallel_category

the graph does not allow parallel edges.

Definition at line 102 of file DigitalSurfaceBoostGraphInterface.h.

template<class TDigitalSurfaceContainer >
typedef Adapted::Size boost::graph_traits< DGtal::DigitalSurface< TDigitalSurfaceContainer > >::edges_size_type

the type for counting edges

Definition at line 107 of file DigitalSurfaceBoostGraphInterface.h.

template<class TDigitalSurfaceContainer >
typedef Adapted::ArcRange boost::graph_traits< DGtal::DigitalSurface< TDigitalSurfaceContainer > >::OutEdgeContainer

This is the intermediate data structure that is used for storing out edges.

Definition at line 126 of file DigitalSurfaceBoostGraphInterface.h.

template<class TDigitalSurfaceContainer >
typedef DigitalSurface_graph_traversal_category boost::graph_traits< DGtal::DigitalSurface< TDigitalSurfaceContainer > >::traversal_category

the graph satisfies AdjacencyListGraph and VertexListGraph concepts.

Definition at line 100 of file DigitalSurfaceBoostGraphInterface.h.

template<class TDigitalSurfaceContainer >
typedef Adapted::Vertex boost::graph_traits< DGtal::DigitalSurface< TDigitalSurfaceContainer > >::Vertex

Vertex type.

Definition at line 112 of file DigitalSurfaceBoostGraphInterface.h.

template<class TDigitalSurfaceContainer >
typedef Vertex boost::graph_traits< DGtal::DigitalSurface< TDigitalSurfaceContainer > >::vertex_descriptor

Vertex type.

Definition at line 114 of file DigitalSurfaceBoostGraphInterface.h.

template<class TDigitalSurfaceContainer >
typedef Adapted::ConstIterator boost::graph_traits< DGtal::DigitalSurface< TDigitalSurfaceContainer > >::vertex_iterator

Iterator for visiting vertices. It must be a model of MultiPassInputIterator, i.e. a kind of ForwardIterator.

Definition at line 121 of file DigitalSurfaceBoostGraphInterface.h.

template<class TDigitalSurfaceContainer >
typedef Adapted::Size boost::graph_traits< DGtal::DigitalSurface< TDigitalSurfaceContainer > >::vertices_size_type

the type for counting vertices

Definition at line 105 of file DigitalSurfaceBoostGraphInterface.h.

Member Function Documentation

template<class TDigitalSurfaceContainer >
static vertex_descriptor boost::graph_traits< DGtal::DigitalSurface< TDigitalSurfaceContainer > >::null_vertex ( )
inlinestatic
Returns
the invalid vertex for that kind of graph (default Vertex( 0 )).

Definition at line 134 of file DigitalSurfaceBoostGraphInterface.h.


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