|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openjump.core.graph.delauneySimplexInsert.Pnt
public class Pnt
Points in Euclidean space, implemented as double[]. Includes simple geometric operations. Uses matrices; a matrix is represented as an array of Pnts. Uses simplices; a simplex is represented as an array of Pnts.
| Constructor Summary | |
|---|---|
Pnt(double[] coords)
Constructor. |
|
Pnt(double coordA,
double coordB)
Constructor. |
|
Pnt(double coordA,
double coordB,
double coordC)
Constructor. |
|
| Method Summary | |
|---|---|
Pnt |
add(Pnt p)
Add. |
double |
angle(Pnt p)
Angle (in radians) between two Pnts (treated as vectors). |
Pnt |
bisector(Pnt point)
Perpendicular bisector of two Pnts. |
static Pnt |
circumcenter(Pnt[] simplex)
Circumcenter of a simplex. |
static double |
content(Pnt[] simplex)
Determine the signed content (i.e., area or volume, etc.) of a simplex. |
double |
coord(int i)
|
static Pnt |
cross(Pnt[] matrix)
Compute generalized cross-product of the rows of a matrix. |
static double |
determinant(Pnt[] matrix)
Compute the determinant of a matrix (array of Pnts). |
int |
dimCheck(Pnt p)
Check that dimensions match. |
int |
dimension()
|
double |
dot(Pnt p)
Dot product. |
boolean |
equals(java.lang.Object other)
Equality. |
Pnt |
extend(double[] coords)
Create a new Pnt by adding additional coordinates to this Pnt. |
int |
hashCode()
HashCode. |
boolean |
isInside(Pnt[] simplex)
Test if this Pnt is inside a simplex. |
Pnt |
isOn(Pnt[] simplex)
Test if this Pnt is on a simplex. |
Pnt |
isOutside(Pnt[] simplex)
Test if this Pnt is outside of simplex. |
double |
magnitude()
Magnitude (as a vector). |
static void |
main(java.lang.String[] args)
Main program (used for testing). |
int[] |
relation(Pnt[] simplex)
Relation between this Pnt and a simplex (represented as an array of Pnts). |
Pnt |
subtract(Pnt p)
Subtract. |
java.lang.String |
toString()
Create a String for this Pnt. |
static java.lang.String |
toString(Pnt[] matrix)
Create a String for a matrix. |
int |
vsCircumcircle(Pnt[] simplex)
Test relation between this Pnt and circumcircle of a simplex. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Pnt(double[] coords)
coords - the coordinates
public Pnt(double coordA,
double coordB)
coordA - coordB -
public Pnt(double coordA,
double coordB,
double coordC)
coordA - coordB - coordC - | Method Detail |
|---|
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object other)
equals in class java.lang.Objectother - the other Object to compare to
public int hashCode()
hashCode in class java.lang.Objectpublic double coord(int i)
java.lang.ArrayIndexOutOfBoundsException - for bad coordinatepublic int dimension()
public int dimCheck(Pnt p)
p - the Pnt to check (against this Pnt)
java.lang.IllegalArgumentException - if dimension fail to matchpublic Pnt extend(double[] coords)
coords - the new coordinates (added on the right end)
public double dot(Pnt p)
p - the other Pnt
public double magnitude()
public Pnt subtract(Pnt p)
p - the other Pnt
public Pnt add(Pnt p)
p - the other Pnt
public double angle(Pnt p)
p - the other Pnt
public Pnt bisector(Pnt point)
point - the other point
public static java.lang.String toString(Pnt[] matrix)
matrix - the matrix (an array of Pnts)
public static double determinant(Pnt[] matrix)
matrix - the matrix as an array of Pnts
java.lang.IllegalArgumentException - if dimensions are wrongpublic static Pnt cross(Pnt[] matrix)
matrix - the matrix of Pnts (one less row than the Pnt dimension)
java.lang.IllegalArgumentException - if matrix is wrong shapepublic static double content(Pnt[] simplex)
simplex - the simplex (as an array of Pnts)
public int[] relation(Pnt[] simplex)
-1 means Pnt is on same side of facet
0 means Pnt is on the facet
+1 means Pnt is on opposite side of facet
simplex - an array of Pnts representing a simplex
IllegalArgumentExcpetion - if the simplex is degeneratepublic Pnt isOutside(Pnt[] simplex)
simplex - the simplex (an array of Pnts)
public Pnt isOn(Pnt[] simplex)
simplex - the simplex (an array of Pnts)
public boolean isInside(Pnt[] simplex)
simplex - the simplex (an arary of Pnts)
public int vsCircumcircle(Pnt[] simplex)
simplex - the simplex (as an array of Pnts)
public static Pnt circumcenter(Pnt[] simplex)
simplex - the simplex (as an array of Pnts)
public static void main(java.lang.String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||