Class EuclideanDistance

java.lang.Object
org.palladiosimulator.edp2.distancemetrics.EuclideanDistance
All Implemented Interfaces:
DistanceMetric

public class EuclideanDistance extends Object implements DistanceMetric
This algorithm calculates the distance with the Euclidean Distance and interpolates the values if the time values of the two current measurement points doesn't match.
  • Constructor Details

    • EuclideanDistance

      public EuclideanDistance()
  • 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 interface DistanceMetric
      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.