public abstract class AbstractKKTSolver extends Object
Modifier and Type | Field and Description |
---|---|
protected boolean |
checkKKTSolutionAcc
Check if the KTT accuracy is preserved
|
static double |
DEFAULT_SCALAR
Default scalar
|
protected double |
defaultScalar
Default scalar
|
protected RealVector |
g
Vector g
|
protected RealVector |
h
Vector h
|
protected RealMatrix |
matA
Matrix A
|
protected RealMatrix |
matAT
Transpose A matrix
|
protected RealMatrix |
matH
Matrix H
|
protected double |
toleranceKKT
KTT tolerance
|
Constructor and Description |
---|
AbstractKKTSolver() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
checkKKTSolutionAccuracy(RealVector v,
RealVector w)
Check the solution of the system
KKT.x = b
against the scaled residual
beta < gamma,
where gamma is a parameter chosen by the user and beta is
the scaled residual,
beta = ||KKT.x-b||_oo/( ||KKT||_oo .
|
void |
setAMatrix(RealMatrix aMatrix)
Set the A matrix
|
void |
setCheckKKTSolutionAccuracy(boolean b)
Set if the KTT solution accuracy is preserved or not
|
void |
setGVector(RealVector gVector)
Set the g vector
|
void |
setHMatrix(RealMatrix hMatrix)
Set the H matrix
|
void |
setHVector(RealVector hVector)
Set the h vector
|
void |
setToleranceKKT(double tolerance)
Acceptable tolerance for system resolution.
|
abstract RealVector[] |
solve()
Returns two vectors v and w solutions of the KKT system.
|
protected RealVector[] |
solveAugmentedKKT()
Solve the augmented KTT system
|
public static final double DEFAULT_SCALAR
protected RealMatrix matH
protected RealMatrix matA
protected RealMatrix matAT
protected RealVector g
protected RealVector h
protected double toleranceKKT
protected boolean checkKKTSolutionAcc
protected double defaultScalar
public abstract RealVector[] solve() throws PatriusException
PatriusException
- if an error occurspublic void setHMatrix(RealMatrix hMatrix)
hMatrix
- matrix Hpublic void setAMatrix(RealMatrix aMatrix)
aMatrix
- matrix Apublic void setGVector(RealVector gVector)
gVector
- vector Gpublic void setHVector(RealVector hVector)
hVector
- vector Hpublic void setToleranceKKT(double tolerance)
tolerance
- KTT tolerancepublic void setCheckKKTSolutionAccuracy(boolean b)
b
- true or falseprotected RealVector[] solveAugmentedKKT() throws PatriusException
PatriusException
- if an error occursprotected boolean checkKKTSolutionAccuracy(RealVector v, RealVector w)
v
- vector Vw
- vector WCopyright © 2023 CNES. All rights reserved.