de.lmu.ifi.dbs.elki.application.visualization
Class KNNExplorer.ExplorerWindow

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.application.visualization.KNNExplorer.ExplorerWindow
Enclosing class:
KNNExplorer<O extends NumberVector<?,?>,D extends NumberDistance<D,?>>

 class KNNExplorer.ExplorerWindow
extends Object

Main window of KNN Explorer.


Nested Class Summary
private  class KNNExplorer.ExplorerWindow.SeriesLabelRenderer
          Renderer for the labels, with coloring as in the plot.
 
Field Summary
protected  Relation<? extends O> data
           
private  Database db
           
protected  int dim
           
protected  HashMap<DBID,Double> distancecache
           
private  DistanceQuery<O,D> distanceQuery
          Holds the instance of the distance function specified by KNNExplorer.DISTANCE_FUNCTION_ID.
protected  JFrame frame
           
protected  int k
           
private  KNNQuery<O,D> knnQuery
          Holds the associated kNN query
protected  Relation<String> labelRep
          The label representation
private static int MAXRESOLUTION
          Maximum resolution for plotted lines to improve performance for long time series.
(package private)  SVGPlot plot
           
protected  JButton quitButton
           
protected  double ratio
           
protected  LinearScale s
           
protected  JButton saveButton
           
private static String SERIESID
          SVG graph object ID (for replacing)
private  JList seriesList
           
protected  JSpinner spinner
           
protected  JSVGSynchronizedCanvas svgCanvas
           
(package private)  Element viewport
           
private static String WINDOW_TITLE_BASE
          Default Window Title
 
Constructor Summary
KNNExplorer.ExplorerWindow()
          Constructor.
 
Method Summary
(package private)  Color getColor(double dist)
          Get the appropriate color for the given distance.
private  Element plotSeries(DBID idx, int resolution)
          Plot a single time series.
 void run(Database db, DistanceQuery<O,D> distanceQuery)
          Process the given Database and distance function.
(package private)  void updateK(int k)
           
protected  void updateSelection()
          Process the users new selection.
 void updateSize()
          Update the SVG plot size.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WINDOW_TITLE_BASE

private static final String WINDOW_TITLE_BASE
Default Window Title

See Also:
Constant Field Values

MAXRESOLUTION

private static final int MAXRESOLUTION
Maximum resolution for plotted lines to improve performance for long time series.

See Also:
Constant Field Values

SERIESID

private static final String SERIESID
SVG graph object ID (for replacing)

See Also:
Constant Field Values

frame

protected JFrame frame

spinner

protected JSpinner spinner

seriesList

private JList seriesList

quitButton

protected JButton quitButton

saveButton

protected JButton saveButton

svgCanvas

protected JSVGSynchronizedCanvas svgCanvas

plot

SVGPlot plot

viewport

Element viewport

dim

protected int dim

k

protected int k

s

protected LinearScale s

data

protected Relation<? extends O extends NumberVector<?,?>> data

distancecache

protected HashMap<DBID,Double> distancecache

ratio

protected double ratio

distanceQuery

private DistanceQuery<O extends NumberVector<?,?>,D extends NumberDistance<D,?>> distanceQuery
Holds the instance of the distance function specified by KNNExplorer.DISTANCE_FUNCTION_ID.


knnQuery

private KNNQuery<O extends NumberVector<?,?>,D extends NumberDistance<D,?>> knnQuery
Holds the associated kNN query


labelRep

protected Relation<String> labelRep
The label representation


db

private Database db
Constructor Detail

KNNExplorer.ExplorerWindow

public KNNExplorer.ExplorerWindow()
Constructor.

Method Detail

updateSize

public void updateSize()
Update the SVG plot size.


run

public void run(Database db,
                DistanceQuery<O,D> distanceQuery)
Process the given Database and distance function.

Parameters:
db - Database
distanceQuery - Distance function

updateK

void updateK(int k)

updateSelection

protected void updateSelection()
Process the users new selection.


getColor

Color getColor(double dist)
Get the appropriate color for the given distance.

Parameters:
dist - Distance
Returns:
Color

plotSeries

private Element plotSeries(DBID idx,
                           int resolution)
Plot a single time series.

Parameters:
idx - Object index
resolution - Maximum number of steps to plot
Returns:
SVG element

Release 0.4.0 (2011-09-20_1324)