Class EuclideanDistance<DATA>
- java.lang.Object
-
- org.apache.flink.streaming.api.functions.windowing.delta.ExtractionAwareDeltaFunction<DATA,double[]>
-
- org.apache.flink.streaming.api.functions.windowing.delta.EuclideanDistance<DATA>
-
- Type Parameters:
DATA- The input data type. This delta function works with a double[], but can extract/convert to it from any other given object in case the respective extractor has been set. SeeExtractionAwareDeltaFunctionfor more information.
- All Implemented Interfaces:
Serializable,DeltaFunction<DATA>
@PublicEvolving public class EuclideanDistance<DATA> extends ExtractionAwareDeltaFunction<DATA,double[]>
This delta function calculates the euclidean distance between two given points.Euclidean distance: http://en.wikipedia.org/wiki/Euclidean_distance
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description EuclideanDistance()EuclideanDistance(Extractor<DATA,double[]> converter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doublegetNestedDelta(double[] oldDataPoint, double[] newDataPoint)This method is exactly the same asDeltaFunction.getDelta(Object, Object)except that it gets the result of the previously done extractions as input.-
Methods inherited from class org.apache.flink.streaming.api.functions.windowing.delta.ExtractionAwareDeltaFunction
getDelta
-
-
-
-
Method Detail
-
getNestedDelta
public double getNestedDelta(double[] oldDataPoint, double[] newDataPoint)Description copied from class:ExtractionAwareDeltaFunctionThis method is exactly the same asDeltaFunction.getDelta(Object, Object)except that it gets the result of the previously done extractions as input. Therefore, this method only does the actual calculation of the delta but no data extraction or conversion.- Specified by:
getNestedDeltain classExtractionAwareDeltaFunction<DATA,double[]>- Parameters:
oldDataPoint- the older data point.newDataPoint- the new data point.- Returns:
- the delta between the two points.
-
-