0
3
0
| ... | ... |
@@ -286,25 +286,25 @@ |
| 286 | 286 |
} |
| 287 | 287 |
|
| 288 | 288 |
/// \ingroup connectivity |
| 289 | 289 |
/// |
| 290 | 290 |
/// \brief Count the strongly connected components of a directed graph |
| 291 | 291 |
/// |
| 292 | 292 |
/// Count the strongly connected components of a directed graph. |
| 293 | 293 |
/// The strongly connected components are the classes of an |
| 294 | 294 |
/// equivalence relation on the nodes of the graph. Two nodes are in |
| 295 | 295 |
/// the same class if they are connected with directed paths in both |
| 296 | 296 |
/// direction. |
| 297 | 297 |
/// |
| 298 |
/// \param |
|
| 298 |
/// \param digraph The graph. |
|
| 299 | 299 |
/// \return The number of components |
| 300 | 300 |
/// \note By definition, the empty graph has zero |
| 301 | 301 |
/// strongly connected components. |
| 302 | 302 |
template <typename Digraph> |
| 303 | 303 |
int countStronglyConnectedComponents(const Digraph& digraph) {
|
| 304 | 304 |
checkConcept<concepts::Digraph, Digraph>(); |
| 305 | 305 |
|
| 306 | 306 |
using namespace _connectivity_bits; |
| 307 | 307 |
|
| 308 | 308 |
typedef typename Digraph::Node Node; |
| 309 | 309 |
typedef typename Digraph::Arc Arc; |
| 310 | 310 |
typedef typename Digraph::NodeIt NodeIt; |
| ... | ... |
@@ -1216,25 +1216,25 @@ |
| 1216 | 1216 |
dfs.start(); |
| 1217 | 1217 |
} |
| 1218 | 1218 |
} |
| 1219 | 1219 |
} |
| 1220 | 1220 |
|
| 1221 | 1221 |
/// \ingroup connectivity |
| 1222 | 1222 |
/// |
| 1223 | 1223 |
/// \brief Sort the nodes of a DAG into topolgical order. |
| 1224 | 1224 |
/// |
| 1225 | 1225 |
/// Sort the nodes of a DAG into topolgical order. It also checks |
| 1226 | 1226 |
/// that the given graph is DAG. |
| 1227 | 1227 |
/// |
| 1228 |
/// \param |
|
| 1228 |
/// \param digraph The graph. It must be directed and acyclic. |
|
| 1229 | 1229 |
/// \retval order A readable - writable node map. The values will be set |
| 1230 | 1230 |
/// from 0 to the number of the nodes in the graph minus one. Each values |
| 1231 | 1231 |
/// of the map will be set exactly once, the values will be set descending |
| 1232 | 1232 |
/// order. |
| 1233 | 1233 |
/// \return %False when the graph is not DAG. |
| 1234 | 1234 |
/// |
| 1235 | 1235 |
/// \see topologicalSort |
| 1236 | 1236 |
/// \see dag |
| 1237 | 1237 |
template <typename Digraph, typename NodeMap> |
| 1238 | 1238 |
bool checkedTopologicalSort(const Digraph& digraph, NodeMap& order) {
|
| 1239 | 1239 |
using namespace _connectivity_bits; |
| 1240 | 1240 |
| ... | ... |
@@ -407,25 +407,25 @@ |
| 407 | 407 |
~MaxMatching() {
|
| 408 | 408 |
destroyStructures(); |
| 409 | 409 |
} |
| 410 | 410 |
|
| 411 | 411 |
/// \name Execution control |
| 412 | 412 |
/// The simplest way to execute the algorithm is to use the |
| 413 | 413 |
/// \c run() member function. |
| 414 | 414 |
/// \n |
| 415 | 415 |
|
| 416 | 416 |
/// If you need better control on the execution, you must call |
| 417 | 417 |
/// \ref init(), \ref greedyInit() or \ref matchingInit() |
| 418 | 418 |
/// functions first, then you can start the algorithm with the \ref |
| 419 |
/// |
|
| 419 |
/// startSparse() or startDense() functions. |
|
| 420 | 420 |
|
| 421 | 421 |
///@{
|
| 422 | 422 |
|
| 423 | 423 |
/// \brief Sets the actual matching to the empty matching. |
| 424 | 424 |
/// |
| 425 | 425 |
/// Sets the actual matching to the empty matching. |
| 426 | 426 |
/// |
| 427 | 427 |
void init() {
|
| 428 | 428 |
createStructures(); |
| 429 | 429 |
for(NodeIt n(_graph); n != INVALID; ++n) {
|
| 430 | 430 |
_matching->set(n, INVALID); |
| 431 | 431 |
_status->set(n, UNMATCHED); |
| ... | ... |
@@ -42,25 +42,25 @@ |
| 42 | 42 |
/// |
| 43 | 43 |
/// In fact, this implementation is the specialization of the |
| 44 | 44 |
/// \ref CapacityScaling "successive shortest path" algorithm. |
| 45 | 45 |
/// |
| 46 | 46 |
/// \tparam Digraph The digraph type the algorithm runs on. |
| 47 | 47 |
/// The default value is \c ListDigraph. |
| 48 | 48 |
/// \tparam LengthMap The type of the length (cost) map. |
| 49 | 49 |
/// The default value is <tt>Digraph::ArcMap<int></tt>. |
| 50 | 50 |
/// |
| 51 | 51 |
/// \warning Length values should be \e non-negative \e integers. |
| 52 | 52 |
/// |
| 53 | 53 |
/// \note For finding node-disjoint paths this algorithm can be used |
| 54 |
/// with \ref |
|
| 54 |
/// with \ref SplitNodes. |
|
| 55 | 55 |
#ifdef DOXYGEN |
| 56 | 56 |
template <typename Digraph, typename LengthMap> |
| 57 | 57 |
#else |
| 58 | 58 |
template < typename Digraph = ListDigraph, |
| 59 | 59 |
typename LengthMap = typename Digraph::template ArcMap<int> > |
| 60 | 60 |
#endif |
| 61 | 61 |
class Suurballe |
| 62 | 62 |
{
|
| 63 | 63 |
TEMPLATE_DIGRAPH_TYPEDEFS(Digraph); |
| 64 | 64 |
|
| 65 | 65 |
typedef typename LengthMap::Value Length; |
| 66 | 66 |
typedef ConstMap<Arc, int> ConstArcMap; |
0 comments (0 inline)