|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.java.dev.joode.util.MathUtils
public class MathUtils
Some comment conventions I use, to keep it simple:
A.B := the dotproduct between a and b
A x B := the crossproduct between a and b
| Field Summary | |
|---|---|
static float |
M_SQRT1_2
|
static java.util.Random |
rnd
|
static RealPointer |
tmpA
|
static RealPointer |
tmpAA
|
static RealPointer |
tmpB
|
static RealPointer |
tmpBB
|
static RealPointer |
tmpC
|
static RealPointer |
tmpCC
|
static RealPointer |
tmpD
|
| Constructor Summary | |
|---|---|
MathUtils()
|
|
| Method Summary | |
|---|---|
static void |
dCROSS_EQUAL_MINUS(RealPointer a,
Real b,
Real c)
a -= b x c |
static void |
dCROSS_MINUSEQUAL(RealPointer a,
RealPointer b,
RealPointer c)
a -= b x c |
static void |
dCROSS_MINUSEQUAL(Real a,
Real b,
Real c)
a -= b x c |
static void |
dCROSSMAT_MINUS_PLUS(RealPointer A,
RealPointer a,
int skip)
sets matrix a that is packed with row width s to be the skew-symetric matrix that represents the NEGATIVE cross product of a Vector3#bar(Matrix3); |
static void |
dCROSSMAT_PLUS_MINUS(Matrix3 A,
Vector3 a,
int skip)
|
static void |
dCROSSMAT_PLUS_MINUS(RealPointer A,
RealPointer a,
int skip)
sets matrix a that is packed with row width s to be the skew-symetric matrix that represents the posative cross product of a |
static float |
dDOTpq(Real a,
Real b,
int s1,
int s2,
int p,
int q)
3-way dot product. |
static boolean |
dFactorCholesky(RealPointer A,
int n)
might not work!! |
static boolean |
dIsPositiveDefinite(Matrix a,
int n)
Tests whether a submatrix is positive definite. |
static void |
dMULTIPLY0_331(RealPointer A,
RealPointer B,
Real C)
calculates A = B mul C, where C is an Vector |
static void |
dMULTIPLY0_331(RealPointer A,
RealPointer B,
RealPointer C)
calculates A = B mul C, where C is an Vector |
static void |
dMULTIPLY0_331(Real A,
RealPointer B,
Real C)
calculates A = B mul C, where C is an Vector |
static void |
dMULTIPLY0_331(Real A,
Real B,
Real C)
calculates A = B mul C, where C is an Vector |
static void |
dMULTIPLY0_331(Real A,
Real B,
Real C,
int as,
int bs,
int cs)
calculates A = B mul C, where C is an Vector |
static void |
dMULTIPLY0_333(RealPointer A,
RealPointer B,
RealPointer C)
calculates A = B mul C |
static void |
dMULTIPLY0_333(RealPointer A,
Real B,
Real C)
calculates A = B mul C |
static void |
dMULTIPLY0_333(RealPointer A,
Real B,
RealPointer C)
calculates A = B mul C |
static void |
dMULTIPLY0_333(Real A,
Real B,
Real C,
int as,
int bs,
int cs)
calculates A = B mul C |
static void |
dMultiply0(RealPointer A,
RealPointer B,
RealPointer C,
int p,
int q,
int r)
Matrix Operation: A = B' * C |
static void |
dMULTIPLY1_331(Real A,
Real B,
Real C)
calculates first row of A = C mul B |
static void |
dMultiply1(RealPointer A,
RealPointer B,
RealPointer C,
int p,
int q,
int r)
Matrix Operation: A = B * C |
static void |
dMULTIPLY2_333(RealPointer A,
Real B,
Real C)
calculates A = B mul transpose(C) |
static void |
dMULTIPLY2_333(Real A,
Real B,
Real C,
int as,
int bs,
int cs)
calculates A = B mul transpose(C) |
static void |
dMultiply2(RealPointer A,
RealPointer B,
RealPointer C,
int p,
int q,
int r)
Matrix Operation: A = B * C' |
static void |
dMULTIPLYADD0_331(Real A,
Real B,
Real C)
calculates first row of A += C mul transpose(B) |
static void |
dMULTIPLYADD0_331(Real A,
Real B,
Real C,
int as,
int bs,
int cs)
calculates first row of A += C mul transpose(B) |
static void |
dSolveCholesky(RealPointer L,
RealPointer b,
int n)
might not work!! |
static void |
dSolveL1T(RealPointer L,
RealPointer b,
int n,
int nskip)
this has been replaced by a faster version |
static void |
dSolveLDLT(RealPointer L,
RealPointer d,
RealPointer b,
int n,
int nskip)
? |
static Jama.Matrix |
toJAMAMatrix(Matrix a)
Converts a JOODE Matrix to a JAMA one. |
static Jama.Matrix |
toJAMAMatrix(RealPointer rp,
int numColumns,
int numRows)
helper function for converting from ODE matrix representations to JAMA representations is this really correct? |
static Jama.Matrix |
toJAMAReversePackingMatrix(RealPointer rp,
int numColumns,
int numRows)
helper function for converting from ODE matrix representations to JAMA representations |
static RealPointer |
toODEMatrix(Jama.Matrix matrix)
helper function for converting from ODE matrix representations to JAMA representations |
static Vector3 |
toODEVector(Vector3f vec)
transforms a vecmath Vector3f to a Vector3 |
static Matrix3f |
toVectorMathMatrix3f(Matrix3 rot)
transforms a Matrix3 to a vecmath Vector3f |
static Vector3f |
toVectorMathVector3f(Vector3 vec)
transforms a Vector3 to a vecmath Vector3f |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final float M_SQRT1_2
public static java.util.Random rnd
public static final RealPointer tmpA
public static final RealPointer tmpB
public static final RealPointer tmpC
public static final RealPointer tmpAA
public static final RealPointer tmpBB
public static final RealPointer tmpCC
public static final RealPointer tmpD
| Constructor Detail |
|---|
public MathUtils()
| Method Detail |
|---|
public static float dDOTpq(Real a,
Real b,
int s1,
int s2,
int p,
int q)
a - b - s1 - start indexs2 - start indexp - step sizeq - step size
public static void dCROSS_MINUSEQUAL(Real a,
Real b,
Real c)
public static void dCROSS_MINUSEQUAL(RealPointer a,
RealPointer b,
RealPointer c)
a - b - c -
public static void dCROSS_EQUAL_MINUS(RealPointer a,
Real b,
Real c)
a - b - c -
public static void dCROSSMAT_PLUS_MINUS(Matrix3 A,
Vector3 a,
int skip)
public static void dCROSSMAT_PLUS_MINUS(RealPointer A,
RealPointer a,
int skip)
A - a - skip - Vector3.bar(Matrix3);
public static void dCROSSMAT_MINUS_PLUS(RealPointer A,
RealPointer a,
int skip)
A - a - skip -
public static void dMULTIPLY0_331(Real A,
Real B,
Real C)
dMULTIPLYOP0_EQUAL_331(Real, Real, Real, int, int, int)
public static void dMULTIPLY0_331(RealPointer A,
RealPointer B,
RealPointer C)
dMULTIPLYOP0_EQUAL_331(Real, Real, Real, int, int, int)
public static void dMULTIPLY0_331(Real A,
RealPointer B,
Real C)
dMULTIPLYOP0_EQUAL_331(Real, Real, Real, int, int, int)
public static void dMULTIPLY0_331(Real A,
Real B,
Real C,
int as,
int bs,
int cs)
dMULTIPLYOP0_EQUAL_331(Real, Real, Real, int, int, int)
public static void dMULTIPLY0_331(RealPointer A,
RealPointer B,
Real C)
dMULTIPLYOP0_EQUAL_331(Real, Real, Real, int, int, int)
public static void dMULTIPLY1_331(Real A,
Real B,
Real C)
dMULTIPLYOP1_EQUAL_331(Real, Real, Real, int, int, int)
public static void dMULTIPLY0_333(Real A,
Real B,
Real C,
int as,
int bs,
int cs)
dMULTIPLYOP0_EQUAL_333(Real, Real, Real, int, int, int)
public static void dMULTIPLY0_333(RealPointer A,
RealPointer B,
RealPointer C)
dMULTIPLYOP0_EQUAL_333(Real, Real, Real, int, int, int)
public static void dMULTIPLY0_333(RealPointer A,
Real B,
Real C)
dMULTIPLYOP0_EQUAL_333(Real, Real, Real, int, int, int)
public static void dMULTIPLY0_333(RealPointer A,
Real B,
RealPointer C)
dMULTIPLYOP0_EQUAL_333(Real, Real, Real, int, int, int)
public static void dMULTIPLY2_333(RealPointer A,
Real B,
Real C)
dMULTIPLYOP2_EQUAL_333(Real, Real, Real, int, int, int)
public static void dMULTIPLY2_333(Real A,
Real B,
Real C,
int as,
int bs,
int cs)
dMULTIPLYOP2_EQUAL_333(Real, Real, Real, int, int, int)
public static void dMULTIPLYADD0_331(Real A,
Real B,
Real C)
dMULTIPLYOP0_ADDEQUAL_331(Real, Real, Real, int, int, int)
public static void dMULTIPLYADD0_331(Real A,
Real B,
Real C,
int as,
int bs,
int cs)
dMULTIPLYOP0_ADDEQUAL_331(Real, Real, Real, int, int, int)
public static void dMultiply0(RealPointer A,
RealPointer B,
RealPointer C,
int p,
int q,
int r)
public static void dMultiply1(RealPointer A,
RealPointer B,
RealPointer C,
int p,
int q,
int r)
Matrix.mul(Real)
public static void dMultiply2(RealPointer A,
RealPointer B,
RealPointer C,
int p,
int q,
int r)
public static boolean dFactorCholesky(RealPointer A,
int n)
public static void dSolveCholesky(RealPointer L,
RealPointer b,
int n)
public static boolean dIsPositiveDefinite(Matrix a,
int n)
a - the matrix containing the submatrix to be testedn - the size of the submatrix to be tested
true if the submatrix is positive definite,
and false otherwise
public static void dSolveL1T(RealPointer L,
RealPointer b,
int n,
int nskip)
public static void dSolveLDLT(RealPointer L,
RealPointer d,
RealPointer b,
int n,
int nskip)
L - d - b - n - nskip -
public static final Jama.Matrix toJAMAMatrix(RealPointer rp,
int numColumns,
int numRows)
rp -
public static Jama.Matrix toJAMAMatrix(Matrix a)
public static final RealPointer toODEMatrix(Jama.Matrix matrix)
public static final Jama.Matrix toJAMAReversePackingMatrix(RealPointer rp,
int numColumns,
int numRows)
rp -
public static final Matrix3f toVectorMathMatrix3f(Matrix3 rot)
rot -
public static final Vector3f toVectorMathVector3f(Vector3 vec)
vec -
public static final Vector3 toODEVector(Vector3f vec)
vec -
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||