File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 5
5
use Fhaculty \Graph \Algorithm \BaseGraph ;
6
6
use Fhaculty \Graph \Edge \Base as Edge ;
7
7
use Fhaculty \Graph \Edge \Directed as DirectedEdge ;
8
+ use Fhaculty \Graph \Set \Edges ;
8
9
use Fhaculty \Graph \Graph ;
9
10
use LogicException ;
10
11
@@ -49,9 +50,10 @@ public function hasEdgeParallelEdge(Edge $edge)
49
50
}
50
51
51
52
/**
52
- * get all edges parallel to this edge (excluding self)
53
+ * get set of all Edges parallel to this edge (excluding self)
53
54
*
54
- * @return Edge[]
55
+ * @param Edge $edge
56
+ * @return Edges
55
57
* @throws LogicException
56
58
*/
57
59
public function getEdgesParallelEdge (Edge $ edge )
@@ -63,7 +65,7 @@ public function getEdgesParallelEdge(Edge $edge)
63
65
// edge points into both directions (undirected/bidirectional edge)
64
66
// also get all edges in other direction
65
67
$ ends = $ edge ->getVertices ();
66
- $ edges = $ ends[ 0 ]-> getEdges ()->getEdgesIntersection ($ ends[ 1 ] ->getEdges ())->getVector ();
68
+ $ edges = $ ends-> getVertexFirst ()-> getEdges ()->getEdgesIntersection ($ ends-> getVertexLast () ->getEdges ())->getVector ();
67
69
}
68
70
69
71
$ pos = array_search ($ edge , $ edges , true );
You can’t perform that action at this time.
0 commit comments