org.grinvin
Class DefaultEmbeddingModel
- Embedding, EmbeddingModel, EmbeddingView, MutableEmbeddingModel
public class DefaultEmbeddingModel
Implementation of
Embedding
that at the same time functions as a model
in a model-view-controller triple. An
EmbeddingListener
may
register itself with this model to be informed about various changes:
- Vertex coordinate changes.
- Dimension changes of the embedding.
Note that changes to the peer of this embedding (vertices being added or removed)
should be listened to by a separate
EmbeddingListener
registered with the peer.
DefaultEmbeddingModel
public DefaultEmbeddingModel(GraphView peer,
int dimension)
Create an embedding of the given dimension for the given peer graph.
void setCoordinates
public @Override void setCoordinates(Vertex vertex,
double[] coordinates)
void setDimension
public @Override void setDimension(int dimension)