de.lmu.ifi.dbs.elki.visualization.visualizers.vis2d
Class TreeMBRVisualizer<NV extends NumberVector<NV,?>,N extends AbstractRStarTreeNode<N,E>,E extends SpatialEntry>
java.lang.Object
de.lmu.ifi.dbs.elki.logging.AbstractLoggable
de.lmu.ifi.dbs.elki.visualization.visualizers.AbstractVisualizer
de.lmu.ifi.dbs.elki.visualization.visualizers.vis2d.Projection2DVisualizer<NV>
de.lmu.ifi.dbs.elki.visualization.visualizers.vis2d.TreeMBRVisualizer<NV,N,E>
- Type Parameters:
NV
- Type of the DatabaseObject being visualized.N
- Tree node typeE
- Tree entry type
- All Implemented Interfaces:
- Parameterizable, ProjectedVisualizer, Visualizer
public class TreeMBRVisualizer<NV extends NumberVector<NV,?>,N extends AbstractRStarTreeNode<N,E>,E extends SpatialEntry>
- extends Projection2DVisualizer<NV>
Visualize the bounding rectangles of an rtree based index.
- Author:
- Erich Schubert
Field Summary |
static String |
INDEX
Generic tag to indicate the type of element. |
static String |
NAME
A short name characterizing this Visualizer. |
Constructor Summary |
TreeMBRVisualizer()
The default constructor only registers parameters. |
Method Summary |
boolean |
canVisualize(VisualizerContext context)
Test for a visualizable index in the context's database. |
private AbstractRStarTree<NV,N,E> |
findRStarTree(VisualizerContext context)
|
void |
init(VisualizerContext context)
Initializes this Visualizer. |
private void |
recDrawEdges(SVGPath path,
DoubleDoublePair r_min,
ArrayList<DoubleDoublePair> r_edges,
int off,
BitSet b)
|
Element |
visualize(SVGPlot svgp,
VisualizationProjection proj,
double width,
double height)
Returns an Element representing a visualization. |
private void |
visualizeRTreeEntry(SVGPlot svgp,
Element layer,
VisualizationProjection proj,
AbstractRStarTree<NV,? extends N,E> rtree,
E entry,
int depth)
Recursively draw the MBR rectangles. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
TreeMBRVisualizer
public TreeMBRVisualizer()
- The default constructor only registers parameters.
init
public void init(VisualizerContext context)
- Initializes this Visualizer.
- Parameters:
context
- Visualization context
findRStarTree
private AbstractRStarTree<NV,N,E> findRStarTree(VisualizerContext context)
visualize
public Element visualize(SVGPlot svgp,
VisualizationProjection proj,
double width,
double height)
- Description copied from interface:
ProjectedVisualizer
- Returns an Element representing a visualization.
- Parameters:
svgp
- plot to contain the returned Element.proj
- projection to usewidth
- Width of plotheight
- Height of plot
- Returns:
- an Element representing a 2-dimensional visualization.
visualizeRTreeEntry
private void visualizeRTreeEntry(SVGPlot svgp,
Element layer,
VisualizationProjection proj,
AbstractRStarTree<NV,? extends N,E> rtree,
E entry,
int depth)
- Recursively draw the MBR rectangles.
- Parameters:
svgp
- SVG Plotlayer
- Layerproj
- Projectionrtree
- Rtree to visualizeentry
- Current entrydepth
- Current depth
recDrawEdges
private void recDrawEdges(SVGPath path,
DoubleDoublePair r_min,
ArrayList<DoubleDoublePair> r_edges,
int off,
BitSet b)
canVisualize
public boolean canVisualize(VisualizerContext context)
- Test for a visualizable index in the context's database.
- Parameters:
context
- Visualization context
- Returns:
- whether there is a visualizable index