DSDP
|
Methods of a cone. More...
Go to the source code of this file.
Functions | |
int | DSDPConeANorm2 (DSDPCone K, DSDPVec anorm2) |
Add square of 2-norm of data correponding to each variable y. | |
int | DSDPConeComputeHessian (DSDPCone K, double mu, DSDPSchurMat M, DSDPVec vrhs1, DSDPVec vrhs2) |
Compute Hessian and gradient of barrier function. | |
int | DSDPConeComputeLogSDeterminant (DSDPCone K, double *logdetobj, double *logdet) |
Evaluate logrithmic barrier function. | |
int | DSDPConeComputeMaxStepLength (DSDPCone K, DSDPVec DY, DSDPDualFactorMatrix flag, double *maxsteplength) |
Determine distance to the edge of the cone. | |
int | DSDPConeComputeRHS (DSDPCone K, double mu, DSDPVec vrow, DSDPVec rhs1, DSDPVec rhs2) |
Compute gradient of barrier function. | |
int | DSDPConeComputeS (DSDPCone K, DSDPVec Y, DSDPDualFactorMatrix flag, DSDPTruth *ispsdefinite) |
Given y, compute S and determine whether its in the cone. | |
int | DSDPConeComputeX (DSDPCone K, double mu, DSDPVec y, DSDPVec dy, DSDPVec AX, double *tracexs) |
Given y,dy, and mu, construct X and add its inner product with the data and S. | |
int | DSDPConeDestroy (DSDPCone *K) |
Free the internal memory of the cone. | |
int | DSDPConeGetDimension (DSDPCone K, double *n) |
Provide the dimension of the cone. | |
int | DSDPConeInitialize (DSDPCone *K) |
Initialize the pointers to 0. | |
int | DSDPConeInvertS (DSDPCone K) |
Invert the dual matrix S. | |
int | DSDPConeMonitor (DSDPCone K, int tag) |
Do anything at in the cone at each iteration. | |
int | DSDPConeMultiplyAdd (DSDPCone K, double mu, DSDPVec vrow, DSDPVec v, DSDPVec vv) |
Multiply Hessian by a vector and add the result. | |
int | DSDPConeOpsInitialize (struct DSDPCone_Ops *dops) |
Initialize the function pointers to 0. | |
int | DSDPConeSetData (DSDPCone *K, struct DSDPCone_Ops *ops, void *data) |
Initialize the pointers to 0. | |
int | DSDPConeSetUp (DSDPCone K, DSDPVec y) |
Factor the data and allocate data structures. | |
int | DSDPConeSetUp2 (DSDPCone K, DSDPVec yy0, DSDPSchurMat M) |
Factor the data and allocate data structures. | |
int | DSDPConeSetXMaker (DSDPCone K, double mu, DSDPVec y, DSDPVec dy) |
Pass information needed to construct X. | |
int | DSDPConeSparsityInSchurMat (DSDPCone K, int row, int rnnz[], int m) |
Identify sparsity pattern in a row of the Hessian term. | |
int | DSDPConeView (DSDPCone K) |
View contents of the cone. | |
int | DSDPGetConeName (DSDPCone K, char *cname, int maxlength) |
Get name of the cone. | |
Methods of a cone.
Definition in file dsdpcone.c.
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 DSDPConeOpsInitialize | ( | struct DSDPCone_Ops * | dops | ) |
Initialize the function pointers to 0.
dops | address of a structure of function pointers. |
Definition at line 443 of file dsdpcone.c.
Referenced by DSDPConeInitialize().
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().