DGtal 1.3.0
Loading...
Searching...
No Matches
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
 the adapted DGtal graph class. More...
 
typedef undirected_tag directed_category
 the graph is undirected. More...
 
typedef DigitalSurface_graph_traversal_category traversal_category
 the graph satisfies AdjacencyListGraph and VertexListGraph concepts. More...
 
typedef disallow_parallel_edge_tag edge_parallel_category
 the graph does not allow parallel edges. More...
 
typedef Adapted::Size vertices_size_type
 the type for counting vertices More...
 
typedef Adapted::Size edges_size_type
 the type for counting edges More...
 
typedef Adapted::Size degree_size_type
 the type for counting out or in edges More...
 
typedef Adapted::Vertex Vertex
 Vertex type. More...
 
typedef Vertex vertex_descriptor
 Vertex type. More...
 
typedef Adapted::Arc Arc
 (oriented) edge type More...
 
typedef Arc edge_descriptor
 (oriented) edge type More...
 
typedef Adapted::ConstIterator vertex_iterator
 
typedef std::vector< vertex_descriptorAdjacentVertexContainer
 This is the intermediate data structure that is used for visiting adjacent vertices. More...
 
typedef Adapted::ArcRange OutEdgeContainer
 This is the intermediate data structure that is used for storing out edges. More...
 

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

◆ Adapted

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.

◆ AdjacentVertexContainer

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.

◆ Arc

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

(oriented) edge type

Definition at line 116 of file DigitalSurfaceBoostGraphInterface.h.

◆ degree_size_type

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.

◆ directed_category

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.

◆ edge_descriptor

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

(oriented) edge type

Definition at line 118 of file DigitalSurfaceBoostGraphInterface.h.

◆ edge_parallel_category

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.

◆ edges_size_type

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.

◆ OutEdgeContainer

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.

◆ traversal_category

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.

◆ Vertex

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

Vertex type.

Definition at line 112 of file DigitalSurfaceBoostGraphInterface.h.

◆ vertex_descriptor

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

Vertex type.

Definition at line 114 of file DigitalSurfaceBoostGraphInterface.h.

◆ vertex_iterator

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.

◆ vertices_size_type

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

◆ null_vertex()

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: