DSDP
|
Internal data structure for the DSDP solver. More...
Go to the source code of this file.
Data Structures | |
struct | DSDP_C |
Internal structures for the DSDP solver. More... | |
Typedefs | |
typedef struct RDCone * | RRCone |
Cone with nonnegativity on variable r. More... | |
typedef struct LUBounds_C * | YBoundCone |
Cone with bounds on variables y. More... | |
Functions | |
int | BoundYConeGetBounds (YBoundCone, double *, double *) |
Get bounds on the variables. More... | |
int | BoundYConeSetBounds (YBoundCone, double, double) |
Set bounds on the variables. More... | |
int | DSDPCGSolve (DSDP, DSDPSchurMat, DSDPVec, DSDPVec, double, DSDPTruth *) |
Apply CG to solve for the step directions. More... | |
int | DSDPCheckConvergence (DSDP, DSDPTerminationReason *) |
Check for convergence and monitor solution. More... | |
int | DSDPComputeANorm2 (DSDP, DSDPVec) |
Compute norm of A and C. More... | |
int | DSDPComputeDataNorms (DSDP) |
Compute norms of A,C, and b. More... | |
int | DSDPComputeDualityGap (DSDP, double, double *) |
Compute the current duality gap. More... | |
int | DSDPComputeDualStepDirections (DSDP) |
Compute the step direction by computing a linear system and solving it. More... | |
int | DSDPComputeDY (DSDP, double, DSDPVec, double *) |
Compute the step direction. More... | |
int | DSDPComputeG (DSDP, DSDPVec, DSDPVec, DSDPVec) |
Compute the gradient of the barrier for each cone. More... | |
int | DSDPComputeHessian (DSDP, DSDPSchurMat, DSDPVec, DSDPVec) |
Compute the Schur complement, or Gram, matrix for each cone. More... | |
int | DSDPComputeLogSDeterminant (DSDP, double *) |
Compute the logarithmic barrier function for the dual varialbe S. More... | |
int | DSDPComputeMaxStepLength (DSDP, DSDPVec, DSDPDualFactorMatrix, double *) |
Compute the maximum step length for the given step direction. More... | |
int | DSDPComputeNewY (DSDP, double, DSDPVec) |
Update the Y variables. More... | |
int | DSDPComputeObjective (DSDP, DSDPVec, double *) |
Compute the objective function (DD). More... | |
int | DSDPComputePDY (DSDP, double, DSDPVec, double *) |
Compute the step direction. More... | |
int | DSDPComputePDY1 (DSDP, double, DSDPVec) |
Compute an affine step direction dy1. More... | |
int | DSDPComputePNorm (DSDP, double, DSDPVec, double *) |
Compute proximity to a point on the central path. More... | |
int | DSDPComputePotential (DSDP, DSDPVec, double, double *) |
Compute the potential of the given point. More... | |
int | DSDPComputePotential2 (DSDP, DSDPVec, double, double, double *) |
Compute the objective function plus the barrier function. More... | |
int | DSDPComputePY (DSDP, double, DSDPVec) |
Compute PY = Y - beta DY for use in computing X. More... | |
int | DSDPComputeRHS (DSDP, double, DSDPVec) |
Compute the right-hand side of the linear system that determines the step direction. More... | |
int | DSDPComputeSS (DSDP, DSDPVec, DSDPDualFactorMatrix, DSDPTruth *) |
Compute the dual variables S in each cone. More... | |
int | DSDPComputeXVariables (DSDP, double, DSDPVec, DSDPVec, DSDPVec, double *) |
Compute the X variables in each cone. More... | |
int | DSDPCreateLUBoundsCone (DSDP, YBoundCone *) |
Create bounds cone. More... | |
int | DSDPDefaultConvergence (DSDP, void *) |
Check for Convergence. More... | |
int | DSDPDestroyCones (DSDP) |
Each cone shoudl free its data structures. More... | |
int | DSDPGetConicDimension (DSDP, double *) |
Get the total dimension of the cones. More... | |
int | DSDPGetConvergenceMonitor (DSDP, ConvergenceMonitor **) |
Get the structure containing convergence parameters. More... | |
int | DSDPGetMaxYElement (DSDP, double *) |
Copy the the infinity norm of the variables y. More... | |
int | DSDPGetRR (DSDP, double *) |
Get variable r. More... | |
int | DSDPHessianMultiplyAdd (DSDP, DSDPVec, DSDPVec) |
Add the product of Schur matrix with v. More... | |
int | DSDPInitializeVariables (DSDP) |
Initialize variables and factor S. More... | |
int | DSDPInvertS (DSDP) |
Invert the S variables in each cone. More... | |
int | DSDPMonitorCones (DSDP, int) |
This routine is called once per iteration. More... | |
int | DSDPObjectiveGH (DSDP, DSDPSchurMat, DSDPVec) |
Compute gradient of dual objective. More... | |
int | DSDPPassXVectors (DSDP, double, DSDPVec, DSDPVec) |
Pass the information needed to compute the variables X in each cone but do not compute X. More... | |
int | DSDPPrintStats (DSDP, void *) |
Print statistics about the current solution to standard output. More... | |
int | DSDPSaveYForX (DSDP, double, double) |
Save the current solution for later computation of X. More... | |
int | DSDPScaleData (DSDP) |
Scale the matrix C. More... | |
int | DSDPSchurSparsity (DSDP, int, int[], int) |
Each cone should print its state. More... | |
int | DSDPSetCone (DSDP, DSDPCone) |
Pass a cone to the DSDP solver. More... | |
int | DSDPSetDefaultMonitors (DSDP) |
Set convergence monitor. More... | |
int | DSDPSetDefaultParameters (DSDP) |
Set default parameters. More... | |
int | DSDPSetDefaultStatistics (DSDP) |
Set default statistics. More... | |
int | DSDPSetRR (DSDP, double) |
Set variable r. More... | |
int | DSDPSetUpCones (DSDP) |
Each cone should factor data or allocate internal data structures. More... | |
int | DSDPSetUpCones2 (DSDP, DSDPVec, DSDPSchurMat) |
Each cone should allocate its data structures . More... | |
int | DSDPSetY (DSDP, double, double, DSDPVec) |
Update the solver with these y variables. More... | |
int | DSDPSolveDynamicRho (DSDP) |
Apply dual-scaling algorithm. More... | |
int | DSDPTakeDown (DSDP) |
Destroy internal data structures. More... | |
int | DSDPViewCones (DSDP) |
Each cone should print its state. More... | |
Internal data structure for the DSDP solver.
Definition in file dsdp.h.
typedef struct RDCone * RRCone |
struct LUBounds_C * YBoundCone |
int BoundYConeGetBounds | ( | LUBounds | lucone, |
double * | lb, | ||
double * | ub | ||
) |
Get bounds on the variables.
lucone | cone of bounds. |
lb | lower bound on variables. |
ub | upper bound |
Definition at line 532 of file allbounds.c.
Referenced by DSDPGetYBounds().
int BoundYConeSetBounds | ( | LUBounds | lucone, |
double | lb, | ||
double | ub | ||
) |
Set bounds on the variables.
lucone | cone of bounds. |
lb | lower bound on variables. |
ub | upper bound |
Definition at line 512 of file allbounds.c.
Referenced by DSDPCreateLUBoundsCone(), and DSDPSetYBounds().
int DSDPCGSolve | ( | DSDP | dsdp, |
DSDPSchurMat | MM, | ||
DSDPVec | RHS, | ||
DSDPVec | X, | ||
double | cgtol, | ||
DSDPTruth * | success | ||
) |
Apply CG to solve for the step directions.
dsdp | the solver |
MM | matrix |
RHS | right-hand side |
X | solution |
cgtol | accuracy |
success | output whether a solution of suitable accuracy was found |
Definition at line 239 of file dsdpcg.c.
Referenced by DSDPComputeDualStepDirections().
int DSDPCheckConvergence | ( | DSDP | dsdp, |
DSDPTerminationReason * | reason | ||
) |
Check for convergence and monitor solution.
dsdp | solver |
reason | termination reason |
Definition at line 384 of file dsdpsetup.c.
Compute norm of A and C.
dsdp | the solver |
Anorm2 | norm of data corresponding to each variable y. |
Definition at line 246 of file dsdpcops.c.
Referenced by DSDPComputeDataNorms().
int DSDPComputeDataNorms | ( | DSDP | dsdp | ) |
Compute norms of A,C, and b.
dsdp | the solver |
Definition at line 283 of file dsdpsetup.c.
Referenced by DSDPGetDataNorms().
int DSDPComputeDualityGap | ( | DSDP | dsdp, |
double | mu, | ||
double * | gap | ||
) |
Compute the current duality gap.
dsdp | the solver |
mu | barrier parameter |
gap | the duality gap |
Definition at line 230 of file dualimpl.c.
int DSDPComputeDualStepDirections | ( | DSDP | dsdp | ) |
Compute the step direction by computing a linear system and solving it.
dsdp | the solver |
DSDP first attempts unpreconditioned CG to the matrix. Once the number of iterations becomes too large, it swithes a CG preconditioned by the Cholesky factorization. Usually only one iteration of the preconditioned CG is necessary, but solutions with large norms and very precise solutions may require additional iterations.
Compute the step direction.
dsdp | the solver |
mu | barrier parameter |
DY | Step direction |
pnorm | distance to the target |
Assuming the affine direction and centering direction have alread been computed, combine them with the appropriate barrier parameter.
Definition at line 45 of file dualimpl.c.
Referenced by DSDPComputeDualityGap(), and DSDPResetY0().
Compute the gradient of the barrier for each cone.
dsdp | the solver |
vt | scaling for each element in the next two vectors |
vrhs1 | scaled gradient of the objective function |
vrhs2 | scaled gradient of the barrier function |
Definition at line 215 of file dsdpcops.c.
Referenced by DSDPComputeDualStepDirections().
int DSDPComputeHessian | ( | DSDP | dsdp, |
DSDPSchurMat | M, | ||
DSDPVec | vrhs1, | ||
DSDPVec | vrhs2 | ||
) |
Compute the Schur complement, or Gram, matrix for each cone.
dsdp | the solver |
M | matrix |
vrhs1 | gradient of objective (b) |
vrhs2 | gradient of barrier |
Definition at line 142 of file dsdpcops.c.
Referenced by DSDPComputeDualStepDirections().
int DSDPComputeLogSDeterminant | ( | DSDP | dsdp, |
double * | logdet | ||
) |
Compute the logarithmic barrier function for the dual varialbe S.
dsdp | the solver |
logdet | evaluated barrier function |
Definition at line 495 of file dsdpcops.c.
Referenced by DSDPYStepLineSearch().
int DSDPComputeMaxStepLength | ( | DSDP | dsdp, |
DSDPVec | DY, | ||
DSDPDualFactorMatrix | flag, | ||
double * | maxsteplength | ||
) |
Compute the maximum step length for the given step direction.
dsdp | the solver |
DY | step direction |
flag | primal or dual structure |
maxsteplength | the minumum of maximums on each cone. |
Definition at line 336 of file dsdpcops.c.
Referenced by DSDPChooseBarrierParameter(), DSDPYStepLineSearch(), and DSDPYStepLineSearch2().
Update the Y variables.
dsdp | the solver |
beta | step length |
Y | the new solution |
Add a multiple of the step direction to the current solution.
Definition at line 125 of file dualimpl.c.
Referenced by DSDPYStepLineSearch().
Compute the objective function (DD).
dsdp | is the solver |
Y | Current variables |
ddobj | objective value |
Definition at line 21 of file dualimpl.c.
Referenced by DSDPComputePotential(), DSDPComputePotential2(), and DSDPInitializeVariables().
Compute the step direction.
dsdp | the solver |
mu | barrier parameter |
DY | Step direction |
pnorm | distance to the target |
Assuming the affine direction and centering direction have alread been computed, combine them with the appropriate barrier parameter.
Definition at line 77 of file dualimpl.c.
Referenced by DSDPChooseBarrierParameter().
Compute an affine step direction dy1.
dsdp | the solver |
mur | reciprocal of barrier parameter |
DY1 | Step direction |
Assuming the affine direction has alread been computed, scale it.
Definition at line 105 of file dualimpl.c.
Referenced by DSDPChooseBarrierParameter().
Compute proximity to a point on the central path.
dsdp | the solver |
mu | barrier parameter |
DY | Newton step direction |
pnorm | the norm |
Definition at line 200 of file dualimpl.c.
Compute the potential of the given point.
dsdp | the solver |
y | variables |
logdet | logarithmic barrier function of the given point |
potential | return the potential of the given point. |
Definition at line 261 of file dualimpl.c.
Referenced by DSDPYStepLineSearch().
Compute the objective function plus the barrier function.
dsdp | the solver |
y | variables |
mu | barrier function |
logdet | logarithmic barrier function of the given point |
potential | return the potential of the given point.\ |
Definition at line 287 of file dualimpl.c.
Referenced by DSDPYStepLineSearch2().
Compute PY = Y - beta DY for use in computing X.
dsdp | the solver |
beta | step length |
PY | the new value |
Definition at line 150 of file dualimpl.c.
Referenced by DSDPChooseBarrierParameter().
Compute the right-hand side of the linear system that determines the step direction.
dsdp | the solver |
mu | barrier parameter |
RHS | right-hand side direction |
Assuming that the gradient of the objective and the gradient of the barrier have already been computed, combine them with the appropriate barrier parameter.
This vector is basically
Definition at line 177 of file dualimpl.c.
Referenced by DSDPComputeDY(), DSDPComputePDY(), and DSDPComputePNorm().
int DSDPComputeSS | ( | DSDP | dsdp, |
DSDPVec | Y, | ||
DSDPDualFactorMatrix | flag, | ||
DSDPTruth * | ispsdefinite | ||
) |
Compute the dual variables S in each cone.
dsdp | the solver |
Y | variables |
flag | primal or dual structure |
ispsdefinite | DSDP_TRUE if a member of the cone, DSDP_FALSE otherwise. |
Definition at line 272 of file dsdpcops.c.
Referenced by DSDPChooseBarrierParameter(), DSDPComputeAndFactorS(), DSDPInitializeVariables(), and DSDPYStepLineSearch().
int DSDPComputeXVariables | ( | DSDP | dsdp, |
double | xmakermu, | ||
DSDPVec | xmakery, | ||
DSDPVec | xmakerdy, | ||
DSDPVec | AX, | ||
double * | tracexs | ||
) |
Compute the X variables in each cone.
dsdp | the solver |
xmakermu | barrier parameter |
xmakery | input y variables |
xmakerdy | input step direction |
AX | output product of X and the data |
tracexs | ouput inner product of X and S. |
Definition at line 654 of file dsdpcops.c.
int DSDPCreateLUBoundsCone | ( | DSDP | dsdp, |
LUBounds * | dspcone | ||
) |
Create bounds cone.
dsdp | the solver |
dspcone | cone of bounds. |
Definition at line 566 of file allbounds.c.
int DSDPDestroyCones | ( | DSDP | dsdp | ) |
Each cone shoudl free its data structures.
dsdp | the solver |
Definition at line 107 of file dsdpcops.c.
int DSDPGetConicDimension | ( | DSDP | dsdp, |
double * | n | ||
) |
Get the total dimension of the cones.
dsdp | the solver |
n | dimension |
Definition at line 401 of file dsdpcops.c.
Referenced by DSDPCheckConvergence(), and DSDPGetDimension().
int DSDPGetConvergenceMonitor | ( | DSDP | dsdp, |
ConvergenceMonitor ** | ctx | ||
) |
Get the structure containing convergence parameters.
dsdp | the solver |
*ctx | will point to the structure. |
Definition at line 268 of file dsdpsetup.c.
int DSDPGetRR | ( | DSDP | dsdp, |
double * | res | ||
) |
Get variable r.
dsdp | solver |
*res | set variable r |
Definition at line 361 of file dualimpl.c.
Referenced by DSDPGetR(), and DSDPInitializeVariables().
Add the product of Schur matrix with v.
dsdp | the solver |
v | input vector. |
vv | product gradient of barrier |
Definition at line 188 of file dsdpcops.c.
int DSDPInitializeVariables | ( | DSDP | dsdp | ) |
int DSDPInvertS | ( | DSDP | dsdp | ) |
Invert the S variables in each cone.
dsdp | the solver |
Definition at line 307 of file dsdpcops.c.
Referenced by DSDPComputeDualStepDirections().
int DSDPMonitorCones | ( | DSDP | dsdp, |
int | tag | ||
) |
This routine is called once per iteration.
dsdp | the solver |
tag | allow for multiple monitors |
The cone can print statistics, visualize data, terminate solver, or whatever it wants.
Definition at line 450 of file dsdpcops.c.
int DSDPObjectiveGH | ( | DSDP | dsdp, |
DSDPSchurMat | M, | ||
DSDPVec | vrhs1 | ||
) |
Compute gradient of dual objective.
dsdp | solver |
M | Schur matrix. |
vrhs1 | gradient vector |
Definition at line 381 of file dualimpl.c.
Pass the information needed to compute the variables X in each cone but do not compute X.
dsdp | the solver |
mu | barrier parameter |
Y | input y variables |
DY | input step direction |
Definition at line 378 of file dsdpcops.c.
int DSDPSaveYForX | ( | DSDP | dsdp, |
double | mu, | ||
double | pstep | ||
) |
Save the current solution for later computation of X.
dsdp | the solver |
mu | barrier function |
pstep | primal step length, hopefully equals 1 |
Definition at line 149 of file dsdpx.c.
Referenced by DSDPChooseBarrierParameter().
int DSDPScaleData | ( | DSDP | dsdp | ) |
int DSDPSchurSparsity | ( | DSDP | dsdp, |
int | row, | ||
int | rnnz[], | ||
int | m | ||
) |
Each cone should print its state.
dsdp | the solver |
row | corresponding to the variable y. |
rnnz | nonzeros indicate a nonzero in the Shur matrix at that column. |
m | size of Schur matrix and the arrow. |
Definition at line 474 of file dsdpcops.c.
Pass a cone to the DSDP solver.
dsdp | the solver |
tcone | a cone object. |
Definition at line 522 of file dsdpcops.c.
int DSDPSetDefaultMonitors | ( | DSDP | dsdp | ) |
int DSDPSetDefaultParameters | ( | DSDP | dsdp | ) |
int DSDPSetDefaultStatistics | ( | DSDP | dsdp | ) |
int DSDPSetRR | ( | DSDP | dsdp, |
double | res | ||
) |
Set variable r.
dsdp | solver |
res | variable r |
Definition at line 345 of file dualimpl.c.
Referenced by DSDPSetR0().
int DSDPSetUpCones | ( | DSDP | dsdp | ) |
Each cone should factor data or allocate internal data structures.
dsdp | the solver |
Definition at line 58 of file dsdpcops.c.
int DSDPSetUpCones2 | ( | DSDP | dsdp, |
DSDPVec | yy0, | ||
DSDPSchurMat | M | ||
) |
Each cone should allocate its data structures .
dsdp | the solver |
yy0 | variable vector |
M | Shur Matrix |
Definition at line 84 of file dsdpcops.c.
Update the solver with these y variables.
dsdp | the solver |
beta | most recent step length |
logdet | logarithmic barrier function of the given point |
ynew | current solution. |
Definition at line 309 of file dualimpl.c.
Referenced by DSDPYStepLineSearch().
int DSDPSolveDynamicRho | ( | DSDP | dsdp | ) |
int DSDPTakeDown | ( | DSDP | dsdp | ) |
Destroy internal data structures.
dsdp | solver |
Definition at line 428 of file dsdpsetup.c.
Referenced by DSDPDestroy().
int DSDPViewCones | ( | DSDP | dsdp | ) |
Each cone should print its state.
dsdp | the solver |
Definition at line 424 of file dsdpcops.c.