DSDP
Functions
dualimpl.c File Reference

Dual-scaling operations needed in the solver. More...

Go to the source code of this file.

Functions

int DSDPComputeDualityGap (DSDP dsdp, double mu, double *gap)
 Compute the current duality gap. More...
 
int DSDPComputeDY (DSDP dsdp, double mu, DSDPVec DY, double *pnorm)
 Compute the step direction. More...
 
int DSDPComputeNewY (DSDP dsdp, double beta, DSDPVec Y)
 Update the Y variables. More...
 
int DSDPComputeObjective (DSDP dsdp, DSDPVec Y, double *ddobj)
 Compute the objective function (DD). More...
 
int DSDPComputePDY (DSDP dsdp, double mu, DSDPVec DY, double *pnorm)
 Compute the step direction. More...
 
int DSDPComputePDY1 (DSDP dsdp, double mur, DSDPVec DY1)
 Compute an affine step direction dy1. More...
 
int DSDPComputePNorm (DSDP dsdp, double mu, DSDPVec DY, double *pnorm)
 Compute proximity to a point on the central path. More...
 
int DSDPComputePotential (DSDP dsdp, DSDPVec y, double logdet, double *potential)
 Compute the potential of the given point. More...
 
int DSDPComputePotential2 (DSDP dsdp, DSDPVec y, double mu, double logdet, double *potential)
 Compute the objective function plus the barrier function. More...
 
int DSDPComputePY (DSDP dsdp, double beta, DSDPVec PY)
 Compute PY = Y - beta DY for use in computing X. More...
 
int DSDPComputeRHS (DSDP dsdp, double mu, DSDPVec RHS)
 Compute the right-hand side of the linear system that determines the step direction. More...
 
int DSDPGetRR (DSDP dsdp, double *res)
 Get variable r. More...
 
int DSDPObjectiveGH (DSDP dsdp, DSDPSchurMat M, DSDPVec vrhs1)
 Compute gradient of dual objective. More...
 
int DSDPSetRR (DSDP dsdp, double res)
 Set variable r. More...
 
int DSDPSetY (DSDP dsdp, double beta, double logdet, DSDPVec ynew)
 Update the solver with these y variables. More...
 

Detailed Description

Dual-scaling operations needed in the solver.

Definition in file dualimpl.c.

Function Documentation

◆ DSDPComputeDualityGap()

int DSDPComputeDualityGap ( DSDP  dsdp,
double  mu,
double *  gap 
)

Compute the current duality gap.

Parameters
dsdpthe solver
mubarrier parameter
gapthe duality gap
See also
DSDPGetDualityGap()
DSDPGetPPObjective()

Definition at line 230 of file dualimpl.c.

◆ DSDPComputeDY()

int DSDPComputeDY ( DSDP  dsdp,
double  mu,
DSDPVec  DY,
double *  pnorm 
)

Compute the step direction.

Parameters
dsdpthe solver
mubarrier parameter
DYStep direction
pnormdistance to the target

Assuming the affine direction and centering direction have alread been computed, combine them with the appropriate barrier parameter.

See also
DSDPComputeRHS()

Definition at line 45 of file dualimpl.c.

Referenced by DSDPComputeDualityGap(), and DSDPResetY0().

◆ DSDPComputeNewY()

int DSDPComputeNewY ( DSDP  dsdp,
double  beta,
DSDPVec  Y 
)

Update the Y variables.

Parameters
dsdpthe solver
betastep length
Ythe new solution

Add a multiple of the step direction to the current solution.

Definition at line 125 of file dualimpl.c.

Referenced by DSDPYStepLineSearch().

◆ DSDPComputeObjective()

int DSDPComputeObjective ( DSDP  dsdp,
DSDPVec  Y,
double *  ddobj 
)

Compute the objective function (DD).

Parameters
dsdpis the solver
YCurrent variables
ddobjobjective value
See also
DSDPComputeNewY()
DSDPGetDDObjective()

Definition at line 21 of file dualimpl.c.

Referenced by DSDPComputePotential(), DSDPComputePotential2(), and DSDPInitializeVariables().

◆ DSDPComputePDY()

int DSDPComputePDY ( DSDP  dsdp,
double  mu,
DSDPVec  DY,
double *  pnorm 
)

Compute the step direction.

Parameters
dsdpthe solver
mubarrier parameter
DYStep direction
pnormdistance to the target

Assuming the affine direction and centering direction have alread been computed, combine them with the appropriate barrier parameter.

See also
DSDPComputeRHS()
DSDPComputeDY()

Definition at line 77 of file dualimpl.c.

Referenced by DSDPChooseBarrierParameter().

◆ DSDPComputePDY1()

int DSDPComputePDY1 ( DSDP  dsdp,
double  mur,
DSDPVec  DY1 
)

Compute an affine step direction dy1.

Parameters
dsdpthe solver
murreciprocal of barrier parameter
DY1Step direction

Assuming the affine direction has alread been computed, scale it.

See also
DSDPComputeDY()

Definition at line 105 of file dualimpl.c.

Referenced by DSDPChooseBarrierParameter().

◆ DSDPComputePNorm()

int DSDPComputePNorm ( DSDP  dsdp,
double  mu,
DSDPVec  DY,
double *  pnorm 
)

Compute proximity to a point on the central path.

Parameters
dsdpthe solver
mubarrier parameter
DYNewton step direction
pnormthe norm
See also
DSDPComputeDY()

Definition at line 200 of file dualimpl.c.

◆ DSDPComputePotential()

int DSDPComputePotential ( DSDP  dsdp,
DSDPVec  y,
double  logdet,
double *  potential 
)

Compute the potential of the given point.

Parameters
dsdpthe solver
yvariables
logdetlogarithmic barrier function of the given point
potentialreturn the potential of the given point.
See also
DSDPSetPotentialParameter()

Definition at line 261 of file dualimpl.c.

Referenced by DSDPYStepLineSearch().

◆ DSDPComputePotential2()

int DSDPComputePotential2 ( DSDP  dsdp,
DSDPVec  y,
double  mu,
double  logdet,
double *  potential 
)

Compute the objective function plus the barrier function.

Parameters
dsdpthe solver
yvariables
mubarrier function
logdetlogarithmic barrier function of the given point
potentialreturn the potential of the given point.\
See also
DSDPGetBarrierParameter()

Definition at line 287 of file dualimpl.c.

Referenced by DSDPYStepLineSearch2().

◆ DSDPComputePY()

int DSDPComputePY ( DSDP  dsdp,
double  beta,
DSDPVec  PY 
)

Compute PY = Y - beta DY for use in computing X.

Parameters
dsdpthe solver
betastep length
PYthe new value
See also
DSDPComputeNewY()

Definition at line 150 of file dualimpl.c.

Referenced by DSDPChooseBarrierParameter().

◆ DSDPComputeRHS()

int DSDPComputeRHS ( DSDP  dsdp,
double  mu,
DSDPVec  RHS 
)

Compute the right-hand side of the linear system that determines the step direction.

Parameters
dsdpthe solver
mubarrier parameter
RHSright-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 $ b - mu * A(S^{-1}) $

See also
DSDPComputeDY()

Definition at line 177 of file dualimpl.c.

Referenced by DSDPComputeDY(), DSDPComputePDY(), and DSDPComputePNorm().

◆ DSDPGetRR()

int DSDPGetRR ( DSDP  dsdp,
double *  res 
)

Get variable r.

Parameters
dsdpsolver
*resset variable r

Definition at line 361 of file dualimpl.c.

Referenced by DSDPGetR(), and DSDPInitializeVariables().

◆ DSDPObjectiveGH()

int DSDPObjectiveGH ( DSDP  dsdp,
DSDPSchurMat  M,
DSDPVec  vrhs1 
)

Compute gradient of dual objective.

Parameters
dsdpsolver
MSchur matrix.
vrhs1gradient vector

Definition at line 381 of file dualimpl.c.

◆ DSDPSetRR()

int DSDPSetRR ( DSDP  dsdp,
double  res 
)

Set variable r.

Parameters
dsdpsolver
resvariable r

Definition at line 345 of file dualimpl.c.

Referenced by DSDPSetR0().

◆ DSDPSetY()

int DSDPSetY ( DSDP  dsdp,
double  beta,
double  logdet,
DSDPVec  ynew 
)

Update the solver with these y variables.

Parameters
dsdpthe solver
betamost recent step length
logdetlogarithmic barrier function of the given point
ynewcurrent solution.

Definition at line 309 of file dualimpl.c.

Referenced by DSDPYStepLineSearch().