org.grinvin.gred

Class TransformedEmbedding

Implemented Interfaces:
EmbeddingModel, EmbeddingView

public class TransformedEmbedding
extends java.lang.Object
implements EmbeddingModel

Applies a Transformation to an existing embedding.

Constructor Summary

TransformedEmbedding(EmbeddingView delegate, Transformation trans)
Create an embedding of this type.

Method Summary

void
addEmbeddingListener(EmbeddingListener l)
Register a embedding listener with this model.
void
close()
Decouple listener from delegate.
double[]
getCoordinates(Vertex v)
Return the coordinates of the given vertex.
int
getDimension()
Returns the dimension of the Euclidian space into which this graph is embedded.
GraphView
getPeer()
Returns the peer graph for this embedding.
void
removeEmbeddingListener(EmbeddingListener l)
Unregister a previously registered embedding listener.

Constructor Details

TransformedEmbedding

public TransformedEmbedding(EmbeddingView delegate,
                            Transformation trans)
Create an embedding of this type.

Method Details

addEmbeddingListener

public void addEmbeddingListener(EmbeddingListener l)
Register a embedding listener with this model.
Specified by:
addEmbeddingListener in interface EmbeddingModel

close

public void close()
Decouple listener from delegate. Should be called before this embedding is removed so it can be garbage collected.

getCoordinates

public double[] getCoordinates(Vertex v)
Return the coordinates of the given vertex.
Specified by:
getCoordinates in interface EmbeddingView

getDimension

public int getDimension()
Returns the dimension of the Euclidian space into which this graph is embedded.
Specified by:
getDimension in interface EmbeddingView

getPeer

public GraphView getPeer()
Returns the peer graph for this embedding.
Specified by:
getPeer in interface EmbeddingView

removeEmbeddingListener

public void removeEmbeddingListener(EmbeddingListener l)
Unregister a previously registered embedding listener.
Specified by:
removeEmbeddingListener in interface EmbeddingModel