lemon/planarity.h
changeset 2624 dc4dd5fc0e25
parent 2553 bfced05fa852
equal deleted inserted replaced
5:3ebd502bc93c 6:44515002e13f
  2547 
  2547 
  2548     /// \brief Returns the color of the node
  2548     /// \brief Returns the color of the node
  2549     ///
  2549     ///
  2550     /// Returns the color of the node. The values are five or six
  2550     /// Returns the color of the node. The values are five or six
  2551     /// distinct \ref lemon::Color "colors".
  2551     /// distinct \ref lemon::Color "colors".
  2552     int color(const Node& node) const {
  2552     Color color(const Node& node) const {
  2553       return _palette[_color_map[node]];
  2553       return _palette[_color_map[node]];
  2554     }
  2554     }
  2555     
  2555     
  2556 
  2556 
  2557     /// \brief Calculates a coloring with at most six colors
  2557     /// \brief Calculates a coloring with at most six colors
  2662   public:
  2662   public:
  2663 
  2663 
  2664     /// \brief Calculates a coloring with at most five colors
  2664     /// \brief Calculates a coloring with at most five colors
  2665     ///
  2665     ///
  2666     /// This function calculates a coloring with at most five
  2666     /// This function calculates a coloring with at most five
  2667     /// colors. The wirst case time complexity of this variant is
  2667     /// colors. The worst case time complexity of this variant is
  2668     /// quadratic in the size of the graph.
  2668     /// quadratic in the size of the graph.
  2669     template <typename EmbeddingMap>
  2669     template <typename EmbeddingMap>
  2670     void runFiveColoring(const EmbeddingMap& embedding) {
  2670     void runFiveColoring(const EmbeddingMap& embedding) {
  2671       
  2671       
  2672       typename UGraph::template NodeMap<int> heap_index(_ugraph, -1);
  2672       typename UGraph::template NodeMap<int> heap_index(_ugraph, -1);