de.lmu.ifi.dbs.elki.visualization.visualizers.vis2d
Class TreeSphereVisualization<NV extends NumberVector<NV,?>,D extends NumberDistance<D,?>,N extends AbstractMTreeNode<NV,D,N,E>,E extends MTreeEntry<D>>

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.visualization.visualizers.AbstractVisualization
      extended by de.lmu.ifi.dbs.elki.visualization.visualizers.vis2d.P2DVisualization<NV>
          extended by de.lmu.ifi.dbs.elki.visualization.visualizers.vis2d.TreeSphereVisualization<NV,D,N,E>
Type Parameters:
NV - Type of the DatabaseObject being visualized.
N - Tree node type
E - Tree entry type
All Implemented Interfaces:
DataStoreListener, ResultListener, ContextChangeListener, Visualization, EventListener

public class TreeSphereVisualization<NV extends NumberVector<NV,?>,D extends NumberDistance<D,?>,N extends AbstractMTreeNode<NV,D,N,E>,E extends MTreeEntry<D>>
extends P2DVisualization<NV>
implements DataStoreListener

Visualize the bounding sphere of a metric index.


Nested Class Summary
static class TreeSphereVisualization.Factory<NV extends NumberVector<NV,?>>
          Factory
private static class TreeSphereVisualization.Modus
          Drawing modes.
 
Field Summary
protected  TreeSphereVisualization.Modus dist
          Drawing mode (distance) to use
protected  boolean fill
          Fill parameter.
static String INDEX
          Generic tag to indicate the type of element.
static String NAME
          A short name characterizing this Visualizer.
protected  double p
           
protected  AbstractMTree<NV,D,N,E> tree
          The tree we visualize
 
Fields inherited from class de.lmu.ifi.dbs.elki.visualization.visualizers.vis2d.P2DVisualization
proj, rel
 
Fields inherited from class de.lmu.ifi.dbs.elki.visualization.visualizers.AbstractVisualization
context, layer, pendingRedraw, svgp, task
 
Constructor Summary
TreeSphereVisualization(VisualizationTask task, boolean fill)
          Constructor
 
Method Summary
static boolean canVisualize(AbstractMTree<?,?,?,?> tree)
          Test for a visualizable index in the context's database.
 void contentChanged(DataStoreEvent e)
          Invoked after objects of the datastore have been updated, inserted or removed in some way.
 void destroy()
          Destroy the visualization.
static Double getLPNormP(AbstractMTree<?,?,?,?> tree)
          Get the "p" value of an Lp norm.
protected  void redraw()
          Perform a full redraw.
private  void visualizeMTreeEntry(SVGPlot svgp, Element layer, Projection2D proj, AbstractMTree<NV,D,N,E> mtree, E entry, int depth)
          Recursively draw the MBR rectangles.
 
Methods inherited from class de.lmu.ifi.dbs.elki.visualization.visualizers.vis2d.P2DVisualization
setupCanvas
 
Methods inherited from class de.lmu.ifi.dbs.elki.visualization.visualizers.AbstractVisualization
contextChanged, getHeight, getLayer, getWidth, incrementalRedraw, resultAdded, resultChanged, resultRemoved, synchronizedRedraw, testRedraw
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INDEX

public static final String INDEX
Generic tag to indicate the type of element. Used in IDs, CSS-Classes etc.

See Also:
Constant Field Values

NAME

public static final String NAME
A short name characterizing this Visualizer.

See Also:
Constant Field Values

p

protected double p

dist

protected TreeSphereVisualization.Modus dist
Drawing mode (distance) to use


tree

protected AbstractMTree<NV extends NumberVector<NV,?>,D extends NumberDistance<D,?>,N extends AbstractMTreeNode<NV,D,N,E>,E extends MTreeEntry<D>> tree
The tree we visualize


fill

protected boolean fill
Fill parameter.

Constructor Detail

TreeSphereVisualization

public TreeSphereVisualization(VisualizationTask task,
                               boolean fill)
Constructor

Parameters:
task - Task
fill - fill flag
Method Detail

getLPNormP

public static Double getLPNormP(AbstractMTree<?,?,?,?> tree)
Get the "p" value of an Lp norm.

Parameters:
tree - Tree to visualize
Returns:
p value

canVisualize

public static boolean canVisualize(AbstractMTree<?,?,?,?> tree)
Test for a visualizable index in the context's database.

Parameters:
tree - Tree to visualize
Returns:
whether the tree is visualizable

redraw

protected void redraw()
Description copied from class: AbstractVisualization
Perform a full redraw.

Specified by:
redraw in class AbstractVisualization

visualizeMTreeEntry

private void visualizeMTreeEntry(SVGPlot svgp,
                                 Element layer,
                                 Projection2D proj,
                                 AbstractMTree<NV,D,N,E> mtree,
                                 E entry,
                                 int depth)
Recursively draw the MBR rectangles.

Parameters:
svgp - SVG Plot
layer - Layer
proj - Projection
mtree - Mtree to visualize
entry - Current entry
depth - Current depth

destroy

public void destroy()
Description copied from interface: Visualization
Destroy the visualization. Called after the elements have been removed from the document. Implementations should remove their listeners etc.

Specified by:
destroy in interface Visualization
Overrides:
destroy in class AbstractVisualization

contentChanged

public void contentChanged(DataStoreEvent e)
Description copied from interface: DataStoreListener
Invoked after objects of the datastore have been updated, inserted or removed in some way.

Specified by:
contentChanged in interface DataStoreListener
Parameters:
e - the update event

Release 0.4.0 (2011-09-20_1324)