Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## applications
Class ClosestPoints

    java.lang.Object
      |
      +--applications.ClosestPoints

public class ClosestPoints
extends java.lang.Object

Inner Class Summary
`static class` | `ClosestPoints.Point` point in 2D
`static class` | `ClosestPoints.Point1` point with id, implements Comparable using x-coordinates
`static class` | `ClosestPoints.Point2` point with an integer field, implements Comparable using y-coordinates
`static class` | `ClosestPoints.PointPair` pairs of points and their distance

Constructor Summary
`ClosestPoints()`

Method Summary
`static ClosestPoints.PointPair` | `closestPair(ClosestPoints.Point1[] x)`
`static double` | `dist(ClosestPoints.Point u, ClosestPoints.Point v)`
`static void` | `main(java.lang.String[] args)` test program

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ClosestPoints

    public ClosestPoints()

Method Detail

### dist

    public static double dist(ClosestPoints.Point u,
                              ClosestPoints.Point v)

  Returns:
    distance between points u and v

### closestPair

    public static ClosestPoints.PointPair closestPair(ClosestPoints.Point1[] x)

  Returns:
    closest pair of points in array x

### main

    public static void main(java.lang.String[] args)

  test program

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD