org.grinvin.graphs
Interface GraphBundle
- GraphBundleView
- DefaultGraphBundle, GraphBundleWithModels, LightweightGraphBundle
public interface GraphBundle
A mutable version of
GraphBundleView
. Provides methods to store
or change information contained in a bundle.
adjacencyList , booleanAdjacencyMatrix , distanceMatrix , eccentricityList , getAnnotation , getAnnotation , getAnnotationCount , getCachedInvariantValue , getDescription , getEmbedding , getEmbedding , getEmbeddingCount , getGraph , getGraphIconFactory , getInvariantValue , getInvariantValues , getInvariants , getName , getProperties |
addInvariantValue
public void addInvariantValue(InvariantValue value)
Add the given InvariantValue as a cached value to this bundle
value
- The InvariantValue to be added to this bundle.
createAnnotation
public Annotation createAnnotation()
Factory method which creates a new (empty) annotation and installs it as
the next annotation in this bundle, i.e., the annotation with the next
available index.
This annotation should have the graph returned by
getGraph()
as a peer. Subsequent calls to
GraphBundle
with the appropriate
index, should return the annotation created by this method.
- the annotation created or null when the graph bundle does not support annotations.
createEmbedding
public Embedding createEmbedding()
Factory method which creates a new (empty) embedding
and installs it as the next embedding in this bundle, i.e., the embedding
with the next available index.
This embedding should have the graph returned by
getGraph()
as a peer. Subsequent calls to
GraphBundle
with the appropriate
index, should return the embedding created by this method.
- the embedding created or null when the graph bundle does not support embeddings.
createGraph
public Graph createGraph()
Factory method which creates a new (empty) graph for this bundle.
Subsequent calls to
getGraph()
should return this graph.
invalidate
public void invalidate()
Clear all cached values for this bundle (i.e. cached InvariantValues
and other cached values such as eigenvalues, adjacency lists,...).
invalidate
public void invalidate(InvariantValue value)
Remove the given InvariantValue from the cache of this bundle.
value
- The InvariantValue to be removed from this bundle.
setGraphIconFactory
public void setGraphIconFactory(GraphIconFactory graphIconFactory)
Set the graph icon factory used for displaying this graph as
an icon.