Interface Point_
- All Superinterfaces:
Comparable<Point_>
- All Known Implementing Classes:
GridPoint_2,Point_2,Point_3,Point_d,RationalPoint_2
An interface defining geometric primitives and operations on points in euclidean space
- Author:
- Luca Castelli Aleardi (Ecole Polytechnique, INF562, 2010-2022)
-
Method Summary
Modifier and TypeMethodDescriptionvoidbarycenter(Point_[] points) Set the current point as the barycenter of an array of pointsintcompareCartesian(Point_ o, int i) Perform the comparison between the i-th coordinate of two pointsintReturn the dimension of the spacegetCartesian(int i) return the i-th cartesian coordinate of the pointvoidlinearCombination(Point_[] points, Number[] coefficients) Set the current point a linear combination of an array of points.Return the vector (p-q), where q is the current pointvoidsetCartesian(int i, Number x) set the i-th cartesian coordinatevoidset the coordinates of the originReturn the square distance ||p-q||^2, where q is the current pointtoString()Return a string (representation of the point)voidTranslate the current point according to a vector vMethods inherited from interface java.lang.Comparable
compareTo
-
Method Details
-
getCartesian
return the i-th cartesian coordinate of the point -
setCartesian
set the i-th cartesian coordinate -
setOrigin
void setOrigin()set the coordinates of the origin -
translateOf
Translate the current point according to a vector v -
minus
-
squareDistance
-
barycenter
Set the current point as the barycenter of an array of points -
linearCombination
-
dimension
int dimension()Return the dimension of the space -
toString
-
compareCartesian
Perform the comparison between the i-th coordinate of two points
-