Index: src/hugo/bfs.h
===================================================================
--- src/hugo/bfs.h (revision 781)
+++ src/hugo/bfs.h (revision 802)
@@ -35,7 +35,11 @@
///The type of the underlying graph.
typedef GR Graph;
+ ///.
typedef typename Graph::Node Node;
+ ///.
typedef typename Graph::NodeIt NodeIt;
+ ///.
typedef typename Graph::Edge Edge;
+ ///.
typedef typename Graph::OutEdgeIt OutEdgeIt;
@@ -50,13 +54,20 @@
private:
+ /// Pointer to the underlying graph.
const Graph *G;
+ ///Pointer to the map of predecessors edges.
PredMap *predecessor;
+ ///Indicates if \ref predecessor is locally allocated (\c true) or not.
bool local_predecessor;
+ ///Pointer to the map of predecessors nodes.
PredNodeMap *pred_node;
+ ///Indicates if \ref pred_node is locally allocated (\c true) or not.
bool local_pred_node;
+ ///Pointer to the map of distances.
DistMap *distance;
+ ///Indicates if \ref distance is locally allocated (\c true) or not.
bool local_distance;
- //The source node of the last execution.
+ ///The source node of the last execution.
Node source;
@@ -80,4 +91,7 @@
public :
+ ///Constructor.
+
+ ///\param _G the graph the algorithm will run on.
Bfs(const Graph& _G) :
G(&_G),
@@ -87,4 +101,5 @@
{ }
+ ///Destructor.
~Bfs()
{
@@ -94,15 +109,4 @@
}
- ///Sets the graph the algorithm will run on.
-
- ///Sets the graph the algorithm will run on.
- ///\return (*this)
- ///\bug What about maps?
- ///\todo It may be unnecessary
- Bfs &setGraph(const Graph &_G)
- {
- G = &_G;
- return *this;
- }
///Sets the map storing the predecessor edges.
@@ -250,5 +254,5 @@
///Returns \c true if \c v is reachable from the root.
- ///\warning The root node is reported to be reached!
+ ///\note The root node is reported to be reached!
///
///\pre \ref run() must be called before using this function.
Index: src/hugo/dfs.h
===================================================================
--- src/hugo/dfs.h (revision 781)
+++ src/hugo/dfs.h (revision 802)
@@ -34,7 +34,11 @@
///The type of the underlying graph.
typedef GR Graph;
+ /// .
typedef typename Graph::Node Node;
+ /// .
typedef typename Graph::NodeIt NodeIt;
+ /// .
typedef typename Graph::Edge Edge;
+ /// .
typedef typename Graph::OutEdgeIt OutEdgeIt;
@@ -49,13 +53,20 @@
private:
+ /// Pointer to the underlying graph.
const Graph *G;
+ ///Pointer to the map of predecessors edges.
PredMap *predecessor;
+ ///Indicates if \ref predecessor is locally allocated (\c true) or not.
bool local_predecessor;
+ ///Pointer to the map of predecessors nodes.
PredNodeMap *pred_node;
+ ///Indicates if \ref pred_node is locally allocated (\c true) or not.
bool local_pred_node;
+ ///Pointer to the map of distances.
DistMap *distance;
+ ///Indicates if \ref distance is locally allocated (\c true) or not.
bool local_distance;
- //The source node of the last execution.
+ ///The source node of the last execution.
Node source;
@@ -79,4 +90,7 @@
public :
+ ///Constructor.
+
+ ///\param _G the graph the algorithm will run on.
Dfs(const Graph& _G) :
G(&_G),
@@ -86,4 +100,5 @@
{ }
+ ///Destructor.
~Dfs()
{
@@ -93,15 +108,4 @@
}
- ///Sets the graph the algorithm will run on.
-
- ///Sets the graph the algorithm will run on.
- ///\return (*this)
- ///\bug What about maps?
- ///\todo It may be unnecessary
- Dfs &setGraph(const Graph &_G)
- {
- G = &_G;
- return *this;
- }
///Sets the map storing the predecessor edges.
@@ -254,5 +258,5 @@
///Returns \c true if \c v is reachable from the root.
- ///\warning The root node is reported to be reached!
+ ///\note The root node is reported to be reached!
///
///\pre \ref run() must be called before using this function.
Index: src/hugo/dijkstra.h
===================================================================
--- src/hugo/dijkstra.h (revision 785)
+++ src/hugo/dijkstra.h (revision 802)
@@ -56,7 +56,11 @@
///The type of the underlying graph.
typedef GR Graph;
+ ///.
typedef typename Graph::Node Node;
+ ///.
typedef typename Graph::NodeIt NodeIt;
+ ///.
typedef typename Graph::Edge Edge;
+ ///.
typedef typename Graph::OutEdgeIt OutEdgeIt;
@@ -75,15 +79,22 @@
private:
+ /// Pointer to the underlying graph.
const Graph *G;
+ /// Pointer to the length map
const LM *length;
- // bool local_length;
+ ///Pointer to the map of predecessors edges.
PredMap *predecessor;
+ ///Indicates if \ref predecessor is locally allocated (\c true) or not.
bool local_predecessor;
+ ///Pointer to the map of predecessors nodes.
PredNodeMap *pred_node;
+ ///Indicates if \ref pred_node is locally allocated (\c true) or not.
bool local_pred_node;
+ ///Pointer to the map of distances.
DistMap *distance;
+ ///Indicates if \ref distance is locally allocated (\c true) or not.
bool local_distance;
- //The source node of the last execution.
+ ///The source node of the last execution.
Node source;
@@ -94,8 +105,4 @@
void init_maps()
{
-// if(!length) {
-// local_length = true;
-// length = new LM(G);
-// }
if(!predecessor) {
local_predecessor = true;
@@ -113,5 +120,8 @@
public :
-
+ ///Constructor.
+
+ ///\param _G the graph the algorithm will run on.
+ ///\param _length the length map used by the algorithm.
Dijkstra(const Graph& _G, const LM& _length) :
G(&_G), length(&_length),
@@ -121,7 +131,7 @@
{ }
+ ///Destructor.
~Dijkstra()
{
- // if(local_length) delete length;
if(local_predecessor) delete predecessor;
if(local_pred_node) delete pred_node;
@@ -129,15 +139,4 @@
}
- ///Sets the graph the algorithm will run on.
-
- ///Sets the graph the algorithm will run on.
- ///\return (*this)
- ///\bug What about maps?
- ///\todo It may be unnecessary
- Dijkstra &setGraph(const Graph &_G)
- {
- G = &_G;
- return *this;
- }
///Sets the length map.
@@ -146,8 +145,4 @@
Dijkstra &setLengthMap(const LM &m)
{
-// if(local_length) {
-// delete length;
-// local_length=false;
-// }
length = &m;
return *this;
@@ -318,5 +313,5 @@
///Returns \c true if \c v is reachable from the root.
- ///\warning the root node is reported to be reached!
+ ///\note The root node is reported to be reached!
///\pre \ref run() must be called before using this function.
///