public class Pnt extends Objectimplements Serializable
| Constructor and Description |
|---|
Pnt(double... coords)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Pnt |
add(Pnt
Add.
|
double |
angle(Pnt
Angle (in radians) between two Pnts (treated as vectors).
|
Pnt |
bisector(Pnt
Perpendicular bisector of two Pnts.
|
static Pnt |
circumcenter(Pnt
Circumcenter of a simplex.
|
static double |
content(Pnt
Determine the signed content (i.e., area or volume, etc.) of a simplex.
|
double |
coord(int i)
|
static Pnt |
cross(Pnt
Compute generalized cross-product of the rows of a matrix.
|
static double |
determinant(Pnt
Compute the determinant of a matrix (array of Pnts).
|
int |
dimCheck(Pnt
Check that dimensions match.
|
int |
dimension()
|
double |
dot(Pnt
Dot product.
|
boolean |
equals(Object
|
Pnt |
extend(double... coords)
Create a new Pnt by adding additional coordinates to this Pnt.
|
int |
hashCode()
|
boolean |
isInside(Pnt
Test if this Pnt is inside a simplex.
|
Pnt |
isOn(Pnt
Test if this Pnt is on a simplex.
|
Pnt |
isOutside(Pnt
Test if this Pnt is outside of simplex.
|
double |
magnitude()
Magnitude (as a vector).
|
int[] |
relation(Pnt
Relation between this Pnt and a simplex (represented as an array of Pnts).
|
Pnt |
subtract(Pnt
Subtract.
|
String |
toString()
|
static String |
toString(Pnt
Create a String for a matrix.
|
int |
vsCircumcircle(Pnt
Test relation between this Pnt and circumcircle of a simplex.
|
public Pnt(double... coords)
coords - the coordinates
public StringtoString()
public boolean equals(Objectother)
public int hashCode()
public double coord(int i)
i - the index of the coordinate.
ArrayIndexOutOfBoundsException - for bad coordinate
public int dimension()
public int dimCheck(Pntp)
p - the Pnt to check (against this Pnt)
IllegalArgumentException - if dimension fail to match
public Pntextend(double... coords)
coords - the new coordinates (added on the right end)
public double dot(Pntp)
p - the other Pnt
public double magnitude()
public Pntsubtract(Pnt p)
p - the other Pnt
public double angle(Pntp)
p - the other Pnt
public Pntbisector(Pnt point)
point - the other point
public static StringtoString(Pnt [] matrix)
matrix - the matrix (an array of Pnts)
public static double determinant(Pnt[] matrix)
matrix - the matrix as an array of Pnts
IllegalArgumentException - if dimensions are wrong
public static Pntcross(Pnt [] matrix)
matrix - the matrix of Pnts (one less row than the Pnt dimension)
IllegalArgumentException - if matrix is wrong shape
public 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
IllegalArgumentException - if the simplex is degenerate
public PntisOutside(Pnt [] simplex)
simplex - the simplex (an array of Pnts)
public PntisOn(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)