Changeset 632:65fbcf2f978a in lemon for test/bfs_test.cc
 Timestamp:
 04/15/09 03:26:45 (14 years ago)
 Branch:
 default
 Phase:
 public
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

test/bfs_test.cc
r463 r632 59 59 60 60 Digraph G; 61 Node s, t ;61 Node s, t, n; 62 62 Arc e; 63 int l ;63 int l, i; 64 64 bool b; 65 65 BType::DistMap d(G); 66 66 BType::PredMap p(G); 67 67 Path<Digraph> pp; 68 concepts::ReadMap<Node,bool> nm; 68 69 69 70 { 70 71 BType bfs_test(G); 72 const BType& const_bfs_test = bfs_test; 71 73 72 74 bfs_test.run(s); … … 74 76 bfs_test.run(); 75 77 76 l = bfs_test.dist(t); 77 e = bfs_test.predArc(t); 78 s = bfs_test.predNode(t); 79 b = bfs_test.reached(t); 80 d = bfs_test.distMap(); 81 p = bfs_test.predMap(); 82 pp = bfs_test.path(t); 78 bfs_test.init(); 79 bfs_test.addSource(s); 80 n = bfs_test.processNextNode(); 81 n = bfs_test.processNextNode(t, b); 82 n = bfs_test.processNextNode(nm, n); 83 n = const_bfs_test.nextNode(); 84 b = const_bfs_test.emptyQueue(); 85 i = const_bfs_test.queueSize(); 86 87 bfs_test.start(); 88 bfs_test.start(t); 89 bfs_test.start(nm); 90 91 l = const_bfs_test.dist(t); 92 e = const_bfs_test.predArc(t); 93 s = const_bfs_test.predNode(t); 94 b = const_bfs_test.reached(t); 95 d = const_bfs_test.distMap(); 96 p = const_bfs_test.predMap(); 97 pp = const_bfs_test.path(t); 83 98 } 84 99 { … … 87 102 ::SetDistMap<concepts::ReadWriteMap<Node,int> > 88 103 ::SetReachedMap<concepts::ReadWriteMap<Node,bool> > 104 ::SetStandardProcessedMap 89 105 ::SetProcessedMap<concepts::WriteMap<Node,bool> > 90 ::SetStandardProcessedMap91 106 ::Create bfs_test(G); 107 108 concepts::ReadWriteMap<Node,Arc> pred_map; 109 concepts::ReadWriteMap<Node,int> dist_map; 110 concepts::ReadWriteMap<Node,bool> reached_map; 111 concepts::WriteMap<Node,bool> processed_map; 112 113 bfs_test 114 .predMap(pred_map) 115 .distMap(dist_map) 116 .reachedMap(reached_map) 117 .processedMap(processed_map); 92 118 93 119 bfs_test.run(s); 94 120 bfs_test.run(s,t); 95 121 bfs_test.run(); 122 123 bfs_test.init(); 124 bfs_test.addSource(s); 125 n = bfs_test.processNextNode(); 126 n = bfs_test.processNextNode(t, b); 127 n = bfs_test.processNextNode(nm, n); 128 n = bfs_test.nextNode(); 129 b = bfs_test.emptyQueue(); 130 i = bfs_test.queueSize(); 131 132 bfs_test.start(); 133 bfs_test.start(t); 134 bfs_test.start(nm); 96 135 97 136 l = bfs_test.dist(t);
Note: See TracChangeset
for help on using the changeset viewer.