예제 #1
0
 /**
  *
  * @param Graph $graph
  * @depends testGraphSimple
  */
 public function testGraphWithUnweightedEdges(Graph $graph)
 {
     // additional flow edge: 2 -> 3
     $graph->getVertex(2)->createEdgeTo($graph->createVertex(3))->setFlow(10);
     $alg = new AlgorithmFlow($graph);
     $this->assertTrue($alg->hasFlow());
     $this->assertEquals(10, $alg->getFlowVertex($graph->getVertex(2)));
     $this->assertEquals(-10, $alg->getFlowVertex($graph->getVertex(3)));
 }