Class Point

java.lang.Object
edu.cmu.tetrad.util.Point
All Implemented Interfaces:
Comparable<Point>

public class Point extends Object implements Comparable<Point>
Implements an n-dimensional point.
Author:
josephramsey
  • Constructor Details

    • Point

      public Point(Vector vector)
      Constructs a point with coordinates as in the given vector.
      Parameters:
      vector - a vector representing the point coordinates, in order.
  • Method Details

    • getValue

      public double getValue(int index)
      Parameters:
      index - Ibid.
      Returns:
      Ibid.
    • getSize

      public int getSize()
      Returns:
      Ibid.
    • compareTo

      public int compareTo(@NotNull @NotNull Point p)
      True iff the given object is a point with the same coordinates as this one.
      Specified by:
      compareTo in interface Comparable<Point>
      Parameters:
      p - Ibid.
      Returns:
      Ibid.
    • toString

      public String toString()
      Overrides:
      toString in class Object
      Returns:
      Ibid.
    • getVector

      public Vector getVector()
      Returns:
      Ibid.