This class provides a basic implementation of {@link org.graphstream.graph.Graph} interface, to minimize the effortrequired to implement this interface. It provides event management implementing all the methods of {@link org.graphstream.stream.Pipe}. It also manages strict checking and auto-creation policies, as well as other services as displaying, reading and writing.
Subclasses have to maintain data structures allowing to efficiently access graph elements by their id or index and iterating on them. They also have to maintain coherent indices of the graph elements. When AbstractGraph decides to add or remove elements, it calls one of the "callbacks" {@link #addNodeCallback(AbstractNode)}, {@link #addEdgeCallback(AbstractEdge)}, {@link #removeNodeCallback(AbstractNode)}, {@link #removeEdgeCallback(AbstractEdge)}, {@link #clearCallback()}. The role of these callbacks is to update the data structures and to re-index elements if necessary.
|
|