|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.cau.cs.kieler.core.math.KielerMath
public final class KielerMath
Mathematics utility class for the KIELER projects.
Method Summary | |
---|---|
static KVectorChain |
appoximateSpline(KVectorChain controlPoints)
Computes an approximation for the spline that is defined by the given control points. |
static double |
averaged(double... values)
Determines the average for an arbitrary number of doubles. |
static float |
averagef(float... values)
Determines the average for an arbitrary number of floats. |
static int |
averagei(int... values)
Determines the average for an arbitrary number of integers. |
static long |
averagei(long... values)
Determines the average for an arbitrary number of long integers. |
static double |
binomiald(int n,
int k)
The binomial coefficient of integers n and k as double value. |
static long |
binomiall(int n,
int k)
The binomial coefficient of integers n and k as long value. |
static KVector[] |
calcBezierPoints(int resultSize,
KVector... controlPoints)
Calculate a number of points on the Bezier curve defined by the given control points. |
static KVector[] |
calcBezierPoints(KVector... controlPoints)
Calculate a number of points on the Bezier curve defined by the given control points. |
static KVector[] |
calcBezierPoints(List<KVector> controlPoints,
int resultSize)
Calculates a number of points on the Bezier curve defined by the given control points. |
static double |
distanceFromSpline(KVector start,
KVector c1,
KVector c2,
KVector end,
KVector needle)
Calculate the distance from a cubic spline curve to the point needle. |
static double |
factd(int x)
The factorial of an integer x as double value. |
static long |
factl(int x)
The factorial of an integer x as long value. |
static int |
getApproximationCount(KVector... controlPoints)
Calculate a suggestion for the number of approximation points of the Bezier curve that is defined by the given control points. |
static double |
maxd(double... values)
Determines the maximum for an arbitrary number of doubles. |
static float |
maxf(float... values)
Determines the maximum for an arbitrary number of floats. |
static int |
maxi(int... values)
Determines the maximum for an arbitrary number of integers. |
static long |
maxl(long... values)
Determines the maximum for an arbitrary number of long integers. |
static double |
mind(double... values)
Determines the minimum for an arbitrary number of doubles. |
static float |
minf(float... values)
Determines the minimum for an arbitrary number of floats. |
static int |
mini(int... values)
Determines the minimum for an arbitrary number of integers. |
static long |
minl(long... values)
Determines the minimum for an arbitrary number of long integers. |
static double |
pow(double a,
int b)
The first argument raised to the power of the second argument. |
static float |
pow(float a,
int b)
The first argument raised to the power of the second argument. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static long factl(int x)
x
- an integer
public static double factd(int x)
x
- an integer
public static long binomiall(int n, int k)
n
- the upper integerk
- the lower integer
public static double binomiald(int n, int k)
n
- the upper integerk
- the lower integer
public static double pow(double a, int b)
a
- the baseb
- the exponent
public static float pow(float a, int b)
a
- the baseb
- the exponent
public static KVector[] calcBezierPoints(List<KVector> controlPoints, int resultSize)
controlPoints
- list of control pointsresultSize
- number of returned curve points
public static KVector[] calcBezierPoints(int resultSize, KVector... controlPoints)
controlPoints
- the control pointsresultSize
- number of returned curve points
public static KVector[] calcBezierPoints(KVector... controlPoints)
controlPoints
- the control points
public static int getApproximationCount(KVector... controlPoints)
controlPoints
- the control points
public static KVectorChain appoximateSpline(KVectorChain controlPoints)
controlPoints
- control points of a piecewise cubic spline
public static double distanceFromSpline(KVector start, KVector c1, KVector c2, KVector end, KVector needle)
start
- starting pointc1
- control point 1c2
- control point 2end
- end pointneedle
- point to look for
public static int maxi(int... values)
values
- integer values
MIN_VALUE
if no values are givenpublic static int mini(int... values)
values
- integer values
MAX_VALUE
if no values are givenpublic static int averagei(int... values)
values
- integer values
public static long maxl(long... values)
values
- integer values
MIN_VALUE
if no values are givenpublic static long minl(long... values)
values
- integer values
MAX_VALUE
if no values are givenpublic static long averagei(long... values)
values
- integer values
public static float maxf(float... values)
values
- float values
-MAX_VALUE
if no values are givenpublic static float minf(float... values)
values
- float values
MAX_VALUE
if no values are givenpublic static float averagef(float... values)
values
- float values
public static double maxd(double... values)
values
- double values
-MAX_VALUE
if no values are givenpublic static double mind(double... values)
values
- double values
MAX_VALUE
if no values are givenpublic static double averaged(double... values)
values
- double values
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |