DSDP
|
The public interface between the cones and the solver. More...
Go to the source code of this file.
Typedefs | |
typedef struct DSDPCone_C | DSDPCone |
This object holds the data of a SDP, LP, or other cone. Its structure is opaque to the DSDP Solver, but it must implement the interface below and provide a structure of function pointers. More... | |
Functions | |
int | DSDPConeANorm2 (DSDPCone, DSDPVec) |
Add square of 2-norm of data correponding to each variable y. More... | |
int | DSDPConeComputeHessian (DSDPCone, double, DSDPSchurMat, DSDPVec, DSDPVec) |
Compute Hessian and gradient of barrier function. More... | |
int | DSDPConeComputeLogSDeterminant (DSDPCone, double *, double *) |
Evaluate logrithmic barrier function. More... | |
int | DSDPConeComputeMaxStepLength (DSDPCone, DSDPVec, DSDPDualFactorMatrix, double *) |
Determine distance to the edge of the cone. More... | |
int | DSDPConeComputeRHS (DSDPCone, double, DSDPVec, DSDPVec, DSDPVec) |
Compute gradient of barrier function. More... | |
int | DSDPConeComputeS (DSDPCone, DSDPVec, DSDPDualFactorMatrix, DSDPTruth *) |
Given y, compute S and determine whether its in the cone. More... | |
int | DSDPConeComputeX (DSDPCone, double, DSDPVec, DSDPVec, DSDPVec, double *) |
Given y,dy, and mu, construct X and add its inner product with the data and S. More... | |
int | DSDPConeDestroy (DSDPCone *) |
Free the internal memory of the cone. More... | |
int | DSDPConeGetDimension (DSDPCone, double *) |
Provide the dimension of the cone. More... | |
int | DSDPConeInitialize (DSDPCone *) |
Initialize the pointers to 0. More... | |
int | DSDPConeInvertS (DSDPCone) |
Invert the dual matrix S. More... | |
int | DSDPConeMonitor (DSDPCone, int) |
Do anything at in the cone at each iteration. More... | |
int | DSDPConeMultiplyAdd (DSDPCone, double, DSDPVec, DSDPVec, DSDPVec) |
Multiply Hessian by a vector and add the result. More... | |
int | DSDPConeSetData (DSDPCone *, struct DSDPCone_Ops *, void *) |
Initialize the pointers to 0. More... | |
int | DSDPConeSetUp (DSDPCone, DSDPVec) |
Factor the data and allocate data structures. More... | |
int | DSDPConeSetUp2 (DSDPCone, DSDPVec, DSDPSchurMat) |
Factor the data and allocate data structures. More... | |
int | DSDPConeSetXMaker (DSDPCone, double, DSDPVec, DSDPVec) |
Pass information needed to construct X. More... | |
int | DSDPConeSparsityInSchurMat (DSDPCone, int, int[], int) |
Identify sparsity pattern in a row of the Hessian term. More... | |
int | DSDPConeView (DSDPCone) |
View contents of the cone. More... | |
int | DSDPGetConeName (DSDPCone, char *, int) |
Get name of the cone. More... | |
The public interface between the cones and the solver.
Definition in file dsdpcone.h.
This object holds the data of a SDP, LP, or other cone. Its structure is opaque to the DSDP Solver, but it must implement the interface below and provide a structure of function pointers.
Definition at line 27 of file dsdpcone.h.
Add square of 2-norm of data correponding to each variable y.
K | the cone |
anorm2 | norm of constraint data for each varibles |
Definition at line 168 of file dsdpcone.c.
Referenced by DSDPComputeANorm2().
int DSDPConeComputeHessian | ( | DSDPCone | K, |
double | mu, | ||
DSDPSchurMat | M, | ||
DSDPVec | vrhs1, | ||
DSDPVec | vrhs2 | ||
) |
Compute Hessian and gradient of barrier function.
K | the cone |
mu | barrier parameter |
M | Schur matrix |
vrhs1 | objective gradient |
vrhs2 | barrier gradient |
This routine assumes that the dual matrix has already been factored and inverted.
Definition at line 92 of file dsdpcone.c.
Referenced by DSDPComputeHessian().
int DSDPConeComputeLogSDeterminant | ( | DSDPCone | K, |
double * | logdetobj, | ||
double * | logdet | ||
) |
Evaluate logrithmic barrier function.
K | the cone |
logdetobj | used term. |
logdet | logarithmic barrier of cone Assumes S is in cone. |
Definition at line 403 of file dsdpcone.c.
Referenced by DSDPComputeLogSDeterminant().
int DSDPConeComputeMaxStepLength | ( | DSDPCone | K, |
DSDPVec | DY, | ||
DSDPDualFactorMatrix | flag, | ||
double * | maxsteplength | ||
) |
Determine distance to the edge of the cone.
K | the cone |
DY | step direction |
flag | identifies which of two S matrix structures should be used. |
maxsteplength | distance to the edge of the cone. |
Definition at line 288 of file dsdpcone.c.
Referenced by DSDPComputeMaxStepLength().
Compute gradient of barrier function.
K | the cone |
mu | barrier parameter |
vrow | scaling for each element in the gradient. |
rhs1 | objective gradient |
rhs2 | barrier gradient |
This routine assumes that the dual matrix has already been factored and inverted. Define rhs2 += mu * vrow .* A(S^{-1})
Definition at line 147 of file dsdpcone.c.
Referenced by DSDPComputeG().
int DSDPConeComputeS | ( | DSDPCone | K, |
DSDPVec | Y, | ||
DSDPDualFactorMatrix | flag, | ||
DSDPTruth * | ispsdefinite | ||
) |
Given y, compute S and determine whether its in the cone.
K | the cone |
Y | solution |
flag | identifies which of two S matrix structures should be used. |
ispsdefinite | true if S is positive definite or an element of the cone. |
Definition at line 242 of file dsdpcone.c.
Referenced by DSDPComputeSS().
Given y,dy, and mu, construct X and add its inner product with the data and S.
K | the cone |
mu | barrier parameter |
y | solution |
dy | step direction |
AX | add the inner product of the data with X |
tracexs | inner product of X and S. |
Definition at line 216 of file dsdpcone.c.
Referenced by DSDPComputeXVariables().
int DSDPConeDestroy | ( | DSDPCone * | K | ) |
Free the internal memory of the cone.
K | the cone |
Definition at line 64 of file dsdpcone.c.
Referenced by DSDPDestroyCones().
int DSDPConeGetDimension | ( | DSDPCone | K, |
double * | n | ||
) |
Provide the dimension of the cone.
K | the cone |
n | conic dimension (an integer value) |
Definition at line 312 of file dsdpcone.c.
Referenced by DSDPGetConicDimension().
int DSDPConeInitialize | ( | DSDPCone * | K | ) |
Initialize the pointers to 0.
K | the cone |
Definition at line 495 of file dsdpcone.c.
Referenced by DSDPAddCone(), DSDPConeDestroy(), and DSDPDestroyCones().
int DSDPConeInvertS | ( | DSDPCone | K | ) |
Invert the dual matrix S.
K | the cone |
Assumes that the matrix has already been factored.
Definition at line 265 of file dsdpcone.c.
Referenced by DSDPInvertS().
int DSDPConeMonitor | ( | DSDPCone | K, |
int | tag | ||
) |
Do anything at in the cone at each iteration.
K | the cone |
tag | allows for multiple types of monitors. |
This routine has be used to visualize data, print some statistics, ...
Definition at line 380 of file dsdpcone.c.
Referenced by DSDPMonitorCones().
Multiply Hessian by a vector and add the result.
K | the cone |
mu | barrier parameter |
vrow | scaling for each element in the product. |
v | input vector gradient |
vv | output vector |
This routine assumes that the dual matrix has already been factored and inverted. If M is the hessian, then vv += vrow .* Mv
Definition at line 119 of file dsdpcone.c.
Referenced by DSDPHessianMultiplyAdd().
int DSDPConeSetData | ( | DSDPCone * | K, |
struct DSDPCone_Ops * | ops, | ||
void * | data | ||
) |
Initialize the pointers to 0.
K | the cone |
ops | address of a structure of function pointers. |
data | address of a structure representing a cone |
Definition at line 477 of file dsdpcone.c.
Referenced by DSDPAddCone(), and DSDPConeInitialize().
Factor the data and allocate data structures.
K | the cone |
y | initial solution vector |
Definition at line 22 of file dsdpcone.c.
Referenced by DSDPSetUpCones().
int DSDPConeSetUp2 | ( | DSDPCone | K, |
DSDPVec | yy0, | ||
DSDPSchurMat | M | ||
) |
Factor the data and allocate data structures.
K | the cone |
yy0 | initial solution vector |
M | Schur matrix |
Definition at line 43 of file dsdpcone.c.
Referenced by DSDPSetUpCones2().
Pass information needed to construct X.
K | the cone |
mu | barrier parameter |
y | solution |
dy | step direction |
Definition at line 191 of file dsdpcone.c.
Referenced by DSDPPassXVectors().
int DSDPConeSparsityInSchurMat | ( | DSDPCone | K, |
int | row, | ||
int | rnnz[], | ||
int | m | ||
) |
Identify sparsity pattern in a row of the Hessian term.
K | the cone |
row | between 1 and m |
rnnz | mark elements nonzero for nonzeros in Hessian of barrier. |
m | number of y variables, length of array, and size of M matrix |
Definition at line 338 of file dsdpcone.c.
Referenced by DSDPSchurSparsity().
int DSDPConeView | ( | DSDPCone | K | ) |
View contents of the cone.
K | the cone |
Definition at line 358 of file dsdpcone.c.
Referenced by DSDPViewCones().
int DSDPGetConeName | ( | DSDPCone | K, |
char * | cname, | ||
int | maxlength | ||
) |
Get name of the cone.
K | the cone |
cname | string to copy the string |
maxlength | maximum length of the string. |
Definition at line 427 of file dsdpcone.c.
Referenced by DSDPSetCone().