| Modifier and Type | Field and Description |
|---|---|
java.lang.Double[] |
coordinates |
| Constructor and Description |
|---|
Point_d(double[] coord) |
Point_d(int d) |
Point_d(Point_ p) |
| Modifier and Type | Method and Description |
|---|---|
void |
barycenter(Point_[] points)
Set the current point as the barycenter of an array of points
|
int |
compareCartesian(Point_ o,
int i)
Compare the i-th coordinate of two points
|
int |
compareTo(Point_ o) |
int |
dimension()
Return the dimension of the space
|
boolean |
equals(java.lang.Object o)
Check equality between point coordinates
|
java.lang.Number |
getCartesian(int i)
return the i-th cartesian coordinate of the point
|
void |
linearCombination(Point_[] points,
java.lang.Number[] coefficients)
Set the current point a linear combination of an array of points.
|
Vector_ |
minus(Point_ b)
Return the vector (p-q), where q is the current point
|
void |
setCartesian(int i,
java.lang.Number x)
set the i-th cartesian coordinate
|
void |
setOrigin()
set the coordinates of the origin
|
java.lang.Number |
squareDistance(Point_ p)
Return the square distance ||p-q||^2, where q is the current point
|
java.lang.String |
toString()
Return a string (representation of the point)
|
void |
translateOf(Vector_ v)
Translate the current position of vector v
|
public Point_d(int d)
public Point_d(double[] coord)
public Point_d(Point_ p)
public void barycenter(Point_[] points)
Point_barycenter in interface Point_public void linearCombination(Point_[] points, java.lang.Number[] coefficients)
Point_linearCombination in interface Point_public void translateOf(Vector_ v)
translateOf in interface Point_v - the vector describing the translationpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objecto - the point to be comparedpublic java.lang.String toString()
Point_public int dimension()
Point_public java.lang.Number getCartesian(int i)
Point_getCartesian in interface Point_public void setCartesian(int i,
java.lang.Number x)
Point_setCartesian in interface Point_public void setOrigin()
Point_public Vector_ minus(Point_ b)
Point_public java.lang.Number squareDistance(Point_ p)
Point_squareDistance in interface Point_public int compareTo(Point_ o)
compareTo in interface java.lang.Comparable<Point_>public int compareCartesian(Point_ o, int i)
compareCartesian in interface Point_o - the point to comparei - the i-th coordinate to compare