Interface Point_

All Superinterfaces:
Comparable<Point_>
All Known Implementing Classes:
GridPoint_2, Point_2, Point_3, Point_d, RationalPoint_2

public interface Point_ extends Comparable<Point_>
An interface defining geometric primitives and operations on points in euclidean space
Author:
Luca Castelli Aleardi (Ecole Polytechnique, INF562, 2010-2022)
  • Method Details

    • getCartesian

      Number getCartesian(int i)
      return the i-th cartesian coordinate of the point
    • setCartesian

      void setCartesian(int i, Number x)
      set the i-th cartesian coordinate
    • setOrigin

      void setOrigin()
      set the coordinates of the origin
    • translateOf

      void translateOf(Vector_ v)
      Translate the current point according to a vector v
    • minus

      Vector_ minus(Point_ p)
      Return the vector (p-q), where q is the current point
    • squareDistance

      Number squareDistance(Point_ p)
      Return the square distance ||p-q||^2, where q is the current point
    • barycenter

      void barycenter(Point_[] points)
      Set the current point as the barycenter of an array of points
    • linearCombination

      void linearCombination(Point_[] points, Number[] coefficients)
      Set the current point a linear combination of an array of points. Coefficients must sum to 1
    • dimension

      int dimension()
      Return the dimension of the space
    • toString

      String toString()
      Return a string (representation of the point)
      Overrides:
      toString in class Object
    • compareCartesian

      int compareCartesian(Point_ o, int i)
      Perform the comparison between the i-th coordinate of two points