|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ode4j.ode.OdeConstants
org.ode4j.ode.internal.ErrorHandler
org.ode4j.ode.internal.Common
org.ode4j.ode.DMisc
org.ode4j.ode.DMatrix
public class DMatrix
Matrix math functions. Ported from matrix.h in C-interface.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.ode4j.ode.internal.Common |
---|
org.ode4j.ode.internal.Common.DMatrix4 |
Nested classes/interfaces inherited from class org.ode4j.ode.internal.ErrorHandler |
---|
org.ode4j.ode.internal.ErrorHandler.dMessageFunction |
Field Summary |
---|
Fields inherited from class org.ode4j.ode.internal.Common |
---|
d_ERR_IASSERT, d_ERR_LCP, d_ERR_UASSERT, d_ERR_UNKNOWN, d_MEMORY_OK, d_MEMORY_OUT_OF_MEMORY, dATOMICS_ENABLED, DBL_EPSILON, dDOUBLE, dEpsilon, dNODEBUG, dSINGLE, dTLS_ENABLED, dTRIMESH_16BIT_INDICES, dTRIMESH_ENABLED, dTRIMESH_GIMPACT, dTRIMESH_OPCODE, dTRIMESH_OPCODE_USE_OLD_TRIMESH_TRIMESH_COLLIDER, dUSE_MALLOC_FOR_ALLOCA, M_PI, M_SQRT1_2, MAX_FLOAT |
Fields inherited from class org.ode4j.ode.OdeConstants |
---|
CONTACTS_UNIMPORTANT, dAllocateMaskAll, dContactApprox0, dContactApprox1, dContactApprox1_1, dContactApprox1_2, dContactBounce, dContactFDir1, dContactMotion1, dContactMotion2, dContactMotionN, dContactMu2, dContactSlip1, dContactSlip2, dContactSoftCFM, dContactSoftERP, dInfinity |
Constructor Summary | |
---|---|
DMatrix()
|
Method Summary | |
---|---|
static boolean |
dFactorCholesky(DMatrix3 A)
Do an in-place cholesky decomposition on the lower triangle of the n*n symmetric matrix A (which is stored by rows). |
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(DMatrix3C A,
DMatrix3 Ainv)
Compute the inverse of the n*n positive definite matrix A and put it in Ainv. |
static boolean |
dInvertPDMatrix(double[] A,
double[] Ainv,
int n)
|
static boolean |
dIsPositiveDefinite(DMatrix3C A)
Check whether an n*n matrix A is positive definite, return 1/0 (yes/no). |
static boolean |
dIsPositiveDefinite(double[] A,
int n)
|
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(DMatrix3 A,
DMatrix3C B,
DMatrix3C C)
|
static void |
dMultiply0(double[] A,
double[] B,
double[] C,
int p,
int q,
int r)
|
static void |
dMultiply0(DVector3 a,
DMatrix3C B,
DVector3C c)
|
static void |
dMultiply0(DVector3 a,
DVector3C b,
DMatrix3C C)
Matrix multiplication. |
static void |
dMultiply1(DMatrix3 A,
DMatrix3C B,
DMatrix3C C)
|
static void |
dMultiply1(double[] A,
double[] B,
double[] C,
int p,
int q,
int r)
|
static void |
dMultiply1(DVector3 a,
DMatrix3C B,
DVector3C c)
|
static void |
dMultiply2(DMatrix3 A,
DMatrix3C B,
DMatrix3C C)
|
static void |
dMultiply2(double[] A,
double[] B,
double[] C,
int p,
int q,
int r)
|
static void |
dMultiply2(DVector3 a,
DMatrix3C B,
DVector3C c)
|
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(DVector3 a,
double value)
Set a vector/matrix to a specific value. |
static void |
dSetZero(double[] a)
Set a vector/matrix to all zeros. |
static void |
dSolveCholesky(DMatrix3C L,
DVector3 x)
Solve for x: L*L'*x = b, and put the result back into x. |
static void |
dSolveCholesky(double[] L,
double[] x,
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. |
static void |
dVectorScale(DVector3 a,
DVector3C d)
In matlab syntax: a(1:n) = a(1:n) .* d(1:n) |
Methods inherited from class org.ode4j.ode.DMisc |
---|
dClearUpperTriangle, dClearUpperTriangle, dMakeRandomMatrix, dMakeRandomMatrix, dMakeRandomVector, dMakeRandomVector, dMakeRandomVector, dMaxDifference, dMaxDifference, dMaxDifference, dMaxDifference, dMaxDifferenceLowerTriangle, dPrintMatrix, dRand, dRandGetSeed, dRandInt, dRandReal, dRandSetSeed, dTestRand |
Methods inherited from class org.ode4j.ode.internal.Common |
---|
dAASSERT, dAASSERT, dAtan2, dCeil, dCopysign, dCopySign, dCos, dDEBUGMSG, dFabs, dFloor, dFMod, dIASSERT, dIsNan, dIVERIFY, dNextAfter, dPAD, dRecip, dRecipSqrt, dSin, dSqrt, dUASSERT |
Methods inherited from class org.ode4j.ode.internal.ErrorHandler |
---|
dDebug, dError, dGetDebugHandler, dGetErrorHandler, dGetMessageHandler, dMessage, dSetDebugHandler, dSetErrorHandler, dSetMessageHandler |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DMatrix()
Method Detail |
---|
public static void dSetZero(double[] a)
public static void dSetValue(DVector3 a, double value)
public static void dMultiply0(DVector3 a, DVector3C b, DMatrix3C C)
public static void dMultiply0(DVector3 a, DMatrix3C B, DVector3C c)
dMultiply0(DVector3, DVector3C, DMatrix3C)
public static void dMultiply0(DMatrix3 A, DMatrix3C B, DMatrix3C C)
dMultiply0(DVector3, DVector3C, DMatrix3C)
public static void dMultiply0(double[] A, double[] B, double[] C, int p, int q, int r)
dMultiply0(DVector3, DVector3C, DMatrix3C)
public static void dMultiply1(DVector3 a, DMatrix3C B, DVector3C c)
dMultiply0(DVector3, DVector3C, DMatrix3C)
public static void dMultiply1(DMatrix3 A, DMatrix3C B, DMatrix3C C)
dMultiply0(DVector3, DVector3C, DMatrix3C)
public static void dMultiply1(double[] A, double[] B, double[] C, int p, int q, int r)
dMultiply0(DVector3, DVector3C, DMatrix3C)
public static void dMultiply2(DVector3 a, DMatrix3C B, DVector3C c)
dMultiply0(DVector3, DVector3C, DMatrix3C)
public static void dMultiply2(DMatrix3 A, DMatrix3C B, DMatrix3C C)
dMultiply0(DVector3, DVector3C, DMatrix3C)
public static void dMultiply2(double[] A, double[] B, double[] C, int p, int q, int r)
dMultiply0(DVector3, DVector3C, DMatrix3C)
public static boolean dFactorCholesky(DMatrix3 A)
public static boolean dFactorCholesky(double[] A, int n)
public static void dSolveCholesky(DMatrix3C L, DVector3 x)
public static void dSolveCholesky(double[] L, double[] x, int n)
public static boolean dInvertPDMatrix(DMatrix3C A, DMatrix3 Ainv)
public static boolean dInvertPDMatrix(double[] A, double[] Ainv, int n)
public static boolean dIsPositiveDefinite(DMatrix3C A)
public static boolean dIsPositiveDefinite(double[] A, int n)
public static void dFactorLDLT(double[] A, double[] d, int n, int nskip)
public static void dVectorScale(DVector3 a, DVector3C d)
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 |