Index: doc/groups.dox
===================================================================
 doc/groups.dox (revision 434)
+++ doc/groups.dox (revision 474)
@@ 63,10 +63,12 @@
/**
@defgroup graph_adaptors Adaptor Classes for graphs
+@defgroup graph_adaptors Adaptor Classes for Graphs
@ingroup graphs
\brief This group contains several adaptor classes for digraphs and graphs
+\brief Adaptor classes for digraphs and graphs
+
+This group contains several useful adaptor classes for digraphs and graphs.
The main parts of LEMON are the different graph structures, generic
graph algorithms, graph concepts which couple these, and graph
+graph algorithms, graph concepts, which couple them, and graph
adaptors. While the previous notions are more or less clear, the
latter one needs further explanation. Graph adaptors are graph classes
@@ 74,5 +76,5 @@
A short example makes this much clearer. Suppose that we have an
instance \c g of a directed graph type say ListDigraph and an algorithm
+instance \c g of a directed graph type, say ListDigraph and an algorithm
\code
template
@@ 82,11 +84,11 @@
(in time or in memory usage) to copy \c g with the reversed
arcs. In this case, an adaptor class is used, which (according
to LEMON digraph concepts) works as a digraph. The adaptor uses the
original digraph structure and digraph operations when methods of the
reversed oriented graph are called. This means that the adaptor have
minor memory usage, and do not perform sophisticated algorithmic
+to LEMON \ref concepts::Digraph "digraph concepts") works as a digraph.
+The adaptor uses the original digraph structure and digraph operations when
+methods of the reversed oriented graph are called. This means that the adaptor
+have minor memory usage, and do not perform sophisticated algorithmic
actions. The purpose of it is to give a tool for the cases when a
graph have to be used in a specific alteration. If this alteration is
obtained by a usual construction like filtering the arcset or
+obtained by a usual construction like filtering the node or the arc set or
considering a new orientation, then an adaptor is worthwhile to use.
To come back to the reverse oriented graph, in this situation
@@ 97,14 +99,14 @@
\code
ListDigraph g;
ReverseDigraph rg(g);
+ReverseDigraph rg(g);
int result = algorithm(rg);
\endcode
After running the algorithm, the original graph \c g is untouched.
This techniques gives rise to an elegant code, and based on stable
+During running the algorithm, the original digraph \c g is untouched.
+This techniques give rise to an elegant code, and based on stable
graph adaptors, complex algorithms can be implemented easily.
In flow, circulation and bipartite matching problems, the residual
+In flow, circulation and matching problems, the residual
graph is of particular importance. Combining an adaptor implementing
this, shortest path algorithms and minimum mean cycle algorithms,
+this with shortest path algorithms or minimum mean cycle algorithms,
a range of weighted and cardinality optimization algorithms can be
obtained. For other examples, the interested user is referred to the
@@ 113,21 +115,22 @@
The behavior of graph adaptors can be very different. Some of them keep
capabilities of the original graph while in other cases this would be
meaningless. This means that the concepts that they are models of depend
on the graph adaptor, and the wrapped graph(s).
If an arc of \c rg is deleted, this is carried out by deleting the
corresponding arc of \c g, thus the adaptor modifies the original graph.

But for a residual graph, this operation has no sense.
+meaningless. This means that the concepts that they meet depend
+on the graph adaptor, and the wrapped graph.
+For example, if an arc of a reversed digraph is deleted, this is carried
+out by deleting the corresponding arc of the original digraph, thus the
+adaptor modifies the original digraph.
+However in case of a residual digraph, this operation has no sense.
+
Let us stand one more example here to simplify your work.
RevGraphAdaptor has constructor
+ReverseDigraph has constructor
\code
ReverseDigraph(Digraph& digraph);
\endcode
This means that in a situation, when a const ListDigraph&
+This means that in a situation, when a const %ListDigraph&
reference to a graph is given, then it have to be instantiated with
Digraph=const ListDigraph.
+Digraph=const %ListDigraph.
\code
int algorithm1(const ListDigraph& g) {
 RevGraphAdaptor rg(g);
+ ReverseDigraph rg(g);
return algorithm2(rg);
}
Index: lemon/adaptors.h
===================================================================
 lemon/adaptors.h (revision 473)
+++ lemon/adaptors.h (revision 474)
@@ 22,5 +22,5 @@
/// \ingroup graph_adaptors
/// \file
/// \brief Several graph adaptors
+/// \brief Adaptor classes for digraphs and graphs
///
/// This file contains several useful adaptors for digraphs and graphs.
@@ 347,12 +347,20 @@
/// \ingroup graph_adaptors
///
 /// \brief A digraph adaptor which reverses the orientation of the arcs.
 ///
 /// ReverseDigraph reverses the arcs in the adapted digraph. The
 /// SubDigraph is conform to the \ref concepts::Digraph
 /// "Digraph concept".
 ///
 /// \tparam _Digraph It must be conform to the \ref concepts::Digraph
 /// "Digraph concept". The type can be specified to be const.
+ /// \brief Adaptor class for reversing the orientation of the arcs in
+ /// a digraph.
+ ///
+ /// ReverseDigraph can be used for reversing the arcs in a digraph.
+ /// It conforms to the \ref concepts::Digraph "Digraph" concept.
+ ///
+ /// The adapted digraph can also be modified through this adaptor
+ /// by adding or removing nodes or arcs, unless the \c _Digraph template
+ /// parameter is set to be \c const.
+ ///
+ /// \tparam _Digraph The type of the adapted digraph.
+ /// It must conform to the \ref concepts::Digraph "Digraph" concept.
+ /// It can also be specified to be \c const.
+ ///
+ /// \note The \c Node and \c Arc types of this adaptor and the adapted
+ /// digraph are convertible to each other.
template
class ReverseDigraph :
@@ 368,5 +376,5 @@
/// \brief Constructor
///
 /// Creates a reverse digraph adaptor for the given digraph
+ /// Creates a reverse digraph adaptor for the given digraph.
explicit ReverseDigraph(Digraph& digraph) {
Parent::setDigraph(digraph);
@@ 374,11 +382,14 @@
};
 /// \brief Just gives back a reverse digraph adaptor
 ///
 /// Just gives back a reverse digraph adaptor
+ /// \brief Returns a readonly ReverseDigraph adaptor
+ ///
+ /// This function just returns a readonly \ref ReverseDigraph adaptor.
+ /// \ingroup graph_adaptors
+ /// \relates ReverseDigraph
template
ReverseDigraph reverseDigraph(const Digraph& digraph) {
return ReverseDigraph(digraph);
}
+
template ".
+ /// \tparam _ArcFilterMap A \c bool (or convertible) arc map of the
+ /// adapted digraph. The default map type is
+ /// \ref concepts::Digraph::ArcMap "_Digraph::ArcMap".
+ /// \tparam _checked If this parameter is set to \c false, then the arc
+ /// filtering is not checked with respect to the node filter.
+ /// Otherwise, each arc that is incident to a hidden node is automatically
+ /// filtered out. This is the default option.
+ ///
+ /// \note The \c Node and \c Arc types of this adaptor and the adapted
+ /// digraph are convertible to each other.
///
/// \see FilterNodes
/// \see FilterArcs
+#ifdef DOXYGEN
+ template
+#else
template,
typename _ArcFilterMap = typename _Digraph::template ArcMap,
bool _checked = true>
+#endif
class SubDigraph
: public DigraphAdaptorExtender<
SubDigraphBase<_Digraph, _NodeFilterMap, _ArcFilterMap, _checked> > {
public:
+ /// The type of the adapted digraph.
typedef _Digraph Digraph;
+ /// The type of the node filter map.
typedef _NodeFilterMap NodeFilterMap;
+ /// The type of the arc filter map.
typedef _ArcFilterMap ArcFilterMap;
typedef DigraphAdaptorExtender<
 SubDigraphBase >
+ SubDigraphBase<_Digraph, _NodeFilterMap, _ArcFilterMap, _checked> >
Parent;
@@ 732,6 +766,6 @@
/// \brief Constructor
///
 /// Creates a subdigraph for the given digraph with
 /// given node and arc map filters.
+ /// Creates a subdigraph for the given digraph with the
+ /// given node and arc filter maps.
SubDigraph(Digraph& digraph, NodeFilterMap& node_filter,
ArcFilterMap& arc_filter) {
@@ 741,49 +775,51 @@
}
 /// \brief Hides the node of the graph
 ///
 /// This function hides \c n in the digraph, i.e. the iteration
 /// jumps over it. This is done by simply setting the value of \c n
 /// to be false in the corresponding nodemap.
+ /// \brief Hides the given node
+ ///
+ /// This function hides the given node in the subdigraph,
+ /// i.e. the iteration jumps over it.
+ /// It is done by simply setting the assigned value of \c n
+ /// to be \c false in the node filter map.
void hide(const Node& n) const { Parent::hide(n); }
 /// \brief Hides the arc of the graph
 ///
 /// This function hides \c a in the digraph, i.e. the iteration
 /// jumps over it. This is done by simply setting the value of \c a
 /// to be false in the corresponding arcmap.
+ /// \brief Hides the given arc
+ ///
+ /// This function hides the given arc in the subdigraph,
+ /// i.e. the iteration jumps over it.
+ /// It is done by simply setting the assigned value of \c a
+ /// to be \c false in the arc filter map.
void hide(const Arc& a) const { Parent::hide(a); }
 /// \brief Unhides the node of the graph
 ///
 /// The value of \c n is set to be true in the nodemap which stores
 /// hide information. If \c n was hidden previuosly, then it is shown
 /// again
+ /// \brief Shows the given node
+ ///
+ /// This function shows the given node in the subdigraph.
+ /// It is done by simply setting the assigned value of \c n
+ /// to be \c true in the node filter map.
void unHide(const Node& n) const { Parent::unHide(n); }
 /// \brief Unhides the arc of the graph
 ///
 /// The value of \c a is set to be true in the arcmap which stores
 /// hide information. If \c a was hidden previuosly, then it is shown
 /// again
+ /// \brief Shows the given arc
+ ///
+ /// This function shows the given arc in the subdigraph.
+ /// It is done by simply setting the assigned value of \c a
+ /// to be \c true in the arc filter map.
void unHide(const Arc& a) const { Parent::unHide(a); }
 /// \brief Returns true if \c n is hidden.
 ///
 /// Returns true if \c n is hidden.
 ///
+ /// \brief Returns \c true if the given node is hidden.
+ ///
+ /// This function returns \c true if the given node is hidden.
bool hidden(const Node& n) const { return Parent::hidden(n); }
 /// \brief Returns true if \c a is hidden.
 ///
 /// Returns true if \c a is hidden.
 ///
+ /// \brief Returns \c true if the given arc is hidden.
+ ///
+ /// This function returns \c true if the given arc is hidden.
bool hidden(const Arc& a) const { return Parent::hidden(a); }
};
 /// \brief Just gives back a subdigraph
 ///
 /// Just gives back a subdigraph
+ /// \brief Returns a readonly SubDigraph adaptor
+ ///
+ /// This function just returns a readonly \ref SubDigraph adaptor.
+ /// \ingroup graph_adaptors
+ /// \relates SubDigraph
template
SubDigraph
@@ 1250,35 +1286,63 @@
/// \ingroup graph_adaptors
///
 /// \brief A graph adaptor for hiding nodes and edges in an
 /// undirected graph.
 ///
 /// SubGraph hides nodes and edges in a graph. A bool node map and a
 /// bool edge map must be specified, which define the filters for
 /// nodes and edges. Just the nodes and edges with true value are
 /// shown in the subgraph. The SubGraph is conform to the \ref
 /// concepts::Graph "Graph concept". If the \c _checked parameter is
 /// true, then the edges incident to filtered nodes are also
+ /// \brief Adaptor class for hiding nodes and edges in an undirected
+ /// graph.
+ ///
+ /// SubGraph can be used for hiding nodes and edges in a graph.
+ /// A \c bool node map and a \c bool edge map must be specified, which
+ /// define the filters for nodes and edges.
+ /// Only the nodes and edges with \c true filter value are
+ /// shown in the subgraph. This adaptor conforms to the \ref
+ /// concepts::Graph "Graph" concept. If the \c _checked parameter is
+ /// \c true, then the edges incident to hidden nodes are also
/// filtered out.
///
 /// \tparam _Graph It must be conform to the \ref
 /// concepts::Graph "Graph concept". The type can be specified
 /// to const.
 /// \tparam _NodeFilterMap A bool valued node map of the the adapted graph.
 /// \tparam _EdgeFilterMap A bool valued edge map of the the adapted graph.
 /// \tparam _checked If the parameter is false then the edge filtering
 /// is not checked with respect to node filter. Otherwise, each edge
 /// is automatically filtered, which is incident to a filtered node.
+ /// The adapted graph can also be modified through this adaptor
+ /// by adding or removing nodes or edges, unless the \c _Graph template
+ /// parameter is set to be \c const.
+ ///
+ /// \tparam _Graph The type of the adapted graph.
+ /// It must conform to the \ref concepts::Graph "Graph" concept.
+ /// It can also be specified to be \c const.
+ /// \tparam _NodeFilterMap A \c bool (or convertible) node map of the
+ /// adapted graph. The default map type is
+ /// \ref concepts::Graph::NodeMap "_Graph::NodeMap".
+ /// \tparam _EdgeFilterMap A \c bool (or convertible) edge map of the
+ /// adapted graph. The default map type is
+ /// \ref concepts::Graph::EdgeMap "_Graph::EdgeMap".
+ /// \tparam _checked If this parameter is set to \c false, then the edge
+ /// filtering is not checked with respect to the node filter.
+ /// Otherwise, each edge that is incident to a hidden node is automatically
+ /// filtered out. This is the default option.
+ ///
+ /// \note The \c Node, \c Edge and \c Arc types of this adaptor and the
+ /// adapted graph are convertible to each other.
///
/// \see FilterNodes
/// \see FilterEdges
 template
+#ifdef DOXYGEN
+ template
+#else
+ template,
+ typename _EdgeFilterMap = typename _Graph::template EdgeMap,
+ bool _checked = true>
+#endif
class SubGraph
: public GraphAdaptorExtender<
 SubGraphBase<_Graph, NodeFilterMap, EdgeFilterMap, _checked> > {
 public:
+ SubGraphBase<_Graph, _NodeFilterMap, _EdgeFilterMap, _checked> > {
+ public:
+ /// The type of the adapted graph.
typedef _Graph Graph;
+ /// The type of the node filter map.
+ typedef _NodeFilterMap NodeFilterMap;
+ /// The type of the edge filter map.
+ typedef _EdgeFilterMap EdgeFilterMap;
+
typedef GraphAdaptorExtender<
 SubGraphBase<_Graph, NodeFilterMap, EdgeFilterMap> > Parent;
+ SubGraphBase<_Graph, _NodeFilterMap, _EdgeFilterMap, _checked> > Parent;
typedef typename Parent::Node Node;
@@ 1291,57 +1355,59 @@
/// \brief Constructor
///
 /// Creates a subgraph for the given graph with given node and
 /// edge map filters.
 SubGraph(Graph& _graph, NodeFilterMap& node_filter_map,
+ /// Creates a subgraph for the given graph with the given node
+ /// and edge filter maps.
+ SubGraph(Graph& graph, NodeFilterMap& node_filter_map,
EdgeFilterMap& edge_filter_map) {
 setGraph(_graph);
+ setGraph(graph);
setNodeFilterMap(node_filter_map);
setEdgeFilterMap(edge_filter_map);
}
 /// \brief Hides the node of the graph
 ///
 /// This function hides \c n in the graph, i.e. the iteration
 /// jumps over it. This is done by simply setting the value of \c n
 /// to be false in the corresponding nodemap.
+ /// \brief Hides the given node
+ ///
+ /// This function hides the given node in the subgraph,
+ /// i.e. the iteration jumps over it.
+ /// It is done by simply setting the assigned value of \c n
+ /// to be \c false in the node filter map.
void hide(const Node& n) const { Parent::hide(n); }
 /// \brief Hides the edge of the graph
 ///
 /// This function hides \c e in the graph, i.e. the iteration
 /// jumps over it. This is done by simply setting the value of \c e
 /// to be false in the corresponding edgemap.
+ /// \brief Hides the given edge
+ ///
+ /// This function hides the given edge in the subgraph,
+ /// i.e. the iteration jumps over it.
+ /// It is done by simply setting the assigned value of \c e
+ /// to be \c false in the edge filter map.
void hide(const Edge& e) const { Parent::hide(e); }
 /// \brief Unhides the node of the graph
 ///
 /// The value of \c n is set to be true in the nodemap which stores
 /// hide information. If \c n was hidden previuosly, then it is shown
 /// again
+ /// \brief Shows the given node
+ ///
+ /// This function shows the given node in the subgraph.
+ /// It is done by simply setting the assigned value of \c n
+ /// to be \c true in the node filter map.
void unHide(const Node& n) const { Parent::unHide(n); }
 /// \brief Unhides the edge of the graph
 ///
 /// The value of \c e is set to be true in the edgemap which stores
 /// hide information. If \c e was hidden previuosly, then it is shown
 /// again
+ /// \brief Shows the given edge
+ ///
+ /// This function shows the given edge in the subgraph.
+ /// It is done by simply setting the assigned value of \c e
+ /// to be \c true in the edge filter map.
void unHide(const Edge& e) const { Parent::unHide(e); }
 /// \brief Returns true if \c n is hidden.
 ///
 /// Returns true if \c n is hidden.
 ///
+ /// \brief Returns \c true if the given node is hidden.
+ ///
+ /// This function returns \c true if the given node is hidden.
bool hidden(const Node& n) const { return Parent::hidden(n); }
 /// \brief Returns true if \c e is hidden.
 ///
 /// Returns true if \c e is hidden.
 ///
+ /// \brief Returns \c true if the given edge is hidden.
+ ///
+ /// This function returns \c true if the given edge is hidden.
bool hidden(const Edge& e) const { return Parent::hidden(e); }
};
 /// \brief Just gives back a subgraph
 ///
 /// Just gives back a subgraph
+ /// \brief Returns a readonly SubGraph adaptor
+ ///
+ /// This function just returns a readonly \ref SubGraph adaptor.
+ /// \ingroup graph_adaptors
+ /// \relates SubGraph
template
SubGraph
@@ 1374,30 +1440,40 @@
}
+
/// \ingroup graph_adaptors
///
 /// \brief An adaptor for hiding nodes from a digraph or a graph.
 ///
 /// FilterNodes adaptor hides nodes in a graph or a digraph. A bool
 /// node map must be specified, which defines the filters for
 /// nodes. Just the unfiltered nodes and the arcs or edges incident
 /// to unfiltered nodes are shown in the subdigraph or subgraph. The
 /// FilterNodes is conform to the \ref concepts::Digraph
 /// "Digraph concept" or \ref concepts::Graph "Graph concept" depending
 /// on the \c _Digraph template parameter. If the \c _checked
 /// parameter is true, then the arc or edges incident to filtered nodes
 /// are also filtered out.
 ///
 /// \tparam _Digraph It must be conform to the \ref
 /// concepts::Digraph "Digraph concept" or \ref concepts::Graph
 /// "Graph concept". The type can be specified to be const.
 /// \tparam _NodeFilterMap A bool valued node map of the the adapted graph.
 /// \tparam _checked If the parameter is false then the arc or edge
 /// filtering is not checked with respect to node filter. In this
 /// case just isolated nodes can be filtered out from the
 /// graph.
+ /// \brief Adaptor class for hiding nodes in a digraph or a graph.
+ ///
+ /// FilterNodes adaptor can be used for hiding nodes in a digraph or a
+ /// graph. A \c bool node map must be specified, which defines the filter
+ /// for the nodes. Only the nodes with \c true filter value and the
+ /// arcs/edges incident to nodes both with \c true filter value are shown
+ /// in the subgraph. This adaptor conforms to the \ref concepts::Digraph
+ /// "Digraph" concept or the \ref concepts::Graph "Graph" concept
+ /// depending on the \c _Graph template parameter.
+ ///
+ /// The adapted (di)graph can also be modified through this adaptor
+ /// by adding or removing nodes or arcs/edges, unless the \c _Graph template
+ /// parameter is set to be \c const.
+ ///
+ /// \tparam _Graph The type of the adapted digraph or graph.
+ /// It must conform to the \ref concepts::Digraph "Digraph" concept
+ /// or the \ref concepts::Graph "Graph" concept.
+ /// It can also be specified to be \c const.
+ /// \tparam _NodeFilterMap A \c bool (or convertible) node map of the
+ /// adapted (di)graph. The default map type is
+ /// \ref concepts::Graph::NodeMap "_Graph::NodeMap".
+ /// \tparam _checked If this parameter is set to \c false then the arc/edge
+ /// filtering is not checked with respect to the node filter. In this
+ /// case only isolated nodes can be filtered out from the graph.
+ /// Otherwise, each arc/edge that is incident to a hidden node is
+ /// automatically filtered out. This is the default option.
+ ///
+ /// \note The \c Node and Arc/Edge types of this adaptor and the
+ /// adapted (di)graph are convertible to each other.
#ifdef DOXYGEN
 template,
 bool _checked = true>
+ template
#else
template
FilterNodes
@@ 1514,20 +1596,37 @@
/// \ingroup graph_adaptors
///
 /// \brief An adaptor for hiding arcs from a digraph.
 ///
 /// FilterArcs adaptor hides arcs in a digraph. A bool arc map must
 /// be specified, which defines the filters for arcs. Just the
 /// unfiltered arcs are shown in the subdigraph. The FilterArcs is
 /// conform to the \ref concepts::Digraph "Digraph concept".
 ///
 /// \tparam _Digraph It must be conform to the \ref concepts::Digraph
 /// "Digraph concept". The type can be specified to be const.
 /// \tparam _ArcFilterMap A bool valued arc map of the the adapted
 /// graph.
 template
+ /// \brief Adaptor class for hiding arcs in a digraph.
+ ///
+ /// FilterArcs adaptor can be used for hiding arcs in a digraph.
+ /// A \c bool arc map must be specified, which defines the filter for
+ /// the arcs. Only the arcs with \c true filter value are shown in the
+ /// subdigraph. This adaptor conforms to the \ref concepts::Digraph
+ /// "Digraph" concept.
+ ///
+ /// The adapted digraph can also be modified through this adaptor
+ /// by adding or removing nodes or arcs, unless the \c _Digraph template
+ /// parameter is set to be \c const.
+ ///
+ /// \tparam _Digraph The type of the adapted digraph.
+ /// It must conform to the \ref concepts::Digraph "Digraph" concept.
+ /// It can also be specified to be \c const.
+ /// \tparam _ArcFilterMap A \c bool (or convertible) arc map of the
+ /// adapted digraph. The default map type is
+ /// \ref concepts::Digraph::ArcMap "_Digraph::ArcMap".
+ ///
+ /// \note The \c Node and \c Arc types of this adaptor and the adapted
+ /// digraph are convertible to each other.
+#ifdef DOXYGEN
+ template
+#else
+ template >
+#endif
class FilterArcs :
public SubDigraph<_Digraph, ConstMap,
_ArcFilterMap, false> {
public:
+
typedef _Digraph Digraph;
typedef _ArcFilterMap ArcFilterMap;
@@ 1549,6 +1648,6 @@
/// \brief Constructor
///
 /// Creates a FilterArcs adaptor for the given graph with
 /// given arc map filter.
+ /// Creates a subdigraph for the given digraph with the given arc
+ /// filter map.
FilterArcs(Digraph& digraph, ArcFilterMap& arc_filter)
: Parent(), const_true_map(true) {
@@ 1558,29 +1657,31 @@
}
 /// \brief Hides the arc of the graph
 ///
 /// This function hides \c a in the graph, i.e. the iteration
 /// jumps over it. This is done by simply setting the value of \c a
 /// to be false in the corresponding arc map.
+ /// \brief Hides the given arc
+ ///
+ /// This function hides the given arc in the subdigraph,
+ /// i.e. the iteration jumps over it.
+ /// It is done by simply setting the assigned value of \c a
+ /// to be \c false in the arc filter map.
void hide(const Arc& a) const { Parent::hide(a); }
 /// \brief Unhides the arc of the graph
 ///
 /// The value of \c a is set to be true in the arcmap which stores
 /// hide information. If \c a was hidden previuosly, then it is shown
 /// again
+ /// \brief Shows the given arc
+ ///
+ /// This function shows the given arc in the subdigraph.
+ /// It is done by simply setting the assigned value of \c a
+ /// to be \c true in the arc filter map.
void unHide(const Arc& a) const { Parent::unHide(a); }
 /// \brief Returns true if \c a is hidden.
 ///
 /// Returns true if \c a is hidden.
 ///
+ /// \brief Returns \c true if the given arc is hidden.
+ ///
+ /// This function returns \c true if the given arc is hidden.
bool hidden(const Arc& a) const { return Parent::hidden(a); }
};
 /// \brief Just gives back an FilterArcs adaptor
 ///
 /// Just gives back an FilterArcs adaptor
+ /// \brief Returns a readonly FilterArcs adaptor
+ ///
+ /// This function just returns a readonly \ref FilterArcs adaptor.
+ /// \ingroup graph_adaptors
+ /// \relates FilterArcs
template
FilterArcs
@@ 1597,16 +1698,32 @@
/// \ingroup graph_adaptors
///
 /// \brief An adaptor for hiding edges from a graph.
 ///
 /// FilterEdges adaptor hides edges in a digraph. A bool edge map must
 /// be specified, which defines the filters for edges. Just the
 /// unfiltered edges are shown in the subdigraph. The FilterEdges is
 /// conform to the \ref concepts::Graph "Graph concept".
 ///
 /// \tparam _Graph It must be conform to the \ref concepts::Graph
 /// "Graph concept". The type can be specified to be const.
 /// \tparam _EdgeFilterMap A bool valued edge map of the the adapted
 /// graph.
 template
+ /// \brief Adaptor class for hiding edges in a graph.
+ ///
+ /// FilterEdges adaptor can be used for hiding edges in a graph.
+ /// A \c bool edge map must be specified, which defines the filter for
+ /// the edges. Only the edges with \c true filter value are shown in the
+ /// subgraph. This adaptor conforms to the \ref concepts::Graph
+ /// "Graph" concept.
+ ///
+ /// The adapted graph can also be modified through this adaptor
+ /// by adding or removing nodes or edges, unless the \c _Graph template
+ /// parameter is set to be \c const.
+ ///
+ /// \tparam _Graph The type of the adapted graph.
+ /// It must conform to the \ref concepts::Graph "Graph" concept.
+ /// It can also be specified to be \c const.
+ /// \tparam _EdgeFilterMap A \c bool (or convertible) edge map of the
+ /// adapted graph. The default map type is
+ /// \ref concepts::Graph::EdgeMap "_Graph::EdgeMap".
+ ///
+ /// \note The \c Node, \c Edge and \c Arc types of this adaptor and the
+ /// adapted graph are convertible to each other.
+#ifdef DOXYGEN
+ template
+#else
+ template >
+#endif
class FilterEdges :
public SubGraph<_Graph, ConstMap,
@@ 1629,38 +1746,40 @@
/// \brief Constructor
///
 /// Creates a FilterEdges adaptor for the given graph with
 /// given edge map filters.
 FilterEdges(Graph& _graph, EdgeFilterMap& edge_filter_map) :
+ /// Creates a subgraph for the given graph with the given edge
+ /// filter map.
+ FilterEdges(Graph& graph, EdgeFilterMap& edge_filter_map) :
Parent(), const_true_map(true) {
 Parent::setGraph(_graph);
+ Parent::setGraph(graph);
Parent::setNodeFilterMap(const_true_map);
Parent::setEdgeFilterMap(edge_filter_map);
}
 /// \brief Hides the edge of the graph
 ///
 /// This function hides \c e in the graph, i.e. the iteration
 /// jumps over it. This is done by simply setting the value of \c e
 /// to be false in the corresponding edgemap.
+ /// \brief Hides the given edge
+ ///
+ /// This function hides the given edge in the subgraph,
+ /// i.e. the iteration jumps over it.
+ /// It is done by simply setting the assigned value of \c e
+ /// to be \c false in the edge filter map.
void hide(const Edge& e) const { Parent::hide(e); }
 /// \brief Unhides the edge of the graph
 ///
 /// The value of \c e is set to be true in the edgemap which stores
 /// hide information. If \c e was hidden previuosly, then it is shown
 /// again
+ /// \brief Shows the given edge
+ ///
+ /// This function shows the given edge in the subgraph.
+ /// It is done by simply setting the assigned value of \c e
+ /// to be \c true in the edge filter map.
void unHide(const Edge& e) const { Parent::unHide(e); }
 /// \brief Returns true if \c e is hidden.
 ///
 /// Returns true if \c e is hidden.
 ///
+ /// \brief Returns \c true if the given edge is hidden.
+ ///
+ /// This function returns \c true if the given edge is hidden.
bool hidden(const Edge& e) const { return Parent::hidden(e); }
};
 /// \brief Just gives back a FilterEdges adaptor
 ///
 /// Just gives back a FilterEdges adaptor
+ /// \brief Returns a readonly FilterEdges adaptor
+ ///
+ /// This function just returns a readonly \ref FilterEdges adaptor.
+ /// \ingroup graph_adaptors
+ /// \relates FilterEdges
template
FilterEdges
@@ 1675,4 +1794,5 @@
}
+
template
class UndirectorBase {
@@ 1713,6 +1833,4 @@
}
};


void first(Node& n) const {
@@ 2069,14 +2187,25 @@
/// \ingroup graph_adaptors
///
 /// \brief Undirect the graph
 ///
 /// This adaptor makes an undirected graph from a directed
 /// graph. All arcs of the underlying digraph will be showed in the
 /// adaptor as an edge. The Orienter adaptor is conform to the \ref
 /// concepts::Graph "Graph concept".
 ///
 /// \tparam _Digraph It must be conform to the \ref
 /// concepts::Digraph "Digraph concept". The type can be specified
 /// to const.
+ /// \brief Adaptor class for viewing a digraph as an undirected graph.
+ ///
+ /// Undirector adaptor can be used for viewing a digraph as an undirected
+ /// graph. All arcs of the underlying digraph are showed in the
+ /// adaptor as an edge (and also as a pair of arcs, of course).
+ /// This adaptor conforms to the \ref concepts::Graph "Graph" concept.
+ ///
+ /// The adapted digraph can also be modified through this adaptor
+ /// by adding or removing nodes or edges, unless the \c _Digraph template
+ /// parameter is set to be \c const.
+ ///
+ /// \tparam _Digraph The type of the adapted digraph.
+ /// It must conform to the \ref concepts::Digraph "Digraph" concept.
+ /// It can also be specified to be \c const.
+ ///
+ /// \note The \c Node type of this adaptor and the adapted digraph are
+ /// convertible to each other, moreover the \c Edge type of the adaptor
+ /// and the \c Arc type of the adapted digraph are also convertible to
+ /// each other.
+ /// (Thus the \c Arc type of the adaptor is convertible to the \c Arc type
+ /// of the adapted digraph.)
template
class Undirector
@@ 2091,13 +2220,15 @@
/// \brief Constructor
///
 /// Creates a undirected graph from the given digraph
+ /// Creates an undirected graph from the given digraph.
Undirector(_Digraph& digraph) {
setDigraph(digraph);
}
 /// \brief ArcMap combined from two original ArcMap
 ///
 /// This class adapts two original digraph ArcMap to
 /// get an arc map on the undirected graph.
+ /// \brief Arc map combined from two original arc maps
+ ///
+ /// This map adaptor class adapts two arc maps of the underlying
+ /// digraph to get an arc map of the undirected graph.
+ /// Its value type is inherited from the first arc map type
+ /// (\c %ForwardMap).
template
class CombinedArcMap {
@@ 2109,6 +2240,8 @@
typedef typename MapTraits::ReferenceMapTag ReferenceMapTag;
+ /// The key type of the map
+ typedef typename Parent::Arc Key;
+ /// The value type of the map
typedef typename ForwardMap::Value Value;
 typedef typename Parent::Arc Key;
typedef typename MapTraits::ReturnValue ReturnValue;
@@ 2117,14 +2250,9 @@
typedef typename MapTraits::ConstReturnValue ConstReference;
 /// \brief Constructor
 ///
/// Constructor
CombinedArcMap(ForwardMap& forward, BackwardMap& backward)
: _forward(&forward), _backward(&backward) {}

 /// \brief Sets the value associated with a key.
 ///
 /// Sets the value associated with a key.
+ /// Sets the value associated with the given key.
void set(const Key& e, const Value& a) {
if (Parent::direction(e)) {
@@ 2135,7 +2263,5 @@
}
 /// \brief Returns the value associated with a key.
 ///
 /// Returns the value associated with a key.
+ /// Returns the value associated with the given key.
ConstReturnValue operator[](const Key& e) const {
if (Parent::direction(e)) {
@@ 2146,7 +2272,5 @@
}
 /// \brief Returns the value associated with a key.
 ///
 /// Returns the value associated with a key.
+ /// Returns a reference to the value associated with the given key.
ReturnValue operator[](const Key& e) {
if (Parent::direction(e)) {
@@ 2164,7 +2288,7 @@
};
 /// \brief Just gives back a combined arc map
 ///
 /// Just gives back a combined arc map
+ /// \brief Returns a combined arc map
+ ///
+ /// This function just returns a combined arc map.
template
static CombinedArcMap
@@ 2196,7 +2320,9 @@
};
 /// \brief Just gives back an undirected view of the given digraph
 ///
 /// Just gives back an undirected view of the given digraph
+ /// \brief Returns a readonly Undirector adaptor
+ ///
+ /// This function just returns a readonly \ref Undirector adaptor.
+ /// \ingroup graph_adaptors
+ /// \relates Undirector
template
Undirector
@@ 2204,4 +2330,5 @@
return Undirector(digraph);
}
+
template
@@ 2365,26 +2492,46 @@
/// \ingroup graph_adaptors
///
 /// \brief Orients the edges of the graph to get a digraph
 ///
 /// This adaptor orients each edge in the undirected graph. The
 /// direction of the arcs stored in an edge node map. The arcs can
 /// be easily reverted by the \c reverseArc() member function in the
 /// adaptor. The Orienter adaptor is conform to the \ref
 /// concepts::Digraph "Digraph concept".
 ///
 /// \tparam _Graph It must be conform to the \ref concepts::Graph
 /// "Graph concept". The type can be specified to be const.
 /// \tparam _DirectionMap A bool valued edge map of the the adapted
 /// graph.
 ///
 /// \sa orienter
+ /// \brief Adaptor class for orienting the edges of a graph to get a digraph
+ ///
+ /// Orienter adaptor can be used for orienting the edges of a graph to
+ /// get a digraph. A \c bool edge map of the underlying graph must be
+ /// specified, which define the direction of the arcs in the adaptor.
+ /// The arcs can be easily reversed by the \c reverseArc() member function
+ /// of the adaptor.
+ /// This class conforms to the \ref concepts::Digraph "Digraph" concept.
+ ///
+ /// The adapted graph can also be modified through this adaptor
+ /// by adding or removing nodes or arcs, unless the \c _Graph template
+ /// parameter is set to be \c const.
+ ///
+ /// \tparam _Graph The type of the adapted graph.
+ /// It must conform to the \ref concepts::Graph "Graph" concept.
+ /// It can also be specified to be \c const.
+ /// \tparam _DirectionMap A \c bool (or convertible) edge map of the
+ /// adapted graph. The default map type is
+ /// \ref concepts::Graph::EdgeMap "_Graph::EdgeMap".
+ ///
+ /// \note The \c Node type of this adaptor and the adapted graph are
+ /// convertible to each other, moreover the \c Arc type of the adaptor
+ /// and the \c Edge type of the adapted graph are also convertible to
+ /// each other.
+#ifdef DOXYGEN
template >
+ typename _DirectionMap>
+#else
+ template >
+#endif
class Orienter :
 public DigraphAdaptorExtender > {
 public:
+ public DigraphAdaptorExtender > {
+ public:
+
+ /// The type of the adapted graph.
typedef _Graph Graph;
+ /// The type of the direction edge map.
+ typedef _DirectionMap DirectionMap;
+
typedef DigraphAdaptorExtender<
 OrienterBase<_Graph, DirectionMap> > Parent;
+ OrienterBase<_Graph, _DirectionMap> > Parent;
typedef typename Parent::Arc Arc;
protected:
@@ 2392,7 +2539,7 @@
public:
 /// \brief Constructor of the adaptor
 ///
 /// Constructor of the adaptor
+ /// \brief Constructor
+ ///
+ /// Constructor of the adaptor.
Orienter(Graph& graph, DirectionMap& direction) {
setGraph(graph);
@@ 2400,7 +2547,9 @@
}
 /// \brief Reverse arc
 ///
 /// It reverse the given arc. It simply negate the direction in the map.
+ /// \brief Reverses the given arc
+ ///
+ /// This function reverses the given arc.
+ /// It is done by simply negate the assigned value of \c a
+ /// in the direction map.
void reverseArc(const Arc& a) {
Parent::reverseArc(a);
@@ 2408,7 +2557,9 @@
};
 /// \brief Just gives back a Orienter
 ///
 /// Just gives back a Orienter
+ /// \brief Returns a readonly Orienter adaptor
+ ///
+ /// This function just returns a readonly \ref Orienter adaptor.
+ /// \ingroup graph_adaptors
+ /// \relates Orienter
template
Orienter
@@ 2492,29 +2643,49 @@
/// \ingroup graph_adaptors
///
 /// \brief An adaptor for composing the residual graph for directed
+ /// \brief Adaptor class for composing the residual digraph for directed
/// flow and circulation problems.
///
 /// An adaptor for composing the residual graph for directed flow and
 /// circulation problems. Let \f$ G=(V, A) \f$ be a directed graph
 /// and let \f$ F \f$ be a number type. Let moreover \f$ f,c:A\to F \f$,
 /// be functions on the arcset.
 ///
 /// Then Residual implements the digraph structure with
 /// nodeset \f$ V \f$ and arcset \f$ A_{forward}\cup A_{backward} \f$,
 /// where \f$ A_{forward}=\{uv : uv\in A, f(uv)0\} \f$, i.e. the so
 /// called residual graph. When we take the union
 /// \f$ A_{forward}\cup A_{backward} \f$, multiplicities are counted,
 /// i.e. if an arc is in both \f$ A_{forward} \f$ and
 /// \f$ A_{backward} \f$, then in the adaptor it appears in both
 /// orientation.
 ///
 /// \tparam _Digraph It must be conform to the \ref concepts::Digraph
 /// "Digraph concept". The type is implicitly const.
 /// \tparam _CapacityMap An arc map of some numeric type, it defines
 /// the capacities in the flow problem. The map is implicitly const.
 /// \tparam _FlowMap An arc map of some numeric type, it defines
 /// the capacities in the flow problem.
 /// \tparam _Tolerance Handler for inexact computation.
+ /// Residual can be used for composing the \e residual digraph for directed
+ /// flow and circulation problems. Let \f$ G=(V, A) \f$ be a directed graph
+ /// and let \f$ F \f$ be a number type. Let \f$ flow, cap: A\to F \f$ be
+ /// functions on the arcs.
+ /// This adaptor implements a digraph structure with node set \f$ V \f$
+ /// and arc set \f$ A_{forward}\cup A_{backward} \f$,
+ /// where \f$ A_{forward}=\{uv : uv\in A, flow(uv)0\} \f$, i.e. the so
+ /// called residual digraph.
+ /// When the union \f$ A_{forward}\cup A_{backward} \f$ is taken,
+ /// multiplicities are counted, i.e. the adaptor has exactly
+ /// \f$ A_{forward} + A_{backward}\f$ arcs (it may have parallel
+ /// arcs).
+ /// This class conforms to the \ref concepts::Digraph "Digraph" concept.
+ ///
+ /// \tparam _Digraph The type of the adapted digraph.
+ /// It must conform to the \ref concepts::Digraph "Digraph" concept.
+ /// It is implicitly \c const.
+ /// \tparam _CapacityMap An arc map of some numerical type, which defines
+ /// the capacities in the flow problem. It is implicitly \c const.
+ /// The default map type is
+ /// \ref concepts::Digraph::ArcMap "_Digraph::ArcMap".
+ /// \tparam _FlowMap An arc map of some numerical type, which defines
+ /// the flow values in the flow problem.
+ /// The default map type is \c _CapacityMap.
+ /// \tparam _Tolerance Tolerance type for handling inexact computation.
+ /// The default tolerance type depends on the value type of the
+ /// capacity map.
+ ///
+ /// \note This adaptor is implemented using Undirector and FilterArcs
+ /// adaptors.
+ ///
+ /// \note The \c Node type of this adaptor and the adapted digraph are
+ /// convertible to each other, moreover the \c Arc type of the adaptor
+ /// is convertible to the \c Arc type of the adapted digraph.
+#ifdef DOXYGEN
+ template
+ class Residual
+#else
template,
@@ 2529,9 +2700,13 @@
_adaptor_bits::ResBackwardFilter > >
+#endif
{
public:
+ /// The type of the underlying digraph.
typedef _Digraph Digraph;
+ /// The type of the capacity map.
typedef _CapacityMap CapacityMap;
+ /// The type of the flow map.
typedef _FlowMap FlowMap;
typedef _Tolerance Tolerance;
@@ 2565,8 +2740,8 @@
public:
 /// \brief Constructor of the residual digraph.
 ///
 /// Constructor of the residual graph. The parameters are the digraph,
 /// the flow map, the capacity map and a tolerance object.
+ /// \brief Constructor
+ ///
+ /// Constructor of the residual digraph adaptor. The parameters are the
+ /// digraph, the capacity map, the flow map, and a tolerance object.
Residual(const Digraph& digraph, const CapacityMap& capacity,
FlowMap& flow, const Tolerance& tolerance = Tolerance())
@@ 2582,7 +2757,7 @@
typedef typename Parent::Arc Arc;
 /// \brief Gives back the residual capacity of the arc.
 ///
 /// Gives back the residual capacity of the arc.
+ /// \brief Returns the residual capacity of the given arc.
+ ///
+ /// Returns the residual capacity of the given arc.
Value residualCapacity(const Arc& a) const {
if (Undirected::direction(a)) {
@@ 2593,9 +2768,9 @@
}
 /// \brief Augment on the given arc in the residual graph.
 ///
 /// Augment on the given arc in the residual graph. It increase
 /// or decrease the flow on the original arc depend on the direction
 /// of the residual arc.
+ /// \brief Augment on the given arc in the residual digraph.
+ ///
+ /// Augment on the given arc in the residual digraph. It increases
+ /// or decreases the flow value on the original arc according to the
+ /// direction of the residual arc.
void augment(const Arc& a, const Value& v) const {
if (Undirected::direction(a)) {
@@ 2606,28 +2781,32 @@
}
 /// \brief Returns the direction of the arc.
 ///
 /// Returns true when the arc is same oriented as the original arc.
+ /// \brief Returns \c true if the given residual arc is a forward arc.
+ ///
+ /// Returns \c true if the given residual arc has the same orientation
+ /// as the original arc, i.e. it is a so called forward arc.
static bool forward(const Arc& a) {
return Undirected::direction(a);
}
 /// \brief Returns the direction of the arc.
 ///
 /// Returns true when the arc is opposite oriented as the original arc.
+ /// \brief Returns \c true if the given residual arc is a backward arc.
+ ///
+ /// Returns \c true if the given residual arc has the opposite orientation
+ /// than the original arc, i.e. it is a so called backward arc.
static bool backward(const Arc& a) {
return !Undirected::direction(a);
}
 /// \brief Gives back the forward oriented residual arc.
 ///
 /// Gives back the forward oriented residual arc.
+ /// \brief Returns the forward oriented residual arc.
+ ///
+ /// Returns the forward oriented residual arc related to the given
+ /// arc of the underlying digraph.
static Arc forward(const typename Digraph::Arc& a) {
return Undirected::direct(a, true);
}
 /// \brief Gives back the backward oriented residual arc.
 ///
 /// Gives back the backward oriented residual arc.
+ /// \brief Returns the backward oriented residual arc.
+ ///
+ /// Returns the backward oriented residual arc related to the given
+ /// arc of the underlying digraph.
static Arc backward(const typename Digraph::Arc& a) {
return Undirected::direct(a, false);
@@ 2636,13 +2815,14 @@
/// \brief Residual capacity map.
///
 /// In generic residual graph the residual capacity can be obtained
 /// as a map.
+ /// This map adaptor class can be used for obtaining the residual
+ /// capacities as an arc map of the residual digraph.
+ /// Its value type is inherited from the capacity map.
class ResidualCapacity {
protected:
const Adaptor* _adaptor;
public:
 /// The Key type
+ /// The key type of the map
typedef Arc Key;
 /// The Value type
+ /// The value type of the map
typedef typename _CapacityMap::Value Value;
@@ 2650,5 +2830,5 @@
ResidualCapacity(const Adaptor& adaptor) : _adaptor(&adaptor) {}
 /// \e
+ /// Returns the value associated with the given residual arc
Value operator[](const Arc& a) const {
return _adaptor>residualCapacity(a);
@@ 3109,23 +3289,29 @@
/// \ingroup graph_adaptors
///
 /// \brief Split the nodes of a directed graph
 ///
 /// The SplitNodes adaptor splits each node into an innode and an
 /// outnode. Formaly, the adaptor replaces each \f$ u \f$ node in
 /// the digraph with two nodes(namely node \f$ u_{in} \f$ and node
 /// \f$ u_{out} \f$). If there is a \f$ (v, u) \f$ arc in the
 /// original digraph the new target of the arc will be \f$ u_{in} \f$
 /// and similarly the source of the original \f$ (u, v) \f$ arc
 /// will be \f$ u_{out} \f$. The adaptor will add for each node in
 /// the original digraph an additional arc which connects
 /// \f$ (u_{in}, u_{out}) \f$.
 ///
 /// The aim of this class is to run algorithm with node costs if the
 /// algorithm can use directly just arc costs. In this case we should use
 /// a \c SplitNodes and set the node cost of the graph to the
 /// bind arc in the adapted graph.
 ///
 /// \tparam _Digraph It must be conform to the \ref concepts::Digraph
 /// "Digraph concept". The type can be specified to be const.
+ /// \brief Adaptor class for splitting the nodes of a digraph.
+ ///
+ /// SplitNodes adaptor can be used for splitting each node into an
+ /// \e innode and an \e outnode in a digraph. Formaly, the adaptor
+ /// replaces each node \f$ u \f$ in the digraph with two nodes,
+ /// namely node \f$ u_{in} \f$ and node \f$ u_{out} \f$.
+ /// If there is a \f$ (v, u) \f$ arc in the original digraph, then the
+ /// new target of the arc will be \f$ u_{in} \f$ and similarly the
+ /// source of each original \f$ (u, v) \f$ arc will be \f$ u_{out} \f$.
+ /// The adaptor adds an additional \e bind \e arc from \f$ u_{in} \f$
+ /// to \f$ u_{out} \f$ for each node \f$ u \f$ of the original digraph.
+ ///
+ /// The aim of this class is running an algorithm with respect to node
+ /// costs or capacities if the algorithm considers only arc costs or
+ /// capacities directly.
+ /// In this case you can use \c SplitNodes adaptor, and set the node
+ /// costs/capacities of the original digraph to the \e bind \e arcs
+ /// in the adaptor.
+ ///
+ /// \tparam _Digraph The type of the adapted digraph.
+ /// It must conform to the \ref concepts::Digraph "Digraph" concept.
+ /// It is implicitly \c const.
+ ///
+ /// \note The \c Node type of this adaptor is converible to the \c Node
+ /// type of the adapted digraph.
template
class SplitNodes
@@ 3141,5 +3327,5 @@
typedef typename Parent::Arc Arc;
 /// \brief Constructor of the adaptor.
+ /// \brief Constructor
///
/// Constructor of the adaptor.
@@ 3148,69 +3334,79 @@
}
 /// \brief Returns true when the node is innode.
 ///
 /// Returns true when the node is innode.
+ /// \brief Returns \c true if the given node is an innode.
+ ///
+ /// Returns \c true if the given node is an innode.
static bool inNode(const Node& n) {
return Parent::inNode(n);
}
 /// \brief Returns true when the node is outnode.
 ///
 /// Returns true when the node is outnode.
+ /// \brief Returns \c true if the given node is an outnode.
+ ///
+ /// Returns \c true if the given node is an outnode.
static bool outNode(const Node& n) {
return Parent::outNode(n);
}
 /// \brief Returns true when the arc is arc in the original digraph.
 ///
 /// Returns true when the arc is arc in the original digraph.
+ /// \brief Returns \c true if the given arc is an original arc.
+ ///
+ /// Returns \c true if the given arc is one of the arcs in the
+ /// original digraph.
static bool origArc(const Arc& a) {
return Parent::origArc(a);
}
 /// \brief Returns true when the arc binds an innode and an outnode.
 ///
 /// Returns true when the arc binds an innode and an outnode.
+ /// \brief Returns \c true if the given arc is a bind arc.
+ ///
+ /// Returns \c true if the given arc is a bind arc, i.e. it connects
+ /// an innode and an outnode.
static bool bindArc(const Arc& a) {
return Parent::bindArc(a);
}
 /// \brief Gives back the innode created from the \c node.
 ///
 /// Gives back the innode created from the \c node.
+ /// \brief Returns the innode created from the given original node.
+ ///
+ /// Returns the innode created from the given original node.
static Node inNode(const DigraphNode& n) {
return Parent::inNode(n);
}
 /// \brief Gives back the outnode created from the \c node.
 ///
 /// Gives back the outnode created from the \c node.
+ /// \brief Returns the outnode created from the given original node.
+ ///
+ /// Returns the outnode created from the given original node.
static Node outNode(const DigraphNode& n) {
return Parent::outNode(n);
}
 /// \brief Gives back the arc binds the two part of the node.
 ///
 /// Gives back the arc binds the two part of the node.
+ /// \brief Returns the bind arc that corresponds to the given
+ /// original node.
+ ///
+ /// Returns the bind arc in the adaptor that corresponds to the given
+ /// original node, i.e. the arc connecting the innode and outnode
+ /// of \c n.
static Arc arc(const DigraphNode& n) {
return Parent::arc(n);
}
 /// \brief Gives back the arc of the original arc.
 ///
 /// Gives back the arc of the original arc.
+ /// \brief Returns the arc that corresponds to the given original arc.
+ ///
+ /// Returns the arc in the adaptor that corresponds to the given
+ /// original arc.
static Arc arc(const DigraphArc& a) {
return Parent::arc(a);
}
 /// \brief NodeMap combined from two original NodeMap
 ///
 /// This class adapt two of the original digraph NodeMap to
 /// get a node map on the adapted digraph.
+ /// \brief Node map combined from two original node maps
+ ///
+ /// This map adaptor class adapts two node maps of the original digraph
+ /// to get a node map of the split digraph.
+ /// Its value type is inherited from the first node map type
+ /// (\c InNodeMap).
template
class CombinedNodeMap {
public:
+ /// The key type of the map
typedef Node Key;
+ /// The value type of the map
typedef typename InNodeMap::Value Value;
@@ 3221,13 +3417,18 @@
typedef typename MapTraits::ConstReturnValue ConstReference;
 /// \brief Constructor
 ///
 /// Constructor.
+ /// Constructor
CombinedNodeMap(InNodeMap& in_map, OutNodeMap& out_map)
: _in_map(in_map), _out_map(out_map) {}
 /// \brief The subscript operator.
 ///
 /// The subscript operator.
+ /// Returns the value associated with the given key.
+ Value operator[](const Key& key) const {
+ if (Parent::inNode(key)) {
+ return _in_map[key];
+ } else {
+ return _out_map[key];
+ }
+ }
+
+ /// Returns a reference to the value associated with the given key.
Value& operator[](const Key& key) {
if (Parent::inNode(key)) {
@@ 3238,18 +3439,5 @@
}
 /// \brief The const subscript operator.
 ///
 /// The const subscript operator.
 Value operator[](const Key& key) const {
 if (Parent::inNode(key)) {
 return _in_map[key];
 } else {
 return _out_map[key];
 }
 }

 /// \brief The setter function of the map.
 ///
 /// The setter function of the map.
+ /// Sets the value associated with the given key.
void set(const Key& key, const Value& value) {
if (Parent::inNode(key)) {
@@ 3268,7 +3456,7 @@
 /// \brief Just gives back a combined node map
 ///
 /// Just gives back a combined node map
+ /// \brief Returns a combined node map
+ ///
+ /// This function just returns a combined node map.
template
static CombinedNodeMap
@@ 3296,13 +3484,18 @@
}
 /// \brief ArcMap combined from an original ArcMap and a NodeMap
 ///
 /// This class adapt an original ArcMap and a NodeMap to get an
 /// arc map on the adapted digraph
+ /// \brief Arc map combined from an arc map and a node map of the
+ /// original digraph.
+ ///
+ /// This map adaptor class adapts an arc map and a node map of the
+ /// original digraph to get an arc map of the split digraph.
+ /// Its value type is inherited from the original arc map type
+ /// (\c DigraphArcMap).
template
class CombinedArcMap {
public:
+ /// The key type of the map
typedef Arc Key;
+ /// The value type of the map
typedef typename DigraphArcMap::Value Value;
@@ 3318,13 +3511,27 @@
ConstReference;
 /// \brief Constructor
 ///
 /// Constructor.
+ /// Constructor
CombinedArcMap(DigraphArcMap& arc_map, DigraphNodeMap& node_map)
: _arc_map(arc_map), _node_map(node_map) {}
 /// \brief The subscript operator.
 ///
 /// The subscript operator.
+ /// Returns the value associated with the given key.
+ Value operator[](const Key& arc) const {
+ if (Parent::origArc(arc)) {
+ return _arc_map[arc];
+ } else {
+ return _node_map[arc];
+ }
+ }
+
+ /// Returns a reference to the value associated with the given key.
+ Value& operator[](const Key& arc) {
+ if (Parent::origArc(arc)) {
+ return _arc_map[arc];
+ } else {
+ return _node_map[arc];
+ }
+ }
+
+ /// Sets the value associated with the given key.
void set(const Arc& arc, const Value& val) {
if (Parent::origArc(arc)) {
@@ 3335,26 +3542,4 @@
}
 /// \brief The const subscript operator.
 ///
 /// The const subscript operator.
 Value operator[](const Key& arc) const {
 if (Parent::origArc(arc)) {
 return _arc_map[arc];
 } else {
 return _node_map[arc];
 }
 }

 /// \brief The const subscript operator.
 ///
 /// The const subscript operator.
 Value& operator[](const Key& arc) {
 if (Parent::origArc(arc)) {
 return _arc_map[arc];
 } else {
 return _node_map[arc];
 }
 }

private:
DigraphArcMap& _arc_map;
@@ 3362,7 +3547,7 @@
};
 /// \brief Just gives back a combined arc map
 ///
 /// Just gives back a combined arc map
+ /// \brief Returns a combined arc map
+ ///
+ /// This function just returns a combined arc map.
template
static CombinedArcMap
@@ 3395,7 +3580,9 @@
};
 /// \brief Just gives back a node splitter
 ///
 /// Just gives back a node splitter
+ /// \brief Returns a (readonly) SplitNodes adaptor
+ ///
+ /// This function just returns a (readonly) \ref SplitNodes adaptor.
+ /// \ingroup graph_adaptors
+ /// \relates SplitNodes
template
SplitNodes