Changes in / [899:cc9e0c15d747:898:75c97c3786d6] in lemon
- Files:
-
- 1 deleted
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
INSTALL
r890 r615 174 174 175 175 Disable COIN-OR support. 176 177 178 Makefile Variables179 ==================180 181 Some Makefile variables are reserved by the GNU Coding Standards for182 the use of the "user" - the person building the package. For instance,183 CXX and CXXFLAGS are such variables, and have the same meaning as184 explained in the previous section. These variables can be set on the185 command line when invoking `make' like this:186 `make [VARIABLE=VALUE]...'187 188 WARNINGCXXFLAGS is a non-standard Makefile variable introduced by us189 to hold several compiler flags related to warnings. Its default value190 can be overridden when invoking `make'. For example to disable all191 warning flags use `make WARNINGCXXFLAGS='.192 193 In order to turn off a single flag from the default set of warning194 flags, you can use the CXXFLAGS variable, since this is passed after195 WARNINGCXXFLAGS. For example to turn off `-Wold-style-cast' (which is196 used by default when g++ is detected) you can use197 `make CXXFLAGS="-g -O2 -Wno-old-style-cast"'. -
doc/CMakeLists.txt
r895 r791 27 27 COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/nodeshape_3.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_3.eps 28 28 COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/nodeshape_4.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_4.eps 29 COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/planar.png ${CMAKE_CURRENT_SOURCE_DIR}/images/planar.eps30 29 COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/strongly_connected_components.png ${CMAKE_CURRENT_SOURCE_DIR}/images/strongly_connected_components.eps 31 30 COMMAND ${CMAKE_COMMAND} -E remove_directory html -
doc/Makefile.am
r895 r791 29 29 edge_biconnected_components.eps \ 30 30 node_biconnected_components.eps \ 31 planar.eps \32 31 strongly_connected_components.eps 33 32 -
lemon/bellman_ford.h
r891 r870 172 172 /// the lengths of the arcs. The default map type is 173 173 /// \ref concepts::Digraph::ArcMap "GR::ArcMap<int>". 174 /// \tparam TR The traits class that defines various types used by the175 /// algorithm. By default, it is \ref BellmanFordDefaultTraits176 /// "BellmanFordDefaultTraits<GR, LEN>".177 /// In most cases, this parameter should not be set directly,178 /// consider to use the named template parameters instead.179 174 #ifdef DOXYGEN 180 175 template <typename GR, typename LEN, typename TR> … … 939 934 /// This class should only be used through the \ref bellmanFord() 940 935 /// function, which makes it easier to use the algorithm. 941 ///942 /// \tparam TR The traits class that defines various types used by the943 /// algorithm.944 936 template<class TR> 945 937 class BellmanFordWizard : public TR { -
lemon/bfs.h
r891 r835 122 122 ///\tparam GR The type of the digraph the algorithm runs on. 123 123 ///The default type is \ref ListDigraph. 124 ///\tparam TR The traits class that defines various types used by the125 ///algorithm. By default, it is \ref BfsDefaultTraits126 ///"BfsDefaultTraits<GR>".127 ///In most cases, this parameter should not be set directly,128 ///consider to use the named template parameters instead.129 124 #ifdef DOXYGEN 130 125 template <typename GR, … … 963 958 /// This class should only be used through the \ref bfs() function, 964 959 /// which makes it easier to use the algorithm. 965 ///966 /// \tparam TR The traits class that defines various types used by the967 /// algorithm.968 960 template<class TR> 969 961 class BfsWizard : public TR … … 1304 1296 /// does not observe the BFS events. If you want to observe the BFS 1305 1297 /// events, you should implement your own visitor class. 1306 /// \tparam TR T he traits class that defines varioustypes used by the1307 /// algorithm. By default, it is \ref BfsVisitDefaultTraits1308 /// "BfsVisitDefaultTraits<GR>".1309 /// In most cases, this parameter should not be set directly,1310 /// consider to use the named template parameters instead.1298 /// \tparam TR Traits class to set various data types used by the 1299 /// algorithm. The default traits class is 1300 /// \ref BfsVisitDefaultTraits "BfsVisitDefaultTraits<GR>". 1301 /// See \ref BfsVisitDefaultTraits for the documentation of 1302 /// a BFS visit traits class. 1311 1303 #ifdef DOXYGEN 1312 1304 template <typename GR, typename VS, typename TR> -
lemon/capacity_scaling.h
r899 r898 78 78 /// \tparam GR The digraph type the algorithm runs on. 79 79 /// \tparam V The number type used for flow amounts, capacity bounds 80 /// and supply values in the algorithm. By default ,it is \c int.80 /// and supply values in the algorithm. By default it is \c int. 81 81 /// \tparam C The number type used for costs and potentials in the 82 /// algorithm. By default, it is the same as \c V. 83 /// \tparam TR The traits class that defines various types used by the 84 /// algorithm. By default, it is \ref CapacityScalingDefaultTraits 85 /// "CapacityScalingDefaultTraits<GR, V, C>". 86 /// In most cases, this parameter should not be set directly, 87 /// consider to use the named template parameters instead. 82 /// algorithm. By default it is the same as \c V. 88 83 /// 89 84 /// \warning Both number types must be signed and all input data must -
lemon/circulation.h
r891 r833 174 174 \tparam SM The type of the supply map. The default map type is 175 175 \ref concepts::Digraph::NodeMap "GR::NodeMap<UM::Value>". 176 \tparam TR The traits class that defines various types used by the177 algorithm. By default, it is \ref CirculationDefaultTraits178 "CirculationDefaultTraits<GR, LM, UM, SM>".179 In most cases, this parameter should not be set directly,180 consider to use the named template parameters instead.181 176 */ 182 177 #ifdef DOXYGEN -
lemon/cost_scaling.h
r899 r898 105 105 /// \tparam GR The digraph type the algorithm runs on. 106 106 /// \tparam V The number type used for flow amounts, capacity bounds 107 /// and supply values in the algorithm. By default ,it is \c int.107 /// and supply values in the algorithm. By default it is \c int. 108 108 /// \tparam C The number type used for costs and potentials in the 109 /// algorithm. By default, it is the same as \c V. 110 /// \tparam TR The traits class that defines various types used by the 111 /// algorithm. By default, it is \ref CostScalingDefaultTraits 112 /// "CostScalingDefaultTraits<GR, V, C>". 113 /// In most cases, this parameter should not be set directly, 114 /// consider to use the named template parameters instead. 109 /// algorithm. By default it is the same as \c V. 115 110 /// 116 111 /// \warning Both number types must be signed and all input data must … … 142 137 /// 143 138 /// The large cost type used for internal computations. 144 /// By default, it is \c long \c long if the \c Cost type is integer, 139 /// Using the \ref CostScalingDefaultTraits "default traits class", 140 /// it is \c long \c long if the \c Cost type is integer, 145 141 /// otherwise it is \c double. 146 142 typedef typename TR::LargeCost LargeCost; -
lemon/dfs.h
r891 r835 122 122 ///\tparam GR The type of the digraph the algorithm runs on. 123 123 ///The default type is \ref ListDigraph. 124 ///\tparam TR The traits class that defines various types used by the125 ///algorithm. By default, it is \ref DfsDefaultTraits126 ///"DfsDefaultTraits<GR>".127 ///In most cases, this parameter should not be set directly,128 ///consider to use the named template parameters instead.129 124 #ifdef DOXYGEN 130 125 template <typename GR, … … 893 888 /// This class should only be used through the \ref dfs() function, 894 889 /// which makes it easier to use the algorithm. 895 ///896 /// \tparam TR The traits class that defines various types used by the897 /// algorithm.898 890 template<class TR> 899 891 class DfsWizard : public TR … … 1246 1238 /// does not observe the DFS events. If you want to observe the DFS 1247 1239 /// events, you should implement your own visitor class. 1248 /// \tparam TR T he traits class that defines varioustypes used by the1249 /// algorithm. By default, it is \ref DfsVisitDefaultTraits1250 /// "DfsVisitDefaultTraits<GR>".1251 /// In most cases, this parameter should not be set directly,1252 /// consider to use the named template parameters instead.1240 /// \tparam TR Traits class to set various data types used by the 1241 /// algorithm. The default traits class is 1242 /// \ref DfsVisitDefaultTraits "DfsVisitDefaultTraits<GR>". 1243 /// See \ref DfsVisitDefaultTraits for the documentation of 1244 /// a DFS visit traits class. 1253 1245 #ifdef DOXYGEN 1254 1246 template <typename GR, typename VS, typename TR> -
lemon/dijkstra.h
r891 r835 193 193 ///it is necessary. The default map type is \ref 194 194 ///concepts::Digraph::ArcMap "GR::ArcMap<int>". 195 ///\tparam TR The traits class that defines various types used by the196 ///algorithm. By default, it is \ref DijkstraDefaultTraits197 ///"DijkstraDefaultTraits<GR, LEN>".198 ///In most cases, this parameter should not be set directly,199 ///consider to use the named template parameters instead.200 195 #ifdef DOXYGEN 201 196 template <typename GR, typename LEN, typename TR> … … 1098 1093 /// This class should only be used through the \ref dijkstra() function, 1099 1094 /// which makes it easier to use the algorithm. 1100 ///1101 /// \tparam TR The traits class that defines various types used by the1102 /// algorithm.1103 1095 template<class TR> 1104 1096 class DijkstraWizard : public TR -
lemon/hartmann_orlin.h
r891 r859 107 107 /// \tparam LEN The type of the length map. The default 108 108 /// map type is \ref concepts::Digraph::ArcMap "GR::ArcMap<int>". 109 /// \tparam TR The traits class that defines various types used by the110 /// algorithm. By default, it is \ref HartmannOrlinDefaultTraits111 /// "HartmannOrlinDefaultTraits<GR, LEN>".112 /// In most cases, this parameter should not be set directly,113 /// consider to use the named template parameters instead.114 109 #ifdef DOXYGEN 115 110 template <typename GR, typename LEN, typename TR> … … 133 128 /// 134 129 /// The large value type used for internal computations. 135 /// By default, it is \c long \c long if the \c Value type is integer, 130 /// Using the \ref HartmannOrlinDefaultTraits "default traits class", 131 /// it is \c long \c long if the \c Value type is integer, 136 132 /// otherwise it is \c double. 137 133 typedef typename TR::LargeValue LargeValue; -
lemon/howard.h
r891 r818 107 107 /// \tparam LEN The type of the length map. The default 108 108 /// map type is \ref concepts::Digraph::ArcMap "GR::ArcMap<int>". 109 /// \tparam TR The traits class that defines various types used by the110 /// algorithm. By default, it is \ref HowardDefaultTraits111 /// "HowardDefaultTraits<GR, LEN>".112 /// In most cases, this parameter should not be set directly,113 /// consider to use the named template parameters instead.114 109 #ifdef DOXYGEN 115 110 template <typename GR, typename LEN, typename TR> … … 133 128 /// 134 129 /// The large value type used for internal computations. 135 /// By default, it is \c long \c long if the \c Value type is integer, 130 /// Using the \ref HowardDefaultTraits "default traits class", 131 /// it is \c long \c long if the \c Value type is integer, 136 132 /// otherwise it is \c double. 137 133 typedef typename TR::LargeValue LargeValue; -
lemon/karp.h
r891 r819 105 105 /// \tparam LEN The type of the length map. The default 106 106 /// map type is \ref concepts::Digraph::ArcMap "GR::ArcMap<int>". 107 /// \tparam TR The traits class that defines various types used by the108 /// algorithm. By default, it is \ref KarpDefaultTraits109 /// "KarpDefaultTraits<GR, LEN>".110 /// In most cases, this parameter should not be set directly,111 /// consider to use the named template parameters instead.112 107 #ifdef DOXYGEN 113 108 template <typename GR, typename LEN, typename TR> … … 131 126 /// 132 127 /// The large value type used for internal computations. 133 /// By default, it is \c long \c long if the \c Value type is integer, 128 /// Using the \ref KarpDefaultTraits "default traits class", 129 /// it is \c long \c long if the \c Value type is integer, 134 130 /// otherwise it is \c double. 135 131 typedef typename TR::LargeValue LargeValue; -
lemon/min_cost_arborescence.h
r891 r760 113 113 /// it is necessary. The default map type is \ref 114 114 /// concepts::Digraph::ArcMap "Digraph::ArcMap<int>". 115 /// \tparam TR The traits class that defines various types used by the 116 /// algorithm. By default, it is \ref MinCostArborescenceDefaultTraits 115 /// \param TR Traits class to set various data types used 116 /// by the algorithm. The default traits class is 117 /// \ref MinCostArborescenceDefaultTraits 117 118 /// "MinCostArborescenceDefaultTraits<GR, CM>". 118 /// In most cases, this parameter should not be set directly,119 /// consider to use the named template parameters instead.120 119 #ifndef DOXYGEN 121 120 template <typename GR, … … 124 123 MinCostArborescenceDefaultTraits<GR, CM> > 125 124 #else 126 template <typename GR, typename CM, type nameTR>125 template <typename GR, typename CM, typedef TR> 127 126 #endif 128 127 class MinCostArborescence { -
lemon/planarity.h
r896 r862 519 519 /// 520 520 /// This function implements the Boyer-Myrvold algorithm for 521 /// planarity checking of an undirected simplegraph. It is a simplified521 /// planarity checking of an undirected graph. It is a simplified 522 522 /// version of the PlanarEmbedding algorithm class because neither 523 /// the embedding nor the Kuratowski subdivisons arecomputed.523 /// the embedding nor the kuratowski subdivisons are not computed. 524 524 template <typename GR> 525 525 bool checkPlanarity(const GR& graph) { … … 533 533 /// 534 534 /// This class implements the Boyer-Myrvold algorithm for planar 535 /// embedding of an undirected simplegraph. The planar embedding is an535 /// embedding of an undirected graph. The planar embedding is an 536 536 /// ordering of the outgoing edges of the nodes, which is a possible 537 537 /// configuration to draw the graph in the plane. If there is not 538 /// such ordering then the graph contains a K<sub>5</sub>(full graph539 /// with 5 nodes) or a K<sub>3,3</sub>(complete bipartite graph on540 /// 3 Red and 3 Blue nodes) subdivision.538 /// such ordering then the graph contains a \f$ K_5 \f$ (full graph 539 /// with 5 nodes) or a \f$ K_{3,3} \f$ (complete bipartite graph on 540 /// 3 ANode and 3 BNode) subdivision. 541 541 /// 542 542 /// The current implementation calculates either an embedding or a 543 /// Kuratowski subdivision. The running time of the algorithm is O(n). 544 /// 545 /// \see PlanarDrawing, checkPlanarity() 543 /// Kuratowski subdivision. The running time of the algorithm is 544 /// \f$ O(n) \f$. 546 545 template <typename Graph> 547 546 class PlanarEmbedding { … … 593 592 public: 594 593 595 /// \brief The map type for storing the embedding 596 /// 597 /// The map type for storing the embedding. 598 /// \see embeddingMap() 594 /// \brief The map for store of embedding 599 595 typedef typename Graph::template ArcMap<Arc> EmbeddingMap; 600 596 601 597 /// \brief Constructor 602 598 /// 603 /// Constructor. 604 /// \pre The graph must be simple, i.e. it should not 605 /// contain parallel or loop arcs. 599 /// \note The graph should be simple, i.e. parallel and loop arc 600 /// free. 606 601 PlanarEmbedding(const Graph& graph) 607 602 : _graph(graph), _embedding(_graph), _kuratowski(graph, false) {} 608 603 609 /// \brief Run the algorithm.604 /// \brief Runs the algorithm. 610 605 /// 611 /// This function runs the algorithm.612 /// \param kuratowski If th is parameter is set to \cfalse, then the606 /// Runs the algorithm. 607 /// \param kuratowski If the parameter is false, then the 613 608 /// algorithm does not compute a Kuratowski subdivision. 614 /// \return \c true ifthe graph is planar.609 ///\return %True when the graph is planar. 615 610 bool run(bool kuratowski = true) { 616 611 typedef _planarity_bits::PlanarityVisitor<Graph> Visitor; … … 705 700 } 706 701 707 /// \brief Give back the successor of an arc702 /// \brief Gives back the successor of an arc 708 703 /// 709 /// This function gives back the successor of an arc. Itmakes704 /// Gives back the successor of an arc. This function makes 710 705 /// possible to query the cyclic order of the outgoing arcs from 711 706 /// a node. … … 714 709 } 715 710 716 /// \brief Give back the calculated embedding map711 /// \brief Gives back the calculated embedding map 717 712 /// 718 /// This function gives back the calculated embedding map, which 719 /// contains the successor of each arc in the cyclic order of the 720 /// outgoing arcs of its source node. 713 /// The returned map contains the successor of each arc in the 714 /// graph. 721 715 const EmbeddingMap& embeddingMap() const { 722 716 return _embedding; 723 717 } 724 718 725 /// \brief Give back \c true if the given edge is in the Kuratowski 719 /// \brief Gives back true if the undirected arc is in the 720 /// kuratowski subdivision 721 /// 722 /// Gives back true if the undirected arc is in the kuratowski 726 723 /// subdivision 727 /// 728 /// This function gives back \c true if the given edge is in the found 729 /// Kuratowski subdivision. 730 /// \pre The \c run() function must be called with \c true parameter 731 /// before using this function. 732 bool kuratowski(const Edge& edge) const { 724 /// \note The \c run() had to be called with true value. 725 bool kuratowski(const Edge& edge) { 733 726 return _kuratowski[edge]; 734 727 } … … 2067 2060 /// 2068 2061 /// The planar drawing algorithm calculates positions for the nodes 2069 /// in the plane . These coordinates satisfy that if the edges are2070 /// represented with straight lines ,then they will not intersect2062 /// in the plane which coordinates satisfy that if the arcs are 2063 /// represented with straight lines then they will not intersect 2071 2064 /// each other. 2072 2065 /// 2073 /// Scnyder's algorithm embeds the graph on an \c (n-2)x(n-2) size grid,2074 /// i.e. each node will be located in the \c [0 ..n-2]x[0..n-2] square.2066 /// Scnyder's algorithm embeds the graph on \c (n-2,n-2) size grid, 2067 /// i.e. each node will be located in the \c [0,n-2]x[0,n-2] square. 2075 2068 /// The time complexity of the algorithm is O(n). 2076 ///2077 /// \see PlanarEmbedding2078 2069 template <typename Graph> 2079 2070 class PlanarDrawing { … … 2082 2073 TEMPLATE_GRAPH_TYPEDEFS(Graph); 2083 2074 2084 /// \brief The point type for stor ingcoordinates2075 /// \brief The point type for store coordinates 2085 2076 typedef dim2::Point<int> Point; 2086 /// \brief The map type for stor ing the coordinates of the nodes2077 /// \brief The map type for store coordinates 2087 2078 typedef typename Graph::template NodeMap<Point> PointMap; 2088 2079 … … 2091 2082 /// 2092 2083 /// Constructor 2093 /// \pre The graph must be simple, i.e. it should not 2094 /// contain parallel or loop arcs. 2084 /// \pre The graph should be simple, i.e. loop and parallel arc free. 2095 2085 PlanarDrawing(const Graph& graph) 2096 2086 : _graph(graph), _point_map(graph) {} … … 2377 2367 public: 2378 2368 2379 /// \brief Calculate the node positions2369 /// \brief Calculates the node positions 2380 2370 /// 2381 /// This function calculates the node positions on the plane.2382 /// \return \c true if the graph is planar.2371 /// This function calculates the node positions. 2372 /// \return %True if the graph is planar. 2383 2373 bool run() { 2384 2374 PlanarEmbedding<Graph> pe(_graph); … … 2389 2379 } 2390 2380 2391 /// \brief Calculate the node positions according to a2381 /// \brief Calculates the node positions according to a 2392 2382 /// combinatorical embedding 2393 2383 /// 2394 /// This function calculates the node positions on the plane. 2395 /// The given \c embedding map should contain a valid combinatorical 2396 /// embedding, i.e. a valid cyclic order of the arcs. 2397 /// It can be computed using PlanarEmbedding. 2384 /// This function calculates the node locations. The \c embedding 2385 /// parameter should contain a valid combinatorical embedding, i.e. 2386 /// a valid cyclic order of the arcs. 2398 2387 template <typename EmbeddingMap> 2399 2388 void run(const EmbeddingMap& embedding) { … … 2435 2424 /// \brief The coordinate of the given node 2436 2425 /// 2437 /// Th is function returns the coordinate of the given node.2426 /// The coordinate of the given node. 2438 2427 Point operator[](const Node& node) const { 2439 2428 return _point_map[node]; 2440 2429 } 2441 2430 2442 /// \brief Return the grid embedding in a node map2431 /// \brief Returns the grid embedding in a \e NodeMap. 2443 2432 /// 2444 /// This function returns the grid embedding in a node map of 2445 /// \c dim2::Point<int> coordinates. 2433 /// Returns the grid embedding in a \e NodeMap of \c dim2::Point<int> . 2446 2434 const PointMap& coords() const { 2447 2435 return _point_map; … … 2483 2471 /// 2484 2472 /// The graph coloring problem is the coloring of the graph nodes 2485 /// so that there are noadjacent nodes with the same color. The2486 /// planar graphs can always be colored with four colors, whichis2487 /// proved by Appel and Haken . Their proofs provide a quadratic2473 /// that there are not adjacent nodes with the same color. The 2474 /// planar graphs can be always colored with four colors, it is 2475 /// proved by Appel and Haken and their proofs provide a quadratic 2488 2476 /// time algorithm for four coloring, but it could not be used to 2489 /// implement anefficient algorithm. The five and six coloring can be2490 /// made in linear time, but in this class ,the five coloring has2477 /// implement efficient algorithm. The five and six coloring can be 2478 /// made in linear time, but in this class the five coloring has 2491 2479 /// quadratic worst case time complexity. The two coloring (if 2492 2480 /// possible) is solvable with a graph search algorithm and it is 2493 2481 /// implemented in \ref bipartitePartitions() function in LEMON. To 2494 /// decide whether a planar graph is three colorable is NP-complete. 2482 /// decide whether the planar graph is three colorable is 2483 /// NP-complete. 2495 2484 /// 2496 2485 /// This class contains member functions for calculate colorings 2497 2486 /// with five and six colors. The six coloring algorithm is a simple 2498 2487 /// greedy coloring on the backward minimum outgoing order of nodes. 2499 /// This order can be computed by selectingthe node with least2500 /// outgoing arcs to unprocessed nodes i n each phase. This order2488 /// This order can be computed as in each phase the node with least 2489 /// outgoing arcs to unprocessed nodes is chosen. This order 2501 2490 /// guarantees that when a node is chosen for coloring it has at 2502 2491 /// most five already colored adjacents. The five coloring algorithm … … 2511 2500 TEMPLATE_GRAPH_TYPEDEFS(Graph); 2512 2501 2513 /// \brief The map type for stor ing color indices2502 /// \brief The map type for store color indexes 2514 2503 typedef typename Graph::template NodeMap<int> IndexMap; 2515 /// \brief The map type for storing colors 2516 /// 2517 /// The map type for storing colors. 2518 /// \see Palette, Color 2504 /// \brief The map type for store colors 2519 2505 typedef ComposeMap<Palette, IndexMap> ColorMap; 2520 2506 2521 2507 /// \brief Constructor 2522 2508 /// 2523 /// Constructor. 2524 /// \pre The graph must be simple, i.e. it should not 2525 /// contain parallel or loop arcs. 2509 /// Constructor 2510 /// \pre The graph should be simple, i.e. loop and parallel arc free. 2526 2511 PlanarColoring(const Graph& graph) 2527 2512 : _graph(graph), _color_map(graph), _palette(0) { … … 2534 2519 } 2535 2520 2536 /// \brief Return the node map of color indices2521 /// \brief Returns the \e NodeMap of color indexes 2537 2522 /// 2538 /// This function returns the node map of color indices. The values are2539 /// in therange \c [0..4] or \c [0..5] according to the coloring method.2523 /// Returns the \e NodeMap of color indexes. The values are in the 2524 /// range \c [0..4] or \c [0..5] according to the coloring method. 2540 2525 IndexMap colorIndexMap() const { 2541 2526 return _color_map; 2542 2527 } 2543 2528 2544 /// \brief Return the node map of colors2529 /// \brief Returns the \e NodeMap of colors 2545 2530 /// 2546 /// This function returns the node map of colors. The values are among2547 /// five or sixdistinct \ref lemon::Color "colors".2531 /// Returns the \e NodeMap of colors. The values are five or six 2532 /// distinct \ref lemon::Color "colors". 2548 2533 ColorMap colorMap() const { 2549 2534 return composeMap(_palette, _color_map); 2550 2535 } 2551 2536 2552 /// \brief Return the color index of the node2537 /// \brief Returns the color index of the node 2553 2538 /// 2554 /// This function returns the color index of the given node. The value is2555 /// in therange \c [0..4] or \c [0..5] according to the coloring method.2539 /// Returns the color index of the node. The values are in the 2540 /// range \c [0..4] or \c [0..5] according to the coloring method. 2556 2541 int colorIndex(const Node& node) const { 2557 2542 return _color_map[node]; 2558 2543 } 2559 2544 2560 /// \brief Return the color of the node2545 /// \brief Returns the color of the node 2561 2546 /// 2562 /// This function returns the color of the given node. The value is among2563 /// five or sixdistinct \ref lemon::Color "colors".2547 /// Returns the color of the node. The values are five or six 2548 /// distinct \ref lemon::Color "colors". 2564 2549 Color color(const Node& node) const { 2565 2550 return _palette[_color_map[node]]; … … 2567 2552 2568 2553 2569 /// \brief Calculate a coloring with at most six colors2554 /// \brief Calculates a coloring with at most six colors 2570 2555 /// 2571 2556 /// This function calculates a coloring with at most six colors. The time 2572 2557 /// complexity of this variant is linear in the size of the graph. 2573 /// \return \c true if the algorithm could color the graph with six colors.2574 /// If the algorithm fails, then the graph is notplanar.2575 /// \note This function can return \ctrue if the graph is not2576 /// planar , but it can be colored with at most sixcolors.2558 /// \return %True when the algorithm could color the graph with six color. 2559 /// If the algorithm fails, then the graph could not be planar. 2560 /// \note This function can return true if the graph is not 2561 /// planar but it can be colored with 6 colors. 2577 2562 bool runSixColoring() { 2578 2563 … … 2676 2661 public: 2677 2662 2678 /// \brief Calculate a coloring with at most five colors2663 /// \brief Calculates a coloring with at most five colors 2679 2664 /// 2680 2665 /// This function calculates a coloring with at most five 2681 2666 /// colors. The worst case time complexity of this variant is 2682 2667 /// quadratic in the size of the graph. 2683 /// \param embedding This map should contain a valid combinatorical2684 /// embedding, i.e. a valid cyclic order of the arcs.2685 /// It can be computed using PlanarEmbedding.2686 2668 template <typename EmbeddingMap> 2687 2669 void runFiveColoring(const EmbeddingMap& embedding) { … … 2730 2712 } 2731 2713 2732 /// \brief Calculate a coloring with at most five colors2714 /// \brief Calculates a coloring with at most five colors 2733 2715 /// 2734 2716 /// This function calculates a coloring with at most five 2735 2717 /// colors. The worst case time complexity of this variant is 2736 2718 /// quadratic in the size of the graph. 2737 /// \return \c true ifthe graph is planar.2719 /// \return %True when the graph is planar. 2738 2720 bool runFiveColoring() { 2739 2721 PlanarEmbedding<Graph> pe(_graph); -
lemon/preflow.h
r891 r889 120 120 /// \tparam CAP The type of the capacity map. The default map 121 121 /// type is \ref concepts::Digraph::ArcMap "GR::ArcMap<int>". 122 /// \tparam TR The traits class that defines various types used by the123 /// algorithm. By default, it is \ref PreflowDefaultTraits124 /// "PreflowDefaultTraits<GR, CAP>".125 /// In most cases, this parameter should not be set directly,126 /// consider to use the named template parameters instead.127 122 #ifdef DOXYGEN 128 123 template <typename GR, typename CAP, typename TR>
Note: See TracChangeset
for help on using the changeset viewer.