|
AlgART Home | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.algart.arrays.Matrices.Region
net.algart.arrays.Matrices.ConvexHyperpolyhedron
net.algart.arrays.Matrices.Simplex
public static final class Matrices.Simplex extends Matrices.ConvexHyperpolyhedron
Simplex: the simplest n-dimensional hyperpolyhedron with
Simplex is a particular case of the convex hyperpolyhedron.
Simplex is specified by its vertices and can be created by the following methods:
Matrices.Region.getSimplex(double[][] vertices),Matrices.Region.getTriangle2D(double x1, double y1, double x2, double y2, double x3, double y3),Matrices.Region.getTetrahedron3D(double x1, double y1, double z1,
double x2, double y2, double z2,
double x3, double y3, double z3,
double x4, double y4, double z4).Note: degenerated simplexes, when all vertices lie in the same (n−1)-dimensional hyperplane,
are not allowed. (In DegeneratedSimplexException is thrown in these cases.
All calculations while building and processing simplex are performed in strictfp mode, so the results are absolutely identical on all platforms.
This class is immutable and thread-safe: there are no ways to modify settings of the created instance.
| Modifier and Type | Method and Description |
|---|---|
static boolean |
isSimplexDegenerated(double[][] vertices)
Returns true if and only if the specified vertices lies in the same (n−1)-dimensional hyperplane, as far as it can be detected by analysing the coordinates via calculations with standard Java double numbers. |
java.lang.String |
toString()
Returns a brief string description of this object. |
double[][] |
vertices()
Returns the coordinates of all vertices of the simplex. |
| Methods inherited from class net.algart.arrays.Matrices.ConvexHyperpolyhedron |
|---|
a, b, contains, sectionAtLastCoordinate |
| Methods inherited from class net.algart.arrays.Matrices.Region |
|---|
checkSectionAtLastCoordinate, coordRange, coordRanges, getConvexHyperpolyhedron, getHyperparallelepiped, getParallelepiped3D, getPolygon2D, getRectangle2D, getSegment, getSimplex, getTetrahedron3D, getTriangle2D, isContainsSupported, isRectangular, n |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public static boolean isSimplexDegenerated(double[][] vertices)
Matrices.Region.getSimplex(double[][] vertices) method throws DegeneratedSimplexException if
and only if this method returns true for the same argument.
vertices - coordinates of all vertices.java.lang.NullPointerException - if the vertices array or some of its elements is null.java.lang.IllegalArgumentException - if the vertices array or some of its elements is empty
(has zero length),
or if the length of some vertices[k] array is not equal to
vertices[0].length+1.public double[][] vertices()
Matrices.Region.getSimplex(double[][] vertices)
method.
The returned array is a deep clone of the internal data stored in this object: no references, maintained by this object, are returned.
public java.lang.String toString()
The result of this method may depend on implementation.
toString in class Matrices.ConvexHyperpolyhedron
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||