|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.algo.ParallelEdges
public class ParallelEdges
This class provides methods for finding the parallel edges in a graph, also called multiple edges or multi-edges.
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.
Method Summary | |
---|---|
static EdgeList[] |
findParallelEdges(Graph graph,
boolean directed)
Finds and returns all parallel edges in the given graph. |
static EdgeList[] |
findParallelEdges(Graph graph,
boolean directed,
Node node)
Finds and returns the parallel edges in the given graph, or, optionally, incident to the given node. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static EdgeList[] findParallelEdges(Graph graph, boolean directed)
Parallel edges are edges which are incident to the same two nodes. In the directed case, it is required that two parallel edges have the same source and target node.
graph
- the input graphdirected
- 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
public static EdgeList[] findParallelEdges(Graph graph, boolean directed, Node node)
Parallel edges are edges which are incident to the same two nodes. In the directed case, it is required that two parallel edges have the same source and target node.
graph
- the input graphdirected
- 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 nodesnode
- the node to which the parallel edges must be incident to or null
if all parallel
edges in the graph should be returned
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |