Package org.graphstream.ui.graphicGraph
Class GraphicEdge.EdgeGroup
java.lang.Object
org.graphstream.ui.graphicGraph.GraphicEdge.EdgeGroup
- Enclosing class:
- GraphicEdge
public class GraphicEdge.EdgeGroup extends Object
An edge group contains the set of edges between two given nodes. This allows
to quickly know how many 'multi' edges there is between two nodes in a
multigraph and to associate invariant indices to edges (the
GraphicEdge.multi attribute) inside the multi-representation.-
Field Summary
Fields Modifier and Type Field Description ArrayList<GraphicEdge>edgesThe set of multiple edges. -
Constructor Summary
Constructors Constructor Description EdgeGroup(GraphicEdge first, GraphicEdge second)Create a new edge group, starting with two edges. -
Method Summary
Modifier and Type Method Description voiddecrement(GraphicEdge edge)Remove an edge from the group.intgetCount()Number of edges in this group.GraphicEdgegetEdge(int i)I-th edge of the group.voidincrement(GraphicEdge edge)Add an edge in the group.
-
Field Details
-
edges
The set of multiple edges.
-
-
Constructor Details
-
EdgeGroup
Create a new edge group, starting with two edges.- Parameters:
first- The initial edge.second- The second edge.
-
-
Method Details
-
getEdge
I-th edge of the group.- Parameters:
i- The edge index.- Returns:
- The i-th edge.
-
getCount
public int getCount()Number of edges in this group.- Returns:
- The edge count.
-
increment
Add an edge in the group.- Parameters:
edge- The edge to add.
-
decrement
Remove an edge from the group.- Parameters:
edge- The edge to remove.
-