1 #ifndef __TAO_DSDPSDP_H
2 #define __TAO_DSDPSDP_H
19 typedef enum { SDPCONEEXIST=1, SDPCONESETUP1=2 } SDPConeStatus;
104 #define SDPCONEKEY 5438
105 #define SDPConeValid(a) {if (!(a)||((a)->keyid!=SDPCONEKEY)){ DSDPSETERR(101,"DSDPERROR: Invalid SDPCone object\n");}}
107 #define DSDPCHKBLOCKERR(a,b); { if (b){ DSDPSETERR1(b,"Block Number: %d,\n",a);} }
108 #define DSDPCHKVARERR(a,b); { if (b){ DSDPSETERR1(b,"Variable Number: %d,\n",a);} }
143 extern int DSDPBlockEventInitialize(
void);
144 extern int DSDPBlockEventZero(
void);
153 extern int DSDPUseDefaultDualMatrix(
SDPCone);
177 extern int DSDPSetDualMatrix(
SDPCone sdpcone,
int (*createdualmatrix)(
DSDPBlockData*,
DSDPVec,
DSDPVMat,
DSDPVec,
DSDPVec,
DSDPDualMat*,
DSDPDualMat*,
DSDPDSMat*,
void*),
void*);
185 extern int DSDPDualMatEventInitialize(
void);
186 extern int DSDPVMatEventInitialize(
void);
187 extern int DSDPDualMatEventZero(
void);
188 extern int DSDPVMatEventZero(
void);
int SDPConeComputeXX(SDPCone, int, DSDPVec, double, DSDPDualMat, DSDPVMat)
Compute X.
Internal structure for transpose of data.
The interface between the SDPCone and the matrix S.
int DSDPBlockRemoveDataMatrix(DSDPBlockData *ADATA, int vari)
Remove a data matrix.
int DSDPDataTransposeTakeDown(DSDPDataTranspose *)
Free transpose structure for data.
struct DSDPVec_C DSDPVec
This object hold m+2 variables: a scaling of C, the y variables, and r.
int DSDPBlockASum(DSDPBlockData *ADATA, double aa, DSDPVec Yk, DSDPVMat XX)
Sum the data matrices.
int DSDPMakeVMatWithArray(char, double[], int, int, DSDPVMat *)
Allocate V matrix using the given array.
Schur complement matrix whose solution is the Newton direction.
Lanczos procedure determines the maximum step length.
int DSDPBlockDataMarkNonzeroMatrices(DSDPBlockData *ADATA, int *annz)
Mark which variable in block have a data matrix.
int SDPConeSetRIdentity(SDPCone sdpcone, int blockj, int n, double rr)
Add identify matrix to dual matrix.
int SDPConeMultiply(SDPCone, int, double, DSDPVec, DSDPVec, DSDPVec)
Compute the gradient to the barrier term.
int DSDPBlockView(DSDPBlockData *ADATA)
Print the structure of the block.
int SDPConeComputeXDot(SDPCone, int, DSDPVec, DSDPVMat, DSDPVec, double *, double *, double *)
Compute inner product of X with the Data, S, and norm of X.
int SDPConeDestroy(SDPCone)
Free data structure of the cone.
The interface between the SDPCone and the Delta S matrix.
Internal structures for the DSDP solver.
int DSDPDataMatCheck(DSDPDataMat AA, SDPConeVec W, DSDPIndex IS, DSDPVMat XX)
Check correctness of operations on the data.
int DSDPBlockvAv(DSDPBlockData *ADATA, double aa, DSDPVec Alpha, SDPConeVec V, DSDPVec VAV)
Set VAV[i] to aa * Alpha[i] * V' A[i] V.
Apply Lanczos prodedure to find distance to boundary.
The API to DSDP for those applications using DSDP as a subroutine library.
int SDPConeCheckM(SDPCone sdpcone, int m)
Check validity of parameter.
int DSDPBlockADot(DSDPBlockData *ADATA, double aa, DSDPVec Alpha, DSDPVMat X, DSDPVec AX)
Compute inner product of XX with data matrices.
int DSDPBlockCountNonzeroMatrices(DSDPBlockData *ADATA, int *nzmats)
Count how many data matrices are in a block of data.
Each block of the SDPCone has two vectors of appropriate size.
int DSDPBlockTakeDownData(DSDPBlockData *ADATA)
Free structures in block of data.
Internal structure for data in one block of semidefintie.
Solver, solution types, termination codes,.
Vector whose length corresponds to dimension of a block in a cone.
int DSDPBlockSetDataMatrix(DSDPBlockData *ADATA, int vari, struct DSDPDataMat_Ops *dsdpdataops, void *data)
Set data matrix into SDP block.
Symmetric data matrix for one block in the semidefinite cone.
int DSDPBlockView2(DSDPBlockData *ADATA)
Print the data.
int DSDPBlockFactorData(DSDPBlockData *ADATA, DSDPVMat X, SDPConeVec W)
Factor the data matrices.
Methods of a Schur Matrix.
The interface between the SDPCone and the dense matrix array.
int DSDPBlockTakeDown(SDPblk *)
Free data structures in one block of the cone.
Vector operations used by the solver.
The interface between the SDPCone and the data matrices.
int SDPConeComputeSS(SDPCone, int, DSDPVec, DSDPVMat)
Sum the data matrices.
Table of function pointers that operate on the data matrix.
int SDPConeCheckStorageFormat(SDPCone sdpcone, int blockj, char format)
Check validity of parameters.
Internal structure for block of semidefinite cone.
int DSDPSetDataMatZero(DSDPDataMat *A)
Make a data matrix a zero matrix.
int DSDPBlockDataAllocate(DSDPBlockData *ADATA, int nnz)
Allocate some structures.
int SDPConeCheckJ(SDPCone sdpcone, int blockj)
Check validity of parameter.
Represents an S matrix for one block in the semidefinite cone.
int DSDPDataTransposeInitialize(DSDPDataTranspose *)
Initialize transpose structure for data.
int DSDPBlockDataRowSparsity(DSDPBlockData *ADATA, int row, int ai[], int rnnz[], int n)
Determine sparsity pattern of data.
int DSDPBlockGetMatrix(DSDPBlockData *ADATA, int id, int *vari, double *scl, DSDPDataMat *A)
Get a data matrix from a block of data.
Internal structure for semidefinite cone.
int SDPConeComputeRHS(SDPCone, int, double, DSDPVec, DSDPVec, DSDPVec)
Compute the gradient to the barrier term.
int SDPConeCheckN(SDPCone sdpcone, int blockj, int n)
Check validity of parameter.
int SDPConeComputeHessian(SDPCone, double, DSDPSchurMat, DSDPVec, DSDPVec)
Compute the Hessian to the barrier term.
int DSDPBlockAddDataMatrix(DSDPBlockData *ADATA, int vari, struct DSDPDataMat_Ops *dsdpdataops, void *data)
Add data matrix into SDP block.
int DSDPMakeVMat(char, int, DSDPVMat *)
Allocate V matrix.
int SDPConeComputeX3(SDPCone, int, double, DSDPVec, DSDPVec, DSDPVMat)
Compute the matrix X with the given information.
Symmetric Delta S matrix for one block in the semidefinite cone.
int DSDPDataTransposeSetup(DSDPDataTranspose *, SDPblk *, int, int)
Set up transpose structure for data.
Dense symmetric matrix for one block in the semidefinite cone.
int DSDPBlockDataDestroy(DSDPBlockData *ADATA)
Free the data matrices.
int DSDPBlockDataInitialize(DSDPBlockData *ADATA)
Set pointers to null.
int DSDPAddSDP(DSDP, SDPCone)
Pass a semidefinite cone to the solver.
int DSDPBlockInitialize(SDPblk *)
Initialize data structures in one block of the cone.
int SDPConeSetup(SDPCone, DSDPVec)
Allocate data structure of the cone.
int SDPConeSetup2(SDPCone, DSDPVec, DSDPSchurMat)
Allocate data structure of the cone.