|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ode4j.cpp.internal.ApiCppMathMisc
org.ode4j.cpp.internal.ApiCppMathRotation
org.ode4j.cpp.internal.ApiCppMathMatrix
public abstract class ApiCppMathMatrix
optimized and unoptimized vector and matrix functions.
Constructor Summary | |
---|---|
ApiCppMathMatrix()
|
Method Summary | |
---|---|
static double |
dDot(double[] a,
double[] b,
int n)
|
static double |
dDot(double[] a,
int aPos,
double[] b,
int n)
|
static double |
dDot(double[] a,
int aPos,
double[] b,
int bPos,
int n)
|
static double |
dDot(DVector3C a,
DVector3 b,
int n)
get the dot product of two n*1 vectors. |
static boolean |
dFactorCholesky(double[] A,
int n)
do an in-place cholesky decomposition on the lower triangle of the n*n symmetric matrix A (which is stored by rows). |
static void |
dFactorLDLT(double[] A,
double[] d,
int n,
int nskip)
factorize a matrix A into L*D*L', where L is lower triangular with ones on the diagonal, and D is diagonal. |
static boolean |
dInvertPDMatrix(double[] A,
double[] Ainv,
int n)
compute the inverse of the n*n positive definite matrix A and put it in Ainv. |
static boolean |
dIsPositiveDefinite(double[] A,
int n)
check whether an n*n matrix A is positive definite, return 1/0 (yes/no). |
static void |
dLDLTAddTL(double[] L,
double[] d,
double[] a,
int n,
int nskip)
given an L*D*L' factorization of an n*n matrix A, return the updated factorization L2*D2*L2' of A plus the following "top left" matrix: [ b a' ] <-- b is a[0] [ a 0 ] <-- a is a[1..n-1] - L has size n*n, its leading dimension is nskip. |
static void |
dLDLTRemove(double[] A,
int[] p,
double[] L,
double[] d,
int n1,
int n2,
int r,
int nskip)
given an L*D*L' factorization of a permuted matrix A, produce a new factorization for row and column `r' removed. |
static void |
dMultiply0(double[] A,
double[] B,
double[] C,
int p,
int q,
int r)
matrix multiplication. |
static void |
dMultiply1(double[] A,
double[] B,
double[] C,
int p,
int q,
int r)
|
static void |
dMultiply2(double[] A,
double[] B,
double[] C,
int p,
int q,
int r)
|
static void |
dRemoveRowCol(double[] A,
int n,
int nskip,
int r)
given an n*n matrix A (with leading dimension nskip), remove the r'th row and column by moving elements. |
static void |
dSetValue(double[] a,
int n,
double value)
|
static void |
dSetZero(double[] a,
int n)
set a vector/matrix of size n to all zeros, or to a specific value. |
static void |
dSolveCholesky(double[] L,
double[] b,
int n)
solve for x: L*L'*x = b, and put the result back into x. |
static void |
dSolveLDLT(double[] L,
double[] d,
double[] b,
int n,
int nskip)
given `L', a n*n lower triangular matrix with ones on the diagonal, and `d', a n*1 vector of the reciprocal diagonal elements of an n*n matrix D, solve L*D*L'*x=b where x,b are n*1. |
Methods inherited from class org.ode4j.cpp.internal.ApiCppMathRotation |
---|
dDQfromW, dQFromAxisAndAngle, dQfromR, dQMultiply0, dQMultiply1, dQMultiply2, dQMultiply3, dQSetIdentity, dQtoR, dRFrom2Axes, dRFromAxisAndAngle, dRFromEulerAngles, dRfromQ, dRFromZAxis, dRSetIdentity |
Methods inherited from class org.ode4j.cpp.internal.ApiCppMathMisc |
---|
dClearUpperTriangle, dMakeRandomMatrix, dMakeRandomVector, dMaxDifference, dMaxDifferenceLowerTriangle, dRand, dRandGetSeed, dRandInt, dRandReal, dRandSetSeed, dTestRand |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ApiCppMathMatrix()
Method Detail |
---|
public static void dSetZero(double[] a, int n)
public static void dSetValue(double[] a, int n, double value)
public static double dDot(DVector3C a, DVector3 b, int n)
public static double dDot(double[] a, double[] b, int n)
public static double dDot(double[] a, int aPos, double[] b, int n)
public static double dDot(double[] a, int aPos, double[] b, int bPos, int n)
public static void dMultiply0(double[] A, double[] B, double[] C, int p, int q, int r)
public static void dMultiply1(double[] A, double[] B, double[] C, int p, int q, int r)
public static void dMultiply2(double[] A, double[] B, double[] C, int p, int q, int r)
public static boolean dFactorCholesky(double[] A, int n)
public static void dSolveCholesky(double[] L, double[] b, int n)
public static boolean dInvertPDMatrix(double[] A, double[] Ainv, int n)
public static boolean dIsPositiveDefinite(double[] A, int n)
public static void dFactorLDLT(double[] A, double[] d, int n, int nskip)
public static void dSolveLDLT(double[] L, double[] d, double[] b, int n, int nskip)
public static void dLDLTAddTL(double[] L, double[] d, double[] a, int n, int nskip)
public static void dLDLTRemove(double[] A, int[] p, double[] L, double[] d, int n1, int n2, int r, int nskip)
public static void dRemoveRowCol(double[] A, int n, int nskip, int r)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |