org.graphstream.ui.graphicGraph
Class GraphicEdge.EdgeGroup

java.lang.Object
  extended by 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
 ArrayList<GraphicEdge> edges
          The set of multiple edges.
 
Constructor Summary
GraphicEdge.EdgeGroup(GraphicEdge first, GraphicEdge second)
          Create a new edge group, starting with two edges.
 
Method Summary
 void decrement(GraphicEdge edge)
          Remove an edge from the group.
 int getCount()
          Number of edges in this group.
 GraphicEdge getEdge(int i)
          I-th edge of the group.
 void increment(GraphicEdge edge)
          Add an edge in the group.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

edges

public ArrayList<GraphicEdge> edges
The set of multiple edges.

Constructor Detail

GraphicEdge.EdgeGroup

public GraphicEdge.EdgeGroup(GraphicEdge first,
                             GraphicEdge second)
Create a new edge group, starting with two edges.

Parameters:
first - The initial edge.
second - The second edge.
Method Detail

getEdge

public GraphicEdge getEdge(int i)
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

public void increment(GraphicEdge edge)
Add an edge in the group.

Parameters:
edge - The edge to add.

decrement

public void decrement(GraphicEdge edge)
Remove an edge from the group.

Parameters:
edge - The edge to remove.


Copyright © 2013. All Rights Reserved.