Changes in / [366:efbd0ab50a77:363:a637fb9d457b] in lemon-main
- Files:
-
- 1 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/Makefile.am
r366 r363 32 32 lemon/graph_to_eps.h \ 33 33 lemon/grid_graph.h \ 34 lemon/hypercube_graph.h \35 34 lemon/kruskal.h \ 36 35 lemon/lgf_reader.h \ -
test/digraph_test.cc
r365 r354 21 21 #include <lemon/smart_graph.h> 22 22 #include <lemon/full_graph.h> 23 //#include <lemon/hypercube_graph.h> 23 24 24 25 #include "test_tools.h" … … 112 113 } 113 114 115 114 116 void checkConcepts() { 115 117 { // Checking digraph components … … 144 146 checkConcept<Digraph, FullDigraph>(); 145 147 } 148 // { // Checking HyperCubeDigraph 149 // checkConcept<Digraph, HyperCubeDigraph>(); 150 // } 146 151 } 147 152 -
test/graph_test.cc
r365 r356 22 22 #include <lemon/full_graph.h> 23 23 #include <lemon/grid_graph.h> 24 #include <lemon/hypercube_graph.h>25 24 26 25 #include "test_tools.h" … … 106 105 107 106 for (NodeIt n(G); n != INVALID; ++n) { 108 checkGraphOutArcList(G, n, num - 1); 109 checkGraphInArcList(G, n, num - 1); 110 checkGraphIncEdgeList(G, n, num - 1); 107 checkGraphOutArcList(G, n, num - 1); 108 checkGraphInArcList(G, n, num - 1); 109 checkGraphIncEdgeList(G, n, num - 1); 111 110 } 112 111 … … 123 122 checkGraphEdgeMap(G); 124 123 125 124 126 125 for (int i = 0; i < G.nodeNum(); ++i) { 127 126 check(G.index(G(i)) == i, "Wrong index"); … … 179 178 checkConcept<Graph, GridGraph>(); 180 179 } 181 { // Checking HypercubeGraph182 checkConcept<Graph, HypercubeGraph>();183 }184 180 } 185 181 … … 317 313 } 318 314 319 void checkHypercubeGraph(int dim) {320 GRAPH_TYPEDEFS(HypercubeGraph);321 322 HypercubeGraph G(dim);323 checkGraphNodeList(G, 1 << dim);324 checkGraphEdgeList(G, dim * (1 << dim-1));325 checkGraphArcList(G, dim * (1 << dim));326 327 Node n = G.nodeFromId(dim);328 329 for (NodeIt n(G); n != INVALID; ++n) {330 checkGraphIncEdgeList(G, n, dim);331 for (IncEdgeIt e(G, n); e != INVALID; ++e) {332 check( (G.u(e) == n &&333 G.id(G.v(e)) == G.id(n) ^ (1 << G.dimension(e))) ||334 (G.v(e) == n &&335 G.id(G.u(e)) == G.id(n) ^ (1 << G.dimension(e))),336 "Wrong edge or wrong dimension");337 }338 339 checkGraphOutArcList(G, n, dim);340 for (OutArcIt a(G, n); a != INVALID; ++a) {341 check(G.source(a) == n &&342 G.id(G.target(a)) == G.id(n) ^ (1 << G.dimension(a)),343 "Wrong arc or wrong dimension");344 }345 346 checkGraphInArcList(G, n, dim);347 for (InArcIt a(G, n); a != INVALID; ++a) {348 check(G.target(a) == n &&349 G.id(G.source(a)) == G.id(n) ^ (1 << G.dimension(a)),350 "Wrong arc or wrong dimension");351 }352 }353 354 checkGraphConArcList(G, (1 << dim) * dim);355 checkGraphConEdgeList(G, dim * (1 << dim-1));356 357 checkArcDirections(G);358 359 checkNodeIds(G);360 checkArcIds(G);361 checkEdgeIds(G);362 checkGraphNodeMap(G);363 checkGraphArcMap(G);364 checkGraphEdgeMap(G);365 }366 367 315 void checkGraphs() { 368 316 { // Checking ListGraph … … 374 322 checkGraphValidity<SmartGraph>(); 375 323 } 376 { // Checking FullGraph 324 { // Checking FullGraph 377 325 checkFullGraph(7); 378 326 checkFullGraph(8); … … 385 333 checkGridGraph(1, 1); 386 334 } 387 { // Checking HypercubeGraph388 checkHypercubeGraph(1);389 checkHypercubeGraph(2);390 checkHypercubeGraph(3);391 checkHypercubeGraph(4);392 }393 335 } 394 336 -
tools/lemon-0.x-to-1.x.sh
r366 r359 82 82 -e "s/\<copyGraph\>/graphCopy/g"\ 83 83 -e "s/\<copyDigraph\>/digraphCopy/g"\ 84 -e "s/\<HyperCubeDigraph\>/HypercubeGraph/g"\85 84 -e "s/\<IntegerMap\>/RangeMap/g"\ 86 85 -e "s/\<integerMap\>/rangeMap/g"\
Note: See TracChangeset
for help on using the changeset viewer.