|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.geotools.geometry.iso.util.algorithmND.AlgoPointND
public class AlgoPointND
This class offers methods to process basic operations on double arrays in n-dimensional space. In majority, these algorithms are non-robust in sense that floating-point rounding errors may occur.
Constructor Summary | |
---|---|
AlgoPointND()
|
Method Summary | |
---|---|
static double[] |
add(double[] p0,
double[] p1)
Adds a coordinate to another coordinate |
static double[] |
evaluate(double[] c0,
double[] c1,
double r)
Interpolation of a straigt line given by two coordinates c0 and c1 . |
static double |
getDistance(double[] p0,
double[] p1)
Returns the distance between two points |
static double |
getDistanceSquare(double[] p0,
double[] p1)
Returns the square of the distance between two points |
static double |
getDistanceToOrigin(double[] p0)
Returns the distance from the coordinate represented by p0 to the origin of the coordinate system. |
static double[] |
normalize(double[] p)
Normalizes a vector which begins at the origin and ends at p to length 1
Note: This method is NON-ROBUST due to floating-point rounding errors. |
static double[] |
scale(double[] p0,
double factor)
|
static double[][] |
split(double[] c0,
double[] c1,
double maxSpacingSquare)
|
static double[] |
subtract(double[] p0,
double[] p1)
Substracts a coordinate p0 from a coordinate p1 . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AlgoPointND()
Method Detail |
---|
public static double getDistanceSquare(double[] p0, double[] p1)
p0
- p1
-
public static double getDistance(double[] p0, double[] p1)
p0
- p1
-
public static double getDistanceToOrigin(double[] p0)
p0
to the origin of the coordinate system.
Note: This method is NON-ROBUST due to floating-point rounding errors.
Inexact results according to floating-point rounding errors may be caused.
p0
-
public static double[] subtract(double[] p0, double[] p1)
p0
from a coordinate p1
.
Note: This method is NON-ROBUST due to floating-point rounding errors.
Inexact results according to floating-point rounding errors may be caused.
p0
- p1
-
public static double[] add(double[] p0, double[] p1)
p0
- p1
-
public static double[] scale(double[] p0, double factor)
p0
- factor
-
public static double[][] split(double[] c0, double[] c1, double maxSpacingSquare)
c0
- c1
- maxSpacingSquare
- is the square of the max. allowed spacing
public static double[] evaluate(double[] c0, double[] c1, double r)
c0
and c1
.
The method will return a double array which describes the coordinate at distance r
on this straight line, whith a parametrisation of 0.0 at c0
and 1.0 at c1
.
Note: This method is NON-ROBUST due to floating-point rounding errors.
Inexact results according to floating-point rounding errors may be caused.
c0
- c1
- r
-
public static double[] normalize(double[] p)
p
to length 1
Note: This method is NON-ROBUST due to floating-point rounding errors.
Inexact results according to floating-point rounding errors may be caused.
p
- the end point of the vector
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |