Class Point_3
java.lang.Object
Jcg.geometry.Point_3
- All Implemented Interfaces:
Comparable<Point_>,Point_
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbarycenter(Point_[] points) Set the current point as the barycenter of an array of pointsintcompareCartesian(Point_ o, int i) Compare the i-th coordinate of two pointsintCompare two points (lexicographic order on coordinates)intReturn the dimension of the spacebooleangetCartesian(int i) return the i-th cartesian coordinate of the pointgetX()getY()getZ()inthashCode()voidlinearCombination(Point_[] points, Number[] coefficients) Set the current point a linear combination of an array of points.static Point_3linearCombination(Point_3[] points, Number[] coefficients) Return the vector (p-q), where q is the current pointvoidvoidsetCartesian(int i, Number x) set the i-th cartesian coordinatevoidset the coordinates of the originvoidvoidvoidReturn 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 v
-
Field Details
-
x
-
y
-
z
-
-
Constructor Details
-
Point_3
public Point_3() -
Point_3
-
Point_3
-
-
Method Details
-
barycenter
Set the current point as the barycenter of an array of points- Specified by:
barycenterin interfacePoint_
-
linearCombination
Description copied from interface:Point_Set the current point a linear combination of an array of points. Coefficients must sum to 1- Specified by:
linearCombinationin interfacePoint_
-
linearCombination
-
getX
-
setX
-
getY
-
setY
-
getZ
-
setZ
-
translateOf
Description copied from interface:Point_Translate the current point according to a vector v- Specified by:
translateOfin interfacePoint_
-
multiply
-
equals
-
hashCode
-
distanceFrom
-
squareDistance
Description copied from interface:Point_Return the square distance ||p-q||^2, where q is the current point- Specified by:
squareDistancein interfacePoint_
-
toString
-
dimension
-
getCartesian
Description copied from interface:Point_return the i-th cartesian coordinate of the point- Specified by:
getCartesianin interfacePoint_
-
setCartesian
Description copied from interface:Point_set the i-th cartesian coordinate- Specified by:
setCartesianin interfacePoint_
-
setOrigin
-
minus
-
sum
-
compareTo
Compare two points (lexicographic order on coordinates)- Specified by:
compareToin interfaceComparable<Point_>- Parameters:
o- the point to compare
-
compareCartesian
Compare the i-th coordinate of two points- Specified by:
compareCartesianin interfacePoint_- Parameters:
o- the point to comparei- the i-th coordinate to compare- Returns:
- the result is -1 if first point is smaller then point o, return 1 is first point is greater then o, and 0 otherwise
-