DSDP
Functions
DSDP Statistics for Data and Current Solution

Functions

int DSDPAddObjectiveConstant (DSDP dsdp, double c)
 Add a constant to the objective. More...
 
int DSDPCopyB (DSDP dsdp, double bb[], int m)
 Copies the variables b from solver into an array. More...
 
int DSDPGetDataNorms (DSDP dsdp, double dnorm[3])
 Copy the norms of the data C, A, and b into an array. More...
 
int DSDPGetDDObjective (DSDP dsdp, double *ddobj)
 Copy the objective value (DD). More...
 
int DSDPGetDimension (DSDP dsdp, double *n)
 Copy the dimension of the cones, or the number of constraints in (D). More...
 
int DSDPGetDObjective (DSDP dsdp, double *dobj)
 Copy the objective value (D). More...
 
int DSDPGetDualityGap (DSDP dsdp, double *dgap)
 Copy the difference between the objective values. More...
 
int DSDPGetFinalErrors (DSDP dsdp, double err[6])
 Copy six different error measurements into an array. More...
 
int DSDPGetMaxYElement (DSDP, double *)
 Copy the the infinity norm of the variables y. More...
 
int DSDPGetNumberOfVariables (DSDP dsdp, int *m)
 Copy the number of variables y. More...
 
int DSDPGetPnorm (DSDP dsdp, double *pnorm)
 Copy the proximity of the solution to the central path. More...
 
int DSDPGetPObjective (DSDP dsdp, double *pobj)
 Copy the objective value (P). More...
 
int DSDPGetPotential (DSDP dsdp, double *potential)
 Copy the potential of the current solution. More...
 
int DSDPGetPPObjective (DSDP dsdp, double *ppobj)
 Copy the objective value (PP). More...
 
int DSDPGetR (DSDP dsdp, double *res)
 Copy the infeasibility in (D), or the variable r in (DD). More...
 
int DSDPGetStepLengths (DSDP dsdp, double *pstep, double *dstep)
 Copy the step sizes in the current iteration. More...
 
int DSDPGetTraceX (DSDP dsdp, double *tracex)
 Copy the trace of the variables X in (P). More...
 
int DSDPGetYMaxNorm (DSDP dsdp, double *ynorm)
 Copy the the infinity norm of the variables y. More...
 
int DSDPSetR0 (DSDP dsdp, double res)
 Set an initial value for the variable r in (DD) More...
 
int DSDPSetY0 (DSDP dsdp, int i, double yi0)
 Set the initial values of variables y in (D). More...
 

Detailed Description

DSDP can provide information about the problem and its current solution in DSDP Standard Form.

#include dsdp5.h
Return values
0if successful

Function Documentation

int DSDPAddObjectiveConstant ( DSDP  dsdp,
double  c 
)

Add a constant to the objective.

Parameters
dsdpis the solver
cis the constant.
See also
DSDPGetDObjective()
Note
This parameter does not affect the performance of the solver. It can, however, make the standout output more consistent with the underlying application.

Definition at line 185 of file dsdpsetdata.c.

Referenced by DSDPSetOptions(), and mexFunction().

int DSDPCopyB ( DSDP  dsdp,
double  bb[],
int  m 
)

Copies the variables b from solver into an array.

Parameters
dsdpis the solver
bbis an array
mis the length of the array and the dimension of y
See also
DSDPSetDualObjective()

Definition at line 46 of file dsdpsetdata.c.

Referenced by DSDPPrintData().

int DSDPGetDataNorms ( DSDP  dsdp,
double  dnorm[3] 
)

Copy the norms of the data C, A, and b into an array.

Parameters
dsdpis the solver
dnormwill be set the norms the data C, A, and b.
See also
DSDPSetDualObjective()

Definition at line 621 of file dsdpsetdata.c.

Referenced by DSDPView(), mexFunction(), and ReadSDPAFile().

int DSDPGetDDObjective ( DSDP  dsdp,
double *  ddobj 
)

Copy the objective value (DD).

Parameters
dsdpis the solver
*ddobjwill be the objective value in (DD)
See also
DSDPGetPPObjective()
DSDPGetDObjective()
DSDPGetY()

Definition at line 523 of file dsdpsetdata.c.

Referenced by DSDPComputeX(), DSDPDefaultConvergence(), DSDPPrintStats(), and mexFunction().

int DSDPGetDimension ( DSDP  dsdp,
double *  n 
)

Copy the dimension of the cones, or the number of constraints in (D).

Parameters
dsdpthe solver
*nwill be set to the dimension (a whole number)
See also
DSDPGetNumberOfVariables()

Definition at line 661 of file dsdpsetdata.c.

Referenced by DSDPDefaultConvergence().

int DSDPGetDObjective ( DSDP  dsdp,
double *  dobj 
)

Copy the objective value (D).

Parameters
dsdpis the solver
*dobjwill be the objective value in (D)
See also
DSDPGetPObjective()
DSDPGetDDObjective()
DSDPGetY()

Definition at line 502 of file dsdpsetdata.c.

Referenced by DSDPGetFinalErrors(), mexFunction(), and ReadSDPAFile().

int DSDPGetDualityGap ( DSDP  dsdp,
double *  dgap 
)

Copy the difference between the objective values.

Parameters
dsdpis the solver
*dgapwill be set to the difference between the objective values in (PP) and (DD)
See also
DSDPGetDDObjective()
DSDPGetPPObjective()
DSDPGetDimension()

Definition at line 545 of file dsdpsetdata.c.

Referenced by DSDPDefaultConvergence().

int DSDPGetFinalErrors ( DSDP  dsdp,
double  err[6] 
)

Copy six different error measurements into an array.

Parameters
dsdpis the solver
errwill be set to the six error measurements
See also
DSDPGetDualityGap()
DSDPGetR()
DSDPGetPInfeasibility()

Definition at line 297 of file dsdpx.c.

Referenced by DSDPView(), mexFunction(), and ReadSDPAFile().

int DSDPGetMaxYElement ( DSDP  dsdp,
double *  ymax 
)

Copy the the infinity norm of the variables y.

Parameters
dsdpis the solver
*ymaxwill be set to the magnitude of the largest variable y.
See also
DSDPSetYBounds()

Definition at line 645 of file dsdpsetdata.c.

Referenced by DSDPCGSolve(), DSDPComputeDualStepDirections(), DSDPComputeX(), and DSDPSaveYForX().

int DSDPGetNumberOfVariables ( DSDP  dsdp,
int *  m 
)

Copy the number of variables y.

Parameters
dsdpthe solver
*mwill be set the number of variables y
See also
DSDPCreate()
DSDPGetDimension()

Definition at line 707 of file dsdpsetdata.c.

Referenced by DSDPCreateBCone(), DSDPCreateLPCone(), DSDPCreateLUBoundsCone(), DSDPDataTransposeTakeDown(), DSDPPrintData(), DSDPPrintSolution(), and DSDPView().

int DSDPGetPnorm ( DSDP  dsdp,
double *  pnorm 
)

Copy the proximity of the solution to the central path.

Parameters
dsdpis the solver
*pnormwill be set a norm of the gradient of the barrier function
See also
DSDPSetGapTolerance()

Definition at line 724 of file dsdpsetdata.c.

Referenced by DSDPDefaultConvergence(), DSDPPrintStats(), and mexFunction().

int DSDPGetPObjective ( DSDP  dsdp,
double *  pobj 
)

Copy the objective value (P).

Parameters
dsdpis the solver
*pobjwill be the objective value in (P)
See also
DSDPGetDObjective()
DSDPGetPPObjective()
DSDPComputeX()
Note
This value is correct only after calling DSDPComputeX()

Definition at line 232 of file dsdpx.c.

Referenced by DSDPGetFinalErrors(), mexFunction(), and ReadSDPAFile().

int DSDPGetPotential ( DSDP  dsdp,
double *  potential 
)

Copy the potential of the current solution.

Parameters
dsdpis the solver
*potentialwill be set to the value of the potential function
See also
DSDPSetPotentialParameter()
DSDPGetDDObjective()

Definition at line 803 of file dsdpsetdata.c.

Referenced by DSDPView().

int DSDPGetPPObjective ( DSDP  dsdp,
double *  ppobj 
)

Copy the objective value (PP).

Parameters
dsdpis the solver
*ppobjwill be the objective value in (PP)
See also
DSDPGetDDObjective()
DSDPGetPObjective()

Definition at line 479 of file dsdpsetdata.c.

Referenced by DSDPDefaultConvergence(), DSDPPrintStats(), and mexFunction().

int DSDPGetR ( DSDP  dsdp,
double *  res 
)

Copy the infeasibility in (D), or the variable r in (DD).

Parameters
dsdpis the solver
*reswill be set to the value of r.
See also
DSDPSetMaxIts()
DSDPSetGapTolerance()

Definition at line 601 of file dsdpsetdata.c.

Referenced by DSDPComputeX(), DSDPDefaultConvergence(), DSDPPrintSolution(), DSDPPrintStats(), and mexFunction().

int DSDPGetStepLengths ( DSDP  dsdp,
double *  pstep,
double *  dstep 
)

Copy the step sizes in the current iteration.

Parameters
dsdpis the solver
*pstepwill be set to the step size in (PP)
*dstepwill be set to the step size in (DD)
See also
DSDPSetStepTolerance()

Definition at line 742 of file dsdpsetdata.c.

Referenced by DSDPDefaultConvergence(), DSDPPrintStats(), and mexFunction().

int DSDPGetTraceX ( DSDP  dsdp,
double *  tracex 
)

Copy the trace of the variables X in (P).

For SDP blocks, this number corresponds to the trace of the blocks, and for LP, it corresponds the the sum of the variables x. If this number is near the penalty paramter, the problem (P) may be unbounded or the penalty parameter may have to be increased.

Parameters
dsdpis the solver
*tracexwill be set the trace of the variables in (P)
See also
DSDPSetPenaltyParameter()
DSDPComputeX()

Definition at line 278 of file dsdpx.c.

Referenced by DSDPView(), mexFunction(), and ReadSDPAFile().

int DSDPGetYMaxNorm ( DSDP  dsdp,
double *  ynorm 
)

Copy the the infinity norm of the variables y.

Parameters
dsdpis the solver
*ynormwill be set to the magnitude of the largest variable y.
See also
DSDPSetYBounds()

Definition at line 678 of file dsdpsetdata.c.

Referenced by DSDPGetMaxYElement(), DSDPView(), mexFunction(), and ReadSDPAFile().

int DSDPSetR0 ( DSDP  dsdp,
double  r0 
)

Set an initial value for the variable r in (DD)

A negative value asks DSDP to choose this parameter. The default heuristic generally uses very large values. Smaller values may significantly improve performance.

Parameters
dsdpis the solver
r0is the initial objective v (default: -1)
See also
DSDPSetPenaltyParameter()
DSDPGetR()
DSDPSetY0()

Definition at line 311 of file dsdpsetdata.c.

Referenced by DSDPSetDefaultParameters(), DSDPSetOptions(), MaxCut(), mexFunction(), ReadSDPAFile(), and SetThetaData().

int DSDPSetY0 ( DSDP  dsdp,
int  i,
double  yi0 
)

Set the initial values of variables y in (D).

To improve performance consider setting the initial values of the variables y in (D).

Parameters
dsdpis the solver
iis the variable number from 1 through m
yi0is the initial value af that variable
See also
DSDPGetY()
DSDPSetR0()
DSDPSetPotentialParameter()
DSDPReuseMatrix()

Definition at line 77 of file dsdpsetdata.c.

Referenced by MaxCut(), mexFunction(), ReadSDPAFile(), SetStableSetData(), and SetThetaData().