Changeset 1060:7a24bb2e7480 in lemon-0.x for src/work
- Timestamp:
- 01/07/05 19:53:02 (20 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1456
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/work/jacint/bug.cc
r1059 r1060 1 //lasd megjegyzes a 49-es sorban2 1 #include <iostream> 3 2 #include <queue> … … 7 6 #include <lemon/invalid.h> 8 7 #include <lemon/list_graph.h> 8 #include <lemon/smart_graph.h> 9 9 #include <matching.h> 10 10 11 11 using namespace lemon; 12 using namespace std; 12 13 13 int main(int, char **) {14 14 15 typedef UndirListGraph Graph; 15 int main() { 16 17 typedef UndirSmartGraph Graph; 16 18 17 19 typedef Graph::Edge Edge; … … 20 22 typedef Graph::NodeIt NodeIt; 21 23 typedef Graph::Node Node; 24 25 typedef Graph::OutEdgeIt OutEdgeIt; 22 26 23 27 Graph G; 24 28 25 G.clear();29 // G.clear(); 26 30 std::vector<Graph::Node> nodes; 27 31 for (int i=0; i<5; ++i) … … 36 40 37 41 for(UndirEdgeIt e(G); e!=INVALID; ++e) { 38 std::cout<<G.id(e)<<" : "<<G.id(G.source(e))<<" " <<G.id(G.target(e))<<std::endl; 42 std::cout<<G.id(e)<<" : "<<G.id(G.source(e)) 43 <<" " <<G.id(G.target(e))<<std::endl; 39 44 } 40 45 … … 45 50 } 46 51 52 cout << "Dev Out edges from node " << G.id(nodes[1])<<std::endl; 53 Edge f; 54 for(G.firstOut(f, nodes[1]); f!=INVALID; G.nextOut(f)) { 55 cout<<"edge " << G.id(f) << " goes" 56 <<" from "<< G.id(G.source(f)) 57 << " to " << G.id(G.target(f))<<std::endl; 58 } 59 60 cout << "Out edges from node " << G.id(nodes[1])<<std::endl; 61 for( OutEdgeIt f(G,nodes[1]); f!=INVALID; ++f ) { 62 cout<<"edge " << G.id(f) << " goes" 63 <<" from "<< G.id(G.source(f)) 64 << " to " << G.id(G.target(f))<<std::endl; 65 } 66 47 67 std::cout<<"Edges of node " << G.id(nodes[1])<<std::endl; 68 for( IncEdgeIt f(G,nodes[1]); f!=INVALID; ++f ) { 69 cout<<"edge " << G.id(f) << " goes" 70 <<" from "<< G.id(G.source(f)) 71 << " to " << G.id(G.target(f))<<std::endl; 72 } 48 73 49 for( IncEdgeIt f(G,nodes[1]); f!=INVALID; ++f ) { 50 std::cout<<"edge " << G.id(f)<< " goes to " << G.id(G.target(f))<<std::endl; 51 }//ez a ket for ciklus meg lefut - bar hibas eleken iteral -, de a matching.h-s mar segfaultol 74 //return 0; 75 76 //ez a ket for ciklus meg lefut - bar hibas eleken iteral -, de a 77 //matching.h-s mar segfaultol 52 78 53 79 for( IncEdgeIt f(G,nodes[1]); f!=INVALID; ++f ) {
Note: See TracChangeset
for help on using the changeset viewer.