Added this in order to prevent losing it.
1 #include <lemon/list_graph.h>
5 typedef ListGraph Graph;
6 typedef Graph::NodeIt NodeIt;
7 typedef Graph::EdgeIt EdgeIt;
12 Graph::NodeMap<bool> selected;
16 MyEntity(Graph &_g) : g(_g), selected(_g) {}
17 MyEntity(MyEntity& e) : g(e.g), selected(e.g) {
18 for (NodeIt n(g); n != INVALID; ++n) {
19 selected[n] = e.selected[n];
22 covered_edges = e.covered_edges;
25 return (double) (edges - covered_edges);
40 // kezdeti lefedes generalasa
42 for (NodeIt n(g); n != INVALID; ++n) {
43 ent.selected[n] = false;
46 // k db random node kivalasztasa
49 for (EdgeIt e(g); e != INVALID; ++e) {
51 if ((ent.selected[g.source(e)]) || (ent.selected[g.target(e)])) {
56 ent.covered_edges = j;