DGtal  1.2.0
Data Structures | Public Types | Static Public Member Functions
boost::graph_traits< DGtal::Object< TDigitalTopology, TDigitalSet > > Struct Template Reference

#include <DGtal/graph/ObjectBoostGraphInterface.h>

Data Structures

class  adjacency_iterator
 
class  edge_iterator
 
class  out_edge_iterator
 

Public Types

typedef DGtal::Object< TDigitalTopology, TDigitalSet > Adapted
 the adapted DGtal graph class. More...
 
typedef undirected_tag directed_category
 the graph is undirected. More...
 
typedef Object_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::Edge Edge
 (oriented) edge type More...
 
typedef Edge 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::EdgeRange OutEdgeContainer
 This is the intermediate data structure that is used for storing out edges. More...
 
using in_edge_iterator = out_edge_iterator
 

Static Public Member Functions

static vertex_descriptor null_vertex ()
 

Detailed Description

template<class TDigitalTopology, class TDigitalSet>
struct boost::graph_traits< DGtal::Object< TDigitalTopology, TDigitalSet > >

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

The difficult part is that models of DGtal::CUndirectedSimpleGraph (like DGtal::Object) 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::Object container. Hence, they must be models of MultiPassInputIterator.
Template Parameters
TDigitalTopologyTopology of the set.
TDigitalSetthe container chosen for the digital set.

Definition at line 86 of file ObjectBoostGraphInterface.h.

Member Typedef Documentation

◆ Adapted

template<class TDigitalTopology , class TDigitalSet >
typedef DGtal::Object< TDigitalTopology, TDigitalSet > boost::graph_traits< DGtal::Object< TDigitalTopology, TDigitalSet > >::Adapted

the adapted DGtal graph class.

Definition at line 89 of file ObjectBoostGraphInterface.h.

◆ AdjacentVertexContainer

template<class TDigitalTopology , class TDigitalSet >
typedef std::vector< vertex_descriptor > boost::graph_traits< DGtal::Object< TDigitalTopology, TDigitalSet > >::AdjacentVertexContainer

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

Definition at line 117 of file ObjectBoostGraphInterface.h.

◆ degree_size_type

template<class TDigitalTopology , class TDigitalSet >
typedef Adapted::Size boost::graph_traits< DGtal::Object< TDigitalTopology, TDigitalSet > >::degree_size_type

the type for counting out or in edges

Definition at line 102 of file ObjectBoostGraphInterface.h.

◆ directed_category

template<class TDigitalTopology , class TDigitalSet >
typedef undirected_tag boost::graph_traits< DGtal::Object< TDigitalTopology, TDigitalSet > >::directed_category

the graph is undirected.

Definition at line 91 of file ObjectBoostGraphInterface.h.

◆ Edge

template<class TDigitalTopology , class TDigitalSet >
typedef Adapted::Edge boost::graph_traits< DGtal::Object< TDigitalTopology, TDigitalSet > >::Edge

(oriented) edge type

Definition at line 109 of file ObjectBoostGraphInterface.h.

◆ edge_descriptor

template<class TDigitalTopology , class TDigitalSet >
typedef Edge boost::graph_traits< DGtal::Object< TDigitalTopology, TDigitalSet > >::edge_descriptor

(oriented) edge type

Definition at line 111 of file ObjectBoostGraphInterface.h.

◆ edge_parallel_category

template<class TDigitalTopology , class TDigitalSet >
typedef disallow_parallel_edge_tag boost::graph_traits< DGtal::Object< TDigitalTopology, TDigitalSet > >::edge_parallel_category

the graph does not allow parallel edges.

Definition at line 95 of file ObjectBoostGraphInterface.h.

◆ edges_size_type

template<class TDigitalTopology , class TDigitalSet >
typedef Adapted::Size boost::graph_traits< DGtal::Object< TDigitalTopology, TDigitalSet > >::edges_size_type

the type for counting edges

Definition at line 100 of file ObjectBoostGraphInterface.h.

◆ in_edge_iterator

template<class TDigitalTopology , class TDigitalSet >
using boost::graph_traits< DGtal::Object< TDigitalTopology, TDigitalSet > >::in_edge_iterator = out_edge_iterator

Alias to use in_edge_iterator as out_edge_iterator. Required by filtered_graph algorithm.

Definition at line 364 of file ObjectBoostGraphInterface.h.

◆ OutEdgeContainer

template<class TDigitalTopology , class TDigitalSet >
typedef Adapted::EdgeRange boost::graph_traits< DGtal::Object< TDigitalTopology, TDigitalSet > >::OutEdgeContainer

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

Definition at line 119 of file ObjectBoostGraphInterface.h.

◆ traversal_category

template<class TDigitalTopology , class TDigitalSet >
typedef Object_graph_traversal_category boost::graph_traits< DGtal::Object< TDigitalTopology, TDigitalSet > >::traversal_category

the graph satisfies AdjacencyListGraph and VertexListGraph concepts.

Definition at line 93 of file ObjectBoostGraphInterface.h.

◆ Vertex

template<class TDigitalTopology , class TDigitalSet >
typedef Adapted::Vertex boost::graph_traits< DGtal::Object< TDigitalTopology, TDigitalSet > >::Vertex

Vertex type.

Definition at line 105 of file ObjectBoostGraphInterface.h.

◆ vertex_descriptor

template<class TDigitalTopology , class TDigitalSet >
typedef Vertex boost::graph_traits< DGtal::Object< TDigitalTopology, TDigitalSet > >::vertex_descriptor

Vertex type.

Definition at line 107 of file ObjectBoostGraphInterface.h.

◆ vertex_iterator

template<class TDigitalTopology , class TDigitalSet >
typedef Adapted::ConstIterator boost::graph_traits< DGtal::Object< TDigitalTopology, TDigitalSet > >::vertex_iterator

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

Definition at line 114 of file ObjectBoostGraphInterface.h.

◆ vertices_size_type

template<class TDigitalTopology , class TDigitalSet >
typedef Adapted::Size boost::graph_traits< DGtal::Object< TDigitalTopology, TDigitalSet > >::vertices_size_type

the type for counting vertices

Definition at line 98 of file ObjectBoostGraphInterface.h.

Member Function Documentation

◆ null_vertex()

template<class TDigitalTopology , class TDigitalSet >
static vertex_descriptor boost::graph_traits< DGtal::Object< TDigitalTopology, TDigitalSet > >::null_vertex ( )
inlinestatic
Returns
the invalid vertex for that kind of graph (default Vertex()).

Definition at line 127 of file ObjectBoostGraphInterface.h.


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