demo/topological_ordering.cc
changeset 2241 37e0966e43b6
parent 2216 1e45cdeea3cc
child 2391 14a343be7a5a
equal deleted inserted replaced
0:8d3060a01af7 1:51c2baf666d8
    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;