File tree Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change 6
6
use Fhaculty \Graph \Graph ;
7
7
use Fhaculty \Graph \Vertex ;
8
8
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
+ */
9
18
class Balance extends Base
10
19
{
20
+ /**
21
+ * Graph to operate on
22
+ *
23
+ * @var Graph
24
+ */
11
25
private $ graph ;
12
26
27
+ /**
28
+ * instanciate new Balance algorithm
29
+ *
30
+ * @param Graph $graph graph to operate on
31
+ */
13
32
public function __construct (Graph $ graph )
14
33
{
15
34
$ this ->graph = $ graph ;
@@ -38,7 +57,7 @@ public function getBalance()
38
57
* whether the GRAPH is balanced (see Graph::isBalanced() instead)
39
58
*
40
59
* @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
42
61
* @uses Vertex::getFlow()
43
62
* @uses Vertex::getBalance()
44
63
*/
You can’t perform that action at this time.
0 commit comments