Class Decimation
- java.lang.Object
-
- org.pepstock.charba.client.configuration.Decimation
-
public class Decimation extends Object
The configuration forDefaultPluginId.DECIMATIONplugin.- Author:
- Andrea "Stock" Stocchero
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DecimationAlgorithmgetAlgorithm()Returns the algorithm used by the plugin.IsChartgetChart()Returns the chart instanceprotected ExtendedOptionsgetConfiguration()Returns the configuration element.protected ConfigurationOptionsgetOptions()Returns the configuration options.doublegetSamples()If theDecimationAlgorithm.LTTBalgorithm is used, this is the number of samples in the output data set.
Defaults to the canvas width to pick 1 sample per pixel.doublegetThreshold()If the number of samples in the current axis range is above this value, the decimation will be triggered.
Defaults to 4 times the canvas width.
The number of point after decimation can be higher than the threshold value.booleanisEnabled()Returnstrueif decimation are enabled.voidsetAlgorithm(DecimationAlgorithm algorithm)Sets the algorithm used by the plugin.voidsetEnabled(boolean enabled)Setstrueif decimation are enabled.voidsetSamples(double samples)If theDecimationAlgorithm.LTTBalgorithm is used, this is the number of samples in the output data set.
Defaults to the canvas width to pick 1 sample per pixel.voidsetThreshold(double threshold)If the number of samples in the current axis range is above this value, the decimation will be triggered.
Defaults to 4 times the canvas width.
The number of point after decimation can be higher than the threshold value.
-
-
-
Method Detail
-
setEnabled
public void setEnabled(boolean enabled)
Setstrueif decimation are enabled.- Parameters:
enabled-trueif decimation are enabled.
-
isEnabled
public boolean isEnabled()
Returnstrueif decimation are enabled.- Returns:
trueif decimation are enabled.
-
setAlgorithm
public void setAlgorithm(DecimationAlgorithm algorithm)
Sets the algorithm used by the plugin.- Parameters:
algorithm- the algorithm used by the plugin
-
getAlgorithm
public DecimationAlgorithm getAlgorithm()
Returns the algorithm used by the plugin.- Returns:
- the algorithm used by the plugin
-
setSamples
public void setSamples(double samples)
If theDecimationAlgorithm.LTTBalgorithm is used, this is the number of samples in the output data set.
Defaults to the canvas width to pick 1 sample per pixel.- Parameters:
samples- the number of samples in the output data set
-
getSamples
public double getSamples()
If theDecimationAlgorithm.LTTBalgorithm is used, this is the number of samples in the output data set.
Defaults to the canvas width to pick 1 sample per pixel.- Returns:
- the number of samples in the output data set
-
setThreshold
public void setThreshold(double threshold)
If the number of samples in the current axis range is above this value, the decimation will be triggered.
Defaults to 4 times the canvas width.
The number of point after decimation can be higher than the threshold value.- Parameters:
threshold- the number of samples in the current axis range is above this value, the decimation will be triggered
-
getThreshold
public double getThreshold()
If the number of samples in the current axis range is above this value, the decimation will be triggered.
Defaults to 4 times the canvas width.
The number of point after decimation can be higher than the threshold value.- Returns:
- the number of samples in the current axis range is above this value, the decimation will be triggered
-
getOptions
protected final ConfigurationOptions getOptions()
Returns the configuration options.- Returns:
- the configuration options.
-
getConfiguration
protected final ExtendedOptions getConfiguration()
Returns the configuration element.- Returns:
- the configuration element.
-
getChart
public final IsChart getChart()
Returns the chart instance- Returns:
- the chart
-
-