demo/coloring.cc
changeset 2068 6936f130bba2
parent 1959 264811b995f3
child 2115 4cd528a30ec1
equal deleted inserted replaced
9:985d68c763d0 10:a6333a1cbc73
    28 #include <vector>
    28 #include <vector>
    29 
    29 
    30 #include <iostream>
    30 #include <iostream>
    31 
    31 
    32 #include <lemon/smart_graph.h>
    32 #include <lemon/smart_graph.h>
    33 #include <lemon/linear_heap.h>
    33 #include <lemon/bucket_heap.h>
    34 #include <lemon/graph_reader.h>
    34 #include <lemon/graph_reader.h>
    35 #include <lemon/graph_to_eps.h>
    35 #include <lemon/graph_to_eps.h>
    36 
    36 
    37 #include <fstream>
    37 #include <fstream>
    38 
    38 
    61   reader.run();
    61   reader.run();
    62 
    62 
    63   Graph::NodeMap<int> color(graph, -2);
    63   Graph::NodeMap<int> color(graph, -2);
    64   
    64   
    65   Graph::NodeMap<int> heapMap(graph, -1);
    65   Graph::NodeMap<int> heapMap(graph, -1);
    66   LinearHeap<Node, Graph::NodeMap<int> > heap(heapMap);
    66   BucketHeap<Node, Graph::NodeMap<int> > heap(heapMap);
    67   
    67   
    68   for (NodeIt it(graph); it != INVALID; ++it) {
    68   for (NodeIt it(graph); it != INVALID; ++it) {
    69     heap.push(it, countOutEdges(graph, it));
    69     heap.push(it, countOutEdges(graph, it));
    70   }
    70   }
    71 
    71