Skip to content

Commit 6809d9c

Browse files
committed
Fix testing digons and triangles due to moving algorithm
1 parent df66d2c commit 6809d9c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Property/WalkProperty.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public function isDigon()
100100
// no duplicate edges
101101
!$this->hasArrayDuplicates($this->walk->getEdgesSequence()) &&
102102
// exactly two distinct vertices
103-
$this->walk->getNumberOfVertices() === 2 &&
103+
count($this->walk->getVertices()) === 2 &&
104104
// this is actually a cycle
105105
$this->isCycle());
106106
}
@@ -116,7 +116,7 @@ public function isTriangle()
116116
// exactly 3 (implicitly distinct) edges
117117
return ($this->walk->getNumberOfEdges() === 3 &&
118118
// exactly three distinct vertices
119-
$this->walk->getNumberOfVertices() === 3 &&
119+
count($this->walk->getVertices()) === 3 &&
120120
// this is actually a cycle
121121
$this->isCycle());
122122
}

0 commit comments

Comments
 (0)