@@ -33,6 +33,9 @@ public function __construct(Walk $walk)
33
33
/**
34
34
* checks whether walk is a cycle (i.e. source vertex = target vertex)
35
35
*
36
+ * A cycle is also known as a closed path, a walk that is NOT a cycle is
37
+ * alsos known as an open path.
38
+ *
36
39
* A walk with no edges is not considered a cycle. The shortest possible
37
40
* cycle is a single loop edge.
38
41
*
@@ -48,8 +51,11 @@ public function isCycle()
48
51
/**
49
52
* checks whether walk is a path (i.e. does not contain any duplicate edges)
50
53
*
54
+ * A path Walk is also known as a trail.
55
+ *
51
56
* @return bool
52
57
* @uses self::hasArrayDuplicates()
58
+ * @link http://www.proofwiki.org/wiki/Definition:Trail
53
59
*/
54
60
public function isPath ()
55
61
{
@@ -140,6 +146,8 @@ public function isTriangle()
140
146
* contains no duplicate/repeated vertices (and thus no duplicate edges either)
141
147
* other than the starting and ending vertices of cycles.
142
148
*
149
+ * A simple Walk is also known as a chain.
150
+ *
143
151
* @return boolean
144
152
* @uses self::isCycle()
145
153
* @uses self::hasArrayDuplicates()
@@ -158,6 +166,8 @@ public function isSimple()
158
166
/**
159
167
* checks whether walk is hamiltonian (i.e. walk over ALL VERTICES of the graph)
160
168
*
169
+ * A hamiltonian Walk is also known as a spanning walk.
170
+ *
161
171
* @return boolean
162
172
* @see self::isEulerian() if you want to check for all EDGES instead of VERTICES
163
173
* @uses self::isArrayContentsEqual()
0 commit comments