class KNNExplorer.ExplorerWindow extends Object
Modifier and Type | Class and Description |
---|---|
private class |
KNNExplorer.ExplorerWindow.SeriesLabelRenderer
Renderer for the labels, with coloring as in the plot.
|
Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
KNNExplorer.ExplorerWindow()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
(package private) Color |
getColor(double dist)
Get the appropriate color for the given distance.
|
private Element |
plotSeries(DBIDRef 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.
|
private static final String WINDOW_TITLE_BASE
private static final int MAXRESOLUTION
private static final String SERIESID
protected JFrame frame
protected JSpinner spinner
private JList seriesList
protected JButton quitButton
protected JButton saveButton
protected JSVGSynchronizedCanvas svgCanvas
SVGPlot plot
Element viewport
protected int dim
protected int k
protected LinearScale s
protected Relation<? extends O extends NumberVector<?>> data
protected double ratio
private DistanceQuery<O extends NumberVector<?>,D extends NumberDistance<D,?>> distanceQuery
KNNExplorer.DISTANCE_FUNCTION_ID
.private KNNQuery<O extends NumberVector<?>,D extends NumberDistance<D,?>> knnQuery
private Database db
public void updateSize()
public void run(Database db, DistanceQuery<O,D> distanceQuery)
db
- DatabasedistanceQuery
- Distance functionvoid updateK(int k)
protected void updateSelection()
Color getColor(double dist)
dist
- Distance