|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmaspack.solvers.KKTSolver
public class KKTSolver
Nested Class Summary | |
---|---|
static class |
KKTSolver.Status
Described whether or not a solution was found. |
Constructor Summary | |
---|---|
KKTSolver()
|
Method Summary | |
---|---|
void |
analyze(SparseBlockMatrix M,
int sizeM,
SparseBlockMatrix GT,
int typeM)
Performs symbolic analysis on the equality portion of the KKT system defined by matrices M and GT. |
void |
analyze(VectorNd Mdiag,
int sizeM,
SparseBlockMatrix GT)
Performs symbolic analysis on the equality portion of the KKT system defined by a diagonal M matrix and G. |
void |
analyzeMG(java.lang.Object M,
int sizeM,
SparseBlockMatrix GT,
VectorNd Rg,
int typeM)
Performs symbolic analysis on the equality portion of the KKT system defined by M and G. |
void |
dispose()
|
void |
factor(SparseBlockMatrix M,
int sizeM,
SparseBlockMatrix GT,
VectorNd Rg)
Does a numeric factorization of a KKT system containg only equality constraints. |
void |
factor(SparseBlockMatrix M,
int sizeM,
SparseBlockMatrix GT,
VectorNd Rg,
SparseBlockMatrix NT,
VectorNd Rn)
Does a numeric factorization of a KKT system containing equality and inequality constraints. |
void |
factor(SparseBlockMatrix M,
int sizeM,
SparseBlockMatrix GT,
VectorNd Rg,
SparseBlockMatrix NT,
VectorNd Rn,
SparseBlockMatrix DT)
Does a numeric factorization of a KKT system containg equality, inequality, and friction constraints. |
void |
factor(VectorNd Mdiag,
int sizeM,
SparseBlockMatrix GT,
VectorNd Rg)
Does a numeric factorization of a KKT system containg only equality constraints. |
void |
factor(VectorNd Mdiag,
int sizeM,
SparseBlockMatrix GT,
VectorNd Rg,
SparseBlockMatrix NT,
VectorNd Rn)
Does a numeric factorization of a KKT system containg equality and inequality constraints. |
KKTSolver.Status |
factorAndSolve(SparseBlockMatrix M,
int sizeM,
SparseBlockMatrix GT,
VectorNd Rg,
VectorNd vel,
VectorNd lam,
VectorNd bm,
VectorNd bg,
int tolExp)
Does a numeric factorization of a KKT system containg only equality constraints. |
void |
finalize()
|
int |
getNumNonZerosInFactors()
|
boolean[] |
getZBasic()
|
int[] |
getZState()
|
boolean |
isFactored()
|
boolean |
lastSolveWasIterative()
|
void |
printLinearProblem(java.io.PrintWriter pw,
VectorNd bf,
VectorNd bg,
java.lang.String fmtStr,
boolean omitLowerRightDiagonal)
|
void |
printStructure(java.io.PrintStream ps)
|
void |
printValues(java.io.PrintStream ps,
java.lang.String fmtStr)
|
void |
printValues(java.io.PrintStream ps,
java.lang.String fmtStr,
double[] vals,
int[] rowOffs,
int[] colIdxs,
int size,
int numVals)
|
KKTSolver.Status |
solve(VectorNd vel,
VectorNd lam,
VectorNd bm,
VectorNd bg)
Solves the equality parts of a factored system. |
KKTSolver.Status |
solve(VectorNd vel,
VectorNd lam,
VectorNd the,
VectorNd bm,
VectorNd bg,
VectorNd bn)
Solves the equality and inequality parts of a factored system. |
KKTSolver.Status |
solve(VectorNd vel,
VectorNd lam,
VectorNd the,
VectorNd phi,
VectorNd bm,
VectorNd bg,
VectorNd bn,
VectorNd bd,
VectorNd flim)
Solves the equality, inequality, and frictional parts of a factored system. |
void |
solveMG(VectorNd x,
VectorNd b)
Solve the system |
void |
solveMG(VectorNd xm,
VectorNd xg,
VectorNd bm,
VectorNd bg)
Solve the system |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public KKTSolver()
Method Detail |
---|
public void analyzeMG(java.lang.Object M, int sizeM, SparseBlockMatrix GT, VectorNd Rg, int typeM)
public void analyze(VectorNd Mdiag, int sizeM, SparseBlockMatrix GT)
Mdiag
- vector defining the diagonal entries of MsizeM
- size of MGT
- Sparse matrix defining the transpose of Gpublic void analyze(SparseBlockMatrix M, int sizeM, SparseBlockMatrix GT, int typeM)
M
- Sparse matrix defining MsizeM
- size of MGT
- Sparse matrix defining the transpose of GtypeM
- describes the type of M, to be used in determining
how the resulting KKT system should be factored. Should be
either Matrix.INDEFINITE
, Matrix.SYMMETRIC
, or
Matrix.SPD
.public void factor(SparseBlockMatrix M, int sizeM, SparseBlockMatrix GT, VectorNd Rg)
public void factor(SparseBlockMatrix M, int sizeM, SparseBlockMatrix GT, VectorNd Rg, SparseBlockMatrix NT, VectorNd Rn)
public void factor(SparseBlockMatrix M, int sizeM, SparseBlockMatrix GT, VectorNd Rg, SparseBlockMatrix NT, VectorNd Rn, SparseBlockMatrix DT)
public void factor(VectorNd Mdiag, int sizeM, SparseBlockMatrix GT, VectorNd Rg)
public void factor(VectorNd Mdiag, int sizeM, SparseBlockMatrix GT, VectorNd Rg, SparseBlockMatrix NT, VectorNd Rn)
public boolean isFactored()
public KKTSolver.Status solve(VectorNd vel, VectorNd lam, VectorNd the, VectorNd phi, VectorNd bm, VectorNd bg, VectorNd bn, VectorNd bd, VectorNd flim)
public KKTSolver.Status solve(VectorNd vel, VectorNd lam, VectorNd the, VectorNd bm, VectorNd bg, VectorNd bn)
public KKTSolver.Status solve(VectorNd vel, VectorNd lam, VectorNd bm, VectorNd bg)
public KKTSolver.Status factorAndSolve(SparseBlockMatrix M, int sizeM, SparseBlockMatrix GT, VectorNd Rg, VectorNd vel, VectorNd lam, VectorNd bm, VectorNd bg, int tolExp)
public boolean[] getZBasic()
public int[] getZState()
public void printStructure(java.io.PrintStream ps)
public void printValues(java.io.PrintStream ps, java.lang.String fmtStr)
public void printLinearProblem(java.io.PrintWriter pw, VectorNd bf, VectorNd bg, java.lang.String fmtStr, boolean omitLowerRightDiagonal) throws java.io.IOException
java.io.IOException
public void printValues(java.io.PrintStream ps, java.lang.String fmtStr, double[] vals, int[] rowOffs, int[] colIdxs, int size, int numVals)
public void solveMG(VectorNd x, VectorNd b)
[ M -G ] [ x ] [ b ] [ ] [ ] = [ ] [ G Rg ] [lam] [ a ]using the factorization of
[ M G ] [ ] [ G -Rg ]This requires negating the value of lam from the original solve
public void solveMG(VectorNd xm, VectorNd xg, VectorNd bm, VectorNd bg)
[ M -G ] [ x ] [ b ] [ ] [ ] = [ ] [ G Rg ] [lam] [ a ]using the factorization of
[ M G ] [ ] [ G -Rg ]This requires negating the value of lam from the original solve
public int getNumNonZerosInFactors()
public boolean lastSolveWasIterative()
public void dispose()
public void finalize()
finalize
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |