Skip to content

Commit 327e431

Browse files
committed
Improve documentation
1 parent d173407 commit 327e431

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

src/Balance.php

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,29 @@
66
use Fhaculty\Graph\Graph;
77
use Fhaculty\Graph\Vertex;
88

9+
/**
10+
* Basic algorithms for working with the balance of flow graphs
11+
*
12+
* A flow network (also known as a transportation network) is a directed graph
13+
* where each edge has a capacity and each edge receives a flow.
14+
*
15+
* @link http://en.wikipedia.org/wiki/Flow_network
16+
* @see Algorithm\Degree if you're looking for balanced degrees instead of balanced flows
17+
*/
918
class Balance extends Base
1019
{
20+
/**
21+
* Graph to operate on
22+
*
23+
* @var Graph
24+
*/
1125
private $graph;
1226

27+
/**
28+
* instanciate new Balance algorithm
29+
*
30+
* @param Graph $graph graph to operate on
31+
*/
1332
public function __construct(Graph $graph)
1433
{
1534
$this->graph = $graph;
@@ -38,7 +57,7 @@ public function getBalance()
3857
* whether the GRAPH is balanced (see Graph::isBalanced() instead)
3958
*
4059
* @return boolean
41-
* @see Graph::isBalanced() if you merely want to check indegree=outdegree
60+
* @see Algorithm\Degree::isBalanced() if you merely want to check indegree=outdegree
4261
* @uses Vertex::getFlow()
4362
* @uses Vertex::getBalance()
4463
*/

0 commit comments

Comments
 (0)