Class EditDistanceOnRealSequence
java.lang.Object
org.palladiosimulator.edp2.distancemetrics.EditDistanceOnRealSequence
- All Implemented Interfaces:
DistanceMetric
This algorithm is based on the description of the algorithm described in chapter 3.1
in the paper "Robust and Fast Similarity Search for Moving Object
Trajectories" by Lei Chen, M. Tamer Özsu, Vincent Oria
See: http://www.cs.ucr.edu/~ravi/CS260-ST/Oszu_SIGMOD_05.pdf
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.jscience.physics.amount.Amount<?>
calculateDistance
(IDataStream<org.palladiosimulator.measurementframework.TupleMeasurement> s1, IDataStream<org.palladiosimulator.measurementframework.TupleMeasurement> s2) This method contains the distance metric algorithm.double
Gives you the initial epsilon value, when no epsilon value was set.void
setEpsilon
(double e) Sets the epsilon value, which decides, if two values are considered equal.void
setSubcost
(double subcost) Sets the subcost, the calculation should use as penalty for not equal values.
-
Constructor Details
-
EditDistanceOnRealSequence
public EditDistanceOnRealSequence()
-
-
Method Details
-
calculateDistance
public org.jscience.physics.amount.Amount<?> calculateDistance(IDataStream<org.palladiosimulator.measurementframework.TupleMeasurement> s1, IDataStream<org.palladiosimulator.measurementframework.TupleMeasurement> s2) Description copied from interface:DistanceMetric
This method contains the distance metric algorithm.- Specified by:
calculateDistance
in interfaceDistanceMetric
- Parameters:
s1
- First stream of measurement to compare.s2
- Second stream of measurement to compare.- Returns:
- Return a generic Amount which can contain any Quantity. Returns null, if calcuation couldn't be executed.
-
setEpsilon
public void setEpsilon(double e) Sets the epsilon value, which decides, if two values are considered equal.- Parameters:
e
- The new epsilon value.
-
setSubcost
public void setSubcost(double subcost) Sets the subcost, the calculation should use as penalty for not equal values.- Parameters:
subcost
- The penalty costs, if two values are not to be considered equal.
-
getInitialEpsilon
public double getInitialEpsilon()Gives you the initial epsilon value, when no epsilon value was set.- Returns:
- Returns the pre-defined initial epsilon value.
-