public class NumericalMethods extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
NumericalMethods.TwoSum |
| Constructor and Description |
|---|
NumericalMethods() |
| Modifier and Type | Method and Description |
|---|---|
static double |
area(LinearRing<?> ring)
Determine the (signed) area of a linearring, using the the
Shoelace algorithm.
|
static boolean |
collinear(Position p0,
Position p1,
Position p2) |
static double |
crossProduct(double x0,
double y0,
double x1,
double y1) |
static double |
determinant(double a11,
double a12,
double a21,
double a22)
Calculates the determinant of a 2x2 matrix
|
static double |
determinant(double a11,
double a12,
double a13,
double a21,
double a22,
double a23,
double a31,
double a32,
double a33)
Calculates the determinant of a 3x3 matrix
|
static double |
determinant(Position p0,
Position p1) |
static boolean |
isCounterClockwise(LinearRing<?> ring)
Determines whether the specified
LinearRing is counter-clockwise. |
static boolean |
isCounterClockwise(Position p0,
Position p1,
Position p2)
Determines if the triangle determined by p0, p1, p2 is counterclockwise in 2D.
|
static double |
orient2d(LinearRing<?> ring)
Determine the orientation of a
LinearRing
This uses Newell's method (see Graphics Gems III, V. |
public static double determinant(double a11,
double a12,
double a21,
double a22)
a11 - a12 - a21 - a22 - public static double crossProduct(double x0,
double y0,
double x1,
double y1)
public static double determinant(double a11,
double a12,
double a13,
double a21,
double a22,
double a23,
double a31,
double a32,
double a33)
a11 - a12 - a13 - a21 - a22 - a23 - a31 - a32 - a33 - public static boolean isCounterClockwise(Position p0, Position p1, Position p2)
This is equivalent to p2 is to the left of the line p0 - p1.
p0 - p1 - p2 - public static double area(LinearRing<?> ring)
ring - public static boolean isCounterClockwise(LinearRing<?> ring)
LinearRing is counter-clockwise.
Orientation is determined by calculating the signed area of the given ring and using the sign to determine the orientation
The specified Ring is assumed to be valid.
ring - a LinearRingpublic static double orient2d(LinearRing<?> ring)
LinearRing
This uses Newell's method (see Graphics Gems III, V. 5)ring - the linear ringCopyright © 2021 geolatte.org. All rights reserved.