Class Point


  • public class Point
    extends Object
    Represent a n-dimensional point.
    • Constructor Detail

      • Point

        public Point​(double... coordinates)
        Create a point with given coordinates.
        Parameters:
        coordinates - the coordinates of the point
      • Point

        public Point​(Vector coordinates)
        Create a point with given coordinates.
        Parameters:
        coordinates - the coordinates of the point
    • Method Detail

      • getCoordinates

        public ImmutableVector getCoordinates()
        Get the coordinates of the point.
        Returns:
        the coordinates
      • dimension

        public int dimension()
        Get the dimension of the coordinate space.
        Returns:
        the dimension of the coordinate space
      • distance

        public double distance​(Point pt)
        Compute the Euclidean distance between this point and the given point.
        Parameters:
        pt - another point
        Returns:
        the distance