public interface IAccumulationStrategy extends Serializable
AccumulationStrategyAmountOfPoints
).
If a trace is sorted then accumulation may be done based on value regions.
Consider you have sorted ascending x values that have a high density of
tracepoints in certain regions but a very low density in other regions. If
you would accumulated just n consecutive points you would thin out the
regions with very little data points (low density) to become even less
precision in those large regions while the regions with high density only
loose little information. If you decide to split up the visible range in to
parts with same value-span then you can just accumulate depending on the
density of x values. You will not loose data in value-ranges with low density
but are able to drop lots of unnecessary values in high-density areas (see
AccumulationStrategyXRangeWithRespectToDensity
).
PropertyChangeEvent
may be
fired to PropertyChangeListener
instances that register
themselves with
addPropertyChangeListener(String, PropertyChangeListener)
.
|
|
|
|
When fired |
---|---|---|---|---|
|
that changed |
, the old value |
, the new value |
was called. |
|
that changed |
, the old value |
, the new value |
was called on the current accumulation strategy. |
Modifier and Type | Interface and Description |
---|---|
static class |
IAccumulationStrategy.AccumulationControlConsecutivePoints
Just accumulates n consecutive points.
|
static interface |
IAccumulationStrategy.IAccumulationControl
Interface for encapsulation of the control of "how many" points get
accumulated to one.
|
Modifier and Type | Method and Description |
---|---|
void |
addPropertyChangeListener(String propertyName,
PropertyChangeListener listener)
Registers a property change listener that will be informed about changes of
the property identified by the given
propertyName . |
IAccumulationFunction |
getAccumulationFunction()
Returns the accumulationFunction.
|
Iterator<ITracePoint2D> |
iterator(ITrace2D source,
int amountOfDesiredPoints)
Template method to return an iterator over accumulated points.
|
void |
removePropertyChangeListener(PropertyChangeListener listener)
Unregisters a property change listener that has been registered for
listening on all properties.
|
void |
removePropertyChangeListener(String property,
PropertyChangeListener listener)
Removes a property change listener for listening on the given property.
|
IAccumulationFunction |
setAccumulationFunction(IAccumulationFunction accumulationFunction)
Sets the accumulationFunction to use for this strategy.
|
void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)
propertyName
.
propertyName
- the name of the property the listener is interested inlistener
- a listener that will only be informed if the property identified
by the argument propertyName
changesIAccumulationFunction getAccumulationFunction()
Iterator<ITracePoint2D> iterator(ITrace2D source, int amountOfDesiredPoints)
source
- the real points of this trace.amountOfDesiredPoints
- would allow to filter out points to accumulate by just taking n
consecutive trace points.void removePropertyChangeListener(PropertyChangeListener listener)
listener
- a listener that will only be informed if the property identified
by the argument propertyName
changesvoid removePropertyChangeListener(String property, PropertyChangeListener listener)
property
- one of the constants with the PROPERTY_
prefix
defined in this class or subclasses.listener
- the listener for this property change.IAccumulationFunction setAccumulationFunction(IAccumulationFunction accumulationFunction)
accumulationFunction
- the accumulationFunction to set.Copyright © 2019. All rights reserved.