equal
deleted
inserted
replaced
40 typedef bool Value; |
40 typedef bool Value; |
41 typedef std::list<Key> OrderedList; |
41 typedef std::list<Key> OrderedList; |
42 |
42 |
43 OrderedList order; |
43 OrderedList order; |
44 |
44 |
45 SerializingWriteMap( const GR& gr ) {} |
45 SerializingWriteMap( const GR& ) {} |
46 |
46 |
47 void set( const Key& k, const Value& v ) { |
47 void set( const Key& k, const Value& v ) { |
48 if( v ) order.push_front(k); |
48 if( v ) order.push_front(k); |
49 } |
49 } |
50 |
50 |
52 return false; |
52 return false; |
53 } |
53 } |
54 }; |
54 }; |
55 |
55 |
56 |
56 |
57 int main( int argc, char *argv[] ) |
57 int main() |
58 { |
58 { |
59 std::cout << "Topological Ordering demo" << std::endl; |
59 std::cout << "Topological Ordering demo" << std::endl; |
60 |
60 |
61 // Create and build the graph |
61 // Create and build the graph |
62 ListGraph gr; |
62 ListGraph gr; |