COIN-OR::LEMON - Graph Library

Ignore:
Timestamp:
04/26/04 00:26:19 (21 years ago)
Author:
Alpar Juttner
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@532
Message:

Some bugfixes.
Some more docs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/work/alpar/list_graph_demo.cc

    r397 r401  
    121121   
    122122  }
     123
     124  // Tests for NodeSet and EdgeSet
     125 
     126  {
     127    NodeSet N;
     128   
     129    typedef EdgeSet<NodeSet> ES;
     130   
     131    ES E(N);
     132    ES F(N);
     133    for(int i=0;i<10;i++) G.addNode();
     134   
     135    for(ES::NodeIt n(E);E.valid(n);E.next(n))
     136      for(ES::NodeIt m(E);E.valid(m);E.next(m))
     137        if(n!=m) F.addEdge(n,m);
     138    for(ES::NodeIt n(F);F.valid(n);F.next(n))
     139      for(ES::NodeIt m(F);F.valid(m);F.next(m))
     140        if(n<m) F.addEdge(n,m);
     141   
     142
     143    NodeSet::NodeMap<int> nm1(N);
     144    ES::NodeMap<int> nm2(E);
     145    ES::EdgeMap<int> eme(E);
     146    ES::EdgeMap<int> emf(F);
     147   
     148       
     149  }
    123150 
    124151}
Note: See TracChangeset for help on using the changeset viewer.