Modifier and Type | Field and Description |
---|---|
java.lang.Double |
x |
java.lang.Double |
y |
java.lang.Double |
z |
Constructor and Description |
---|
Point_3() |
Point_3(java.lang.Number x,
java.lang.Number y,
java.lang.Number z) |
Point_3(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)
Compare two points (lexicographic order on coordinates)
|
int |
dimension()
Return the dimension of the space
|
java.lang.Number |
distanceFrom(Point_3 p) |
boolean |
equals(java.lang.Object o) |
java.lang.Number |
getCartesian(int i)
return the i-th cartesian coordinate of the point
|
java.lang.Number |
getX() |
java.lang.Number |
getY() |
java.lang.Number |
getZ() |
int |
hashCode() |
void |
linearCombination(Point_[] points,
java.lang.Number[] coefficients)
Set the current point a linear combination of an array of points.
|
static Point_3 |
linearCombination(Point_3[] points,
java.lang.Number[] coefficients) |
Vector_ |
minus(Point_ b)
Return the vector (p-q), where q is the current point
|
void |
multiply(java.lang.Number n) |
void |
setCartesian(int i,
java.lang.Number x)
set the i-th cartesian coordinate
|
void |
setOrigin()
set the coordinates of the origin
|
void |
setX(java.lang.Number x) |
void |
setY(java.lang.Number y) |
void |
setZ(java.lang.Number z) |
java.lang.Number |
squareDistance(Point_ p)
Return the square distance ||p-q||^2, where q is the current point
|
Point_3 |
sum(Vector_ v) |
java.lang.String |
toString()
Return a string (representation of the point)
|
void |
translateOf(Vector_ v)
Translate the current point according to a vector v
|
public Point_3()
public Point_3(java.lang.Number x, java.lang.Number y, java.lang.Number z)
public Point_3(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 static Point_3 linearCombination(Point_3[] points, java.lang.Number[] coefficients)
public java.lang.Number getX()
public void setX(java.lang.Number x)
public java.lang.Number getY()
public void setY(java.lang.Number y)
public java.lang.Number getZ()
public void setZ(java.lang.Number z)
public void translateOf(Vector_ v)
Point_
translateOf
in interface Point_
public void multiply(java.lang.Number n)
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.Number distanceFrom(Point_3 p)
public java.lang.Number squareDistance(Point_ p)
Point_
squareDistance
in interface Point_
public 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 int compareTo(Point_ o)
compareTo
in interface java.lang.Comparable<Point_>
o
- the point to comparepublic int compareCartesian(Point_ o, int i)
compareCartesian
in interface Point_
o
- the point to comparei
- the i-th coordinate to compare