This class provides methods for finding the parallel edges in a graph, also called multiple edges or multi-edges.
Remarks
Parallel edges are edges which are incident to the same two nodes. In the undirected case, the direction does not matter. In the directed case, two parallel edges require to both have the same source and target node.
The graph example below shows several sets of parallel edges. There are four parallel edges connecting the left and the middle node. There are two parallel edges connecting the middle and the right node, however, they are only parallel in the undirected case. Finally, there are two parallel self-loops at the right node.
Type Details
- yfiles module
- algorithms
- yfiles-umd modules
- All layout modules, view-layout-bridge
- Legacy UMD name
- yfiles.algorithms.ParallelEdges
Static Methods
Finds and returns the parallel edges in the given graph, or, optionally, incident to the given node.
Remarks
Parameters
A map of options to pass to the method.
- graph - Graph
- the input graph
- directed - boolean
true
, if parallel edges need to have same source and same target,false
, if it suffices that parallel edges are incident to the same two nodes- node - YNode
- the node to which the parallel edges must be incident to or
null
if all parallel edges in the graph should be returned
Returns
- ↪EdgeList[]
- the array of all parallel edges incident to the given node or contained in the given graph, where each list represents a set of parallel edges