Package elki.visualization
Class VisualizerParameterizer
- java.lang.Object
-
- elki.visualization.VisualizerParameterizer
-
public class VisualizerParameterizer extends java.lang.Object
Utility class to determine the visualizers for a result class. You really should use the parameterization API to configure this class. Manually populating the factory collection is cumbersome, and the parameterization API takes care of this.- Since:
- 0.3
- Author:
- Erich Schubert, Remigius Wojdanowski
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VisualizerParameterizer.Par
Parameterization class.
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_SAMPLE_SIZE
Default sample size to visualize.private java.util.Collection<VisualizationProcessor>
factories
Projections and visualization factories.private static Logging
LOG
Get a logger for this class.private RandomFactory
rnd
Random seed for sampling.private int
samplesize
Sample sizeprivate java.util.regex.Pattern
showVisualizers
Pattern to show additional visualizersprivate StyleLibrary
stylelib
Style library to use.
-
Constructor Summary
Constructors Constructor Description VisualizerParameterizer(int samplesize, StyleLibrary stylelib, java.util.Collection<VisualizationProcessor> factories, java.util.regex.Pattern showVisualizers)
Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.lang.String
getTitle(Database db, java.lang.Object result)
Try to automatically generate a title for this.VisualizerContext
newContext(java.lang.Object start)
Make a new visualization contextprotected static java.lang.String
shortenClassname(java.lang.String nam, char c)
Shorten the class name.
-
-
-
Field Detail
-
LOG
private static final Logging LOG
Get a logger for this class.
-
DEFAULT_SAMPLE_SIZE
public static final int DEFAULT_SAMPLE_SIZE
Default sample size to visualize.- See Also:
- Constant Field Values
-
stylelib
private StyleLibrary stylelib
Style library to use.
-
factories
private java.util.Collection<VisualizationProcessor> factories
Projections and visualization factories.
-
showVisualizers
private java.util.regex.Pattern showVisualizers
Pattern to show additional visualizers
-
samplesize
private int samplesize
Sample size
-
rnd
private RandomFactory rnd
Random seed for sampling. FIXME: make parameterizable.
-
-
Constructor Detail
-
VisualizerParameterizer
public VisualizerParameterizer(int samplesize, StyleLibrary stylelib, java.util.Collection<VisualizationProcessor> factories, java.util.regex.Pattern showVisualizers)
Constructor.- Parameters:
samplesize
-stylelib
- Style libraryfactories
- Factories to useshowVisualizers
- Visualizers to force visible (may be null)
-
-
Method Detail
-
newContext
public VisualizerContext newContext(java.lang.Object start)
Make a new visualization context- Parameters:
start
- Starting result- Returns:
- New context
-
getTitle
public static java.lang.String getTitle(Database db, java.lang.Object result)
Try to automatically generate a title for this.- Parameters:
db
- Databaseresult
- Result object- Returns:
- generated title
-
shortenClassname
protected static java.lang.String shortenClassname(java.lang.String nam, char c)
Shorten the class name.- Parameters:
nam
- Class namec
- Splitting character- Returns:
- Shortened name
-
-