Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.visualization.visualizers.vis1d
Class Projection1DHistogramVisualizer<NV extends NumberVector<NV,?>>

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.logging.AbstractLoggable
      extended by de.lmu.ifi.dbs.elki.visualization.visualizers.AbstractVisualizer
          extended by de.lmu.ifi.dbs.elki.visualization.visualizers.vis1d.Projection1DVisualizer<NV>
              extended by de.lmu.ifi.dbs.elki.visualization.visualizers.vis1d.Projection1DHistogramVisualizer<NV>
Type Parameters:
NV - Type of the DatabaseObject being visualized.
All Implemented Interfaces:
Parameterizable, ProjectedVisualizer, Visualizer

public class Projection1DHistogramVisualizer<NV extends NumberVector<NV,?>>
extends Projection1DVisualizer<NV>

Generates a SVG-Element containing a histogram representing the distribution of the database's objects.

Author:
Remigius Wojdanowski

Field Summary
static String BIN
          Generic tag to indicate the type of element.
private  int bins
          Number of bins to use in the histogram.
private  boolean curves
          Internal storage of the curves flag.
private static int DEFAULT_BINS
          Number of bins to use in histogram.
static OptionID HISTOGRAM_BINS_ID
          Option ID for parameter HISTOGRAM_BINS_PARAM
private  IntParameter HISTOGRAM_BINS_PARAM
          Parameter to specify the number of bins to use in histogram.
private static String NAME
          Name for this visualizer.
private  Flag STYLE_CURVES_FLAG
          Flag to specify the "curves" rendering style.
static OptionID STYLE_CURVES_ID
          OptionID for STYLE_CURVES_FLAG.
 
Fields inherited from class de.lmu.ifi.dbs.elki.visualization.visualizers.AbstractVisualizer
context, metadata
 
Fields inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable
debug, logger
 
Fields inherited from interface de.lmu.ifi.dbs.elki.visualization.visualizers.Visualizer
LEVEL_BACKGROUND, LEVEL_FOREGROUND, LEVEL_INTERACTIVE, LEVEL_STATIC, META_LEVEL, META_NAME, META_NOTHUMB, META_VISIBLE, META_VISIBLE_DEFAULT
 
Constructor Summary
Projection1DHistogramVisualizer(Parameterization config)
          Constructor, adhering to Parameterizable
 
Method Summary
 void init(VisualizerContext context)
          Initialization.
private  void setupCSS(SVGPlot svgp, int numc)
          Generate the needed CSS classes.
 Element visualize(SVGPlot svgp, VisualizationProjection proj, double width, double height)
          Returns an Element representing a visualization.
 
Methods inherited from class de.lmu.ifi.dbs.elki.visualization.visualizers.AbstractVisualizer
addRedrawListener, fireRedrawEvent, getMetadata, init, removeRedrawListener, requestRedraw, setLevel
 
Methods inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable
debugFine, debugFiner, debugFinest, exception, progress, verbose, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.lmu.ifi.dbs.elki.visualization.visualizers.Visualizer
addRedrawListener, getMetadata, removeRedrawListener
 

Field Detail

STYLE_CURVES_ID

public static final OptionID STYLE_CURVES_ID
OptionID for STYLE_CURVES_FLAG.


STYLE_CURVES_FLAG

private final Flag STYLE_CURVES_FLAG
Flag to specify the "curves" rendering style.

Key: -histogram.curves


curves

private boolean curves
Internal storage of the curves flag.


DEFAULT_BINS

private static final int DEFAULT_BINS
Number of bins to use in histogram.

See Also:
Constant Field Values

HISTOGRAM_BINS_ID

public static final OptionID HISTOGRAM_BINS_ID
Option ID for parameter HISTOGRAM_BINS_PARAM


HISTOGRAM_BINS_PARAM

private final IntParameter HISTOGRAM_BINS_PARAM
Parameter to specify the number of bins to use in histogram.

Key: -projhistogram.bins Default: 20


bins

private int bins
Number of bins to use in the histogram.


NAME

private static final String NAME
Name for this visualizer.

See Also:
Constant Field Values

BIN

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

See Also:
Constant Field Values
Constructor Detail

Projection1DHistogramVisualizer

public Projection1DHistogramVisualizer(Parameterization config)
Constructor, adhering to Parameterizable

Parameters:
config - Parameterization
Method Detail

init

public void init(VisualizerContext context)
Initialization.

Parameters:
context - context.

setupCSS

private void setupCSS(SVGPlot svgp,
                      int numc)
Generate the needed CSS classes.

Parameters:
svgp - Plot context
numc - Number of classes we need.

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 use
width - Width of plot
height - Height of plot
Returns:
an Element representing a 2-dimensional visualization.

Release 0.3 (2010-03-31_1612)