math
Class SupremumMetric

java.lang.Object
  extended by math.SupremumMetric
All Implemented Interfaces:
Metric

public class SupremumMetric
extends java.lang.Object
implements Metric

The supremum metric. This is sometimes also called the uniform metric and/or the infinity metric.

See Also:
"The Design and Implementation of Multimedia Software © 2011"

Constructor Summary
SupremumMetric()
           
 
Method Summary
 double distance(double[] x, double[] y)
          Calculate the distance between two n-dimensional points (required by Metric) Note: For simplicity, this method does not confirm that the two arrays are the same size.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SupremumMetric

public SupremumMetric()
Method Detail

distance

public double distance(double[] x,
                       double[] y)
Calculate the distance between two n-dimensional points (required by Metric) Note: For simplicity, this method does not confirm that the two arrays are the same size. It uses the smaller size.

Specified by:
distance in interface Metric
Parameters:
x - One n-dimensional point
y - Another n-dimensional point
Returns:
The distance


Design and Implementation of Multimedia Software, Jones and Bartlett Publishers