31#if defined(DistanceBreadthFirstVisitor_RECURSES)
32#error Recursive header files inclusion detected in DistanceBreadthFirstVisitor.h
35#define DistanceBreadthFirstVisitor_RECURSES
37#if !defined DistanceBreadthFirstVisitor_h
39#define DistanceBreadthFirstVisitor_h
45#include "DGtal/base/Common.h"
46#include "DGtal/base/ConstAlias.h"
47#include "DGtal/base/CountedPtr.h"
48#include "DGtal/graph/CUndirectedSimpleLocalGraph.h"
202 template <
typename TGraph,
203 typename TVertexFunctor,
204 typename TMarkSet =
typename TGraph::VertexSet >
213 typedef typename Graph::Size
Size;
215 typedef typename VertexFunctor::Value
Scalar;
229 struct Node :
public std::pair< Vertex, Scalar >
231 typedef std::pair< Vertex, Scalar >
Base;
241 return other.second < second;
245 return other.second <= second;
249 return other.second == second;
253 return other.second != second;
302 template <
typename VertexIterator>
305 VertexIterator b, VertexIterator e );
340 template <
typename TBackInsertionSequence>
387 template <
typename VertexPredicate>
388 void expand(
const VertexPredicate & authorized_vtx );
401 template <
typename VertexPredicate>
529 template <
typename TGraph,
typename TVertexFunctor,
typename TMarkSet >
539#include "DGtal/graph/DistanceBreadthFirstVisitor.ih"
546#undef DistanceBreadthFirstVisitor_RECURSES
Aim: This class encapsulates its parameter class so that to indicate to the user that the object/poin...
Aim: This class is useful to perform an exploration of a graph given a starting point or set (called ...
MarkSet visitedVertices() const
DistanceBreadthFirstVisitor(ConstAlias< Graph > graph, const VertexFunctor &distance, const Vertex &p)
const MarkSet & markedVertices() const
TVertexFunctor VertexFunctor
DistanceBreadthFirstVisitor(const DistanceBreadthFirstVisitor &other)
void pushAgain(const Node &node)
DistanceBreadthFirstVisitor(const Graph &graph, const VertexFunctor &distance, VertexIterator b, VertexIterator e)
const Graph & graph() const
void getCurrentLayer(TBackInsertionSequence &layer)
~DistanceBreadthFirstVisitor()
DistanceBreadthFirstVisitor & operator=(const DistanceBreadthFirstVisitor &other)
void expandLayer(const VertexPredicate &authorized_vtx)
std::vector< Vertex > VertexList
Internal data structure for storing vertices.
const Node & current() const
VertexFunctor::Value Scalar
void selfDisplay(std::ostream &out) const
std::priority_queue< Node > NodeQueue
Internal data structure for computing the distance ordering expansion.
void swap(DistanceBreadthFirstVisitor &other)
DistanceBreadthFirstVisitor< TGraph, TVertexFunctor, TMarkSet > Self
void expand(const VertexPredicate &authorized_vtx)
DistanceBreadthFirstVisitor()
DGtal is the top-level namespace which contains all DGtal functions and types.
std::ostream & operator<<(std::ostream &out, const ClosedIntegerHalfPlane< TSpace > &object)
std::pair< Vertex, Scalar > Base
bool operator<=(const Node &other) const
bool operator==(const Node &other) const
bool operator!=(const Node &other) const
Node(const Vertex &v, Scalar d)
bool operator<(const Node &other) const