graph.h File Reference

Some graph functions needed.. More...

#include <vector>
#include <set>
#include <queue>
#include <hugin_utils/stl_utils.h>

Include dependency graph for graph.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.


namespace  hugin_utils


struct  hugin_utils::GraphEdge
struct  hugin_utils::RemoveVisitor
 removes vertices from the set More...
struct  hugin_utils::TrackVisitor
 remember/track all visited vertices More...


typedef std::vector< int > AdjList
typedef std::vector< AdjListAdjListGraph


void findSubGraphs (AdjListGraph &graph, std::vector< int > &subgraphStart)
 find subgraphs
template<class FUNCTOR>
void traverseEdges (const AdjListGraph &graph, int startNode, FUNCTOR &visitor)
 traverse a graph, and run visitor on every vertice - vertice edge encounterd
template<class FUNCTOR>
void traverseVertices (const AdjListGraph &graph, int start, FUNCTOR &visitor)
 traverse graph vertices

Detailed Description

Some graph functions needed..

Should be replaced with bgl, the graph library from BOOST

Pablo d'Angelo <>

This is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU General Public License along with this software; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Definition in file graph.h.

Typedef Documentation

typedef std::vector<int> hugin_utils::AdjList

Definition at line 42 of file graph.h.

typedef std::vector<AdjList> hugin_utils::AdjListGraph

Definition at line 43 of file graph.h.

Function Documentation

void hugin_utils::findSubGraphs AdjListGraph graph,
std::vector< int > &  subgraphStart

find subgraphs

Actually, we could just use the BOOST graph library instead of hacking our own graph functions.

Definition at line 39 of file graph.cpp.

References hugin_utils::traverseVertices().

template<class FUNCTOR>
void traverseEdges const AdjListGraph graph,
int  startNode,
FUNCTOR &  visitor

traverse a graph, and run visitor on every vertice - vertice edge encounterd

Definition at line 81 of file graph.h.

References DEBUG_DEBUG, and set_contains().

template<class FUNCTOR>
void traverseVertices const AdjListGraph graph,
int  start,
FUNCTOR &  visitor

traverse graph vertices

Definition at line 121 of file graph.h.

References set_contains().

Referenced by hugin_utils::findSubGraphs().

Generated on Fri Sep 19 01:25:41 2014 for Hugintrunk by  doxygen