19typedef 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);} }
143extern int DSDPBlockEventInitialize(
void);
144extern int DSDPBlockEventZero(
void);
153extern int DSDPUseDefaultDualMatrix(
SDPCone);
177extern int DSDPSetDualMatrix(
SDPCone sdpcone,
int (*createdualmatrix)(
DSDPBlockData*,
DSDPVec,
DSDPVMat,
DSDPVec,
DSDPVec,
DSDPDualMat*,
DSDPDualMat*,
DSDPDSMat*,
void*),
void*);
185extern int DSDPDualMatEventInitialize(
void);
186extern int DSDPVMatEventInitialize(
void);
187extern int DSDPDualMatEventZero(
void);
188extern int DSDPVMatEventZero(
void);
The API to DSDP for those applications using DSDP as a subroutine library.
struct SDPCone_C * SDPCone
The SDPCone object points to blocks of data that specify semidefinite matrix inequalities.
Solver, solution types, termination codes,.
struct DSDP_C * DSDP
An implementation of the dual-scaling algorithm for semidefinite programming.
The interface between the SDPCone and the data matrices.
struct DSDPDataMat_C DSDPDataMat
Represents a single symmetric data matrix for one block in this semidefinite cone.
The interface between the SDPCone and the Delta S matrix.
struct DSDPDSMat_C DSDPDSMat
A symmetric Delta S matrix for one block in the semidefinite cone.
The interface between the SDPCone and the matrix S.
struct DSDPDualMat_C DSDPDualMat
Represents an S matrix for one block in the semidefinite cone.
Lanczos procedure determines the maximum step length.
Methods of a Schur Matrix.
struct DSDPSchurMat_C DSDPSchurMat
This object represents the Schur Matrix. Its structure is opaque to the DSDP solver,...
int DSDPBlockvAv(DSDPBlockData *, double, DSDPVec, SDPConeVec, DSDPVec)
Set VAV[i] to aa * Alpha[i] * V' A[i] V.
int SDPConeCheckStorageFormat(SDPCone, int, char)
Check validity of parameters.
int DSDPDataMatCheck(DSDPDataMat, SDPConeVec, DSDPIndex, DSDPVMat)
Check correctness of operations on the data.
int DSDPDataTransposeInitialize(DSDPDataTranspose *)
Initialize transpose structure for data.
int DSDPMakeVMatWithArray(char, double[], int, int, DSDPVMat *)
Allocate V matrix using the given array.
int SDPConeMultiply(SDPCone, int, double, DSDPVec, DSDPVec, DSDPVec)
Compute the gradient to the barrier term.
int DSDPBlockAddDataMatrix(DSDPBlockData *, int, struct DSDPDataMat_Ops *, void *)
Add data matrix into SDP block.
int DSDPBlockView(DSDPBlockData *)
Print the structure of the block.
int SDPConeComputeX3(SDPCone, int, double, DSDPVec, DSDPVec, DSDPVMat)
Compute the matrix X with the given information.
int SDPConeComputeRHS(SDPCone, int, double, DSDPVec, DSDPVec, DSDPVec)
Compute the gradient to the barrier term.
int DSDPBlockView2(DSDPBlockData *)
Print the data.
int DSDPBlockDataMarkNonzeroMatrices(DSDPBlockData *, int *)
Mark which variable in block have a data matrix.
int DSDPBlockDataAllocate(DSDPBlockData *, int)
Allocate some structures.
int SDPConeCheckJ(SDPCone, int)
Check validity of parameter.
int SDPConeComputeHessian(SDPCone, double, DSDPSchurMat, DSDPVec, DSDPVec)
Compute the Hessian to the barrier term.
int DSDPBlockADot(DSDPBlockData *, double, DSDPVec, DSDPVMat, DSDPVec)
Compute inner product of XX with data matrices.
int DSDPBlockASum(DSDPBlockData *, double, DSDPVec, DSDPVMat)
Sum the data matrices.
int DSDPDataTransposeSetup(DSDPDataTranspose *, SDPblk *, int, int)
Set up transpose structure for data.
int SDPConeComputeXX(SDPCone, int, DSDPVec, double, DSDPDualMat, DSDPVMat)
Compute X.
int SDPConeSetup2(SDPCone, DSDPVec, DSDPSchurMat)
Allocate data structure of the cone.
int DSDPBlockDataInitialize(DSDPBlockData *)
Set pointers to null.
int DSDPBlockDataRowSparsity(DSDPBlockData *, int, int[], int[], int)
Determine sparsity pattern of data.
int DSDPBlockSetDataMatrix(DSDPBlockData *, int, struct DSDPDataMat_Ops *, void *)
Set data matrix into SDP block.
int DSDPDataTransposeTakeDown(DSDPDataTranspose *)
Free transpose structure for data.
int SDPConeSetRIdentity(SDPCone, int, int, double)
Add identify matrix to dual matrix.
int DSDPBlockFactorData(DSDPBlockData *, DSDPVMat, SDPConeVec)
Factor the data matrices.
int DSDPBlockGetMatrix(DSDPBlockData *, int, int *, double *, DSDPDataMat *)
Get a data matrix from a block of data.
int DSDPBlockDataDestroy(DSDPBlockData *)
Free the data matrices.
int SDPConeDestroy(SDPCone)
Free data structure of the cone.
int SDPConeCheckN(SDPCone, int, int)
Check validity of parameter.
int DSDPSetDataMatZero(DSDPDataMat *)
Make a data matrix a zero matrix.
int SDPConeSetup(SDPCone, DSDPVec)
Allocate data structure of the cone.
int SDPConeCheckM(SDPCone, int)
Check validity of parameter.
int DSDPBlockCountNonzeroMatrices(DSDPBlockData *, int *)
Count how many data matrices are in a block of data.
int SDPConeComputeSS(SDPCone, int, DSDPVec, DSDPVMat)
Sum the data matrices.
int DSDPBlockInitialize(SDPblk *)
Initialize data structures in one block of the cone.
int DSDPBlockTakeDownData(DSDPBlockData *)
Free structures in block of data.
int DSDPBlockTakeDown(SDPblk *)
Free data structures in one block of the cone.
int SDPConeComputeXDot(SDPCone, int, DSDPVec, DSDPVMat, DSDPVec, double *, double *, double *)
Compute inner product of X with the Data, S, and norm of X.
int DSDPBlockRemoveDataMatrix(DSDPBlockData *, int)
Remove a data matrix.
int DSDPAddSDP(DSDP, SDPCone)
Pass a semidefinite cone to the solver.
int DSDPMakeVMat(char, int, DSDPVMat *)
Allocate V matrix.
Vector operations used by the solver.
struct DSDPVec_C DSDPVec
This object hold m+2 variables: a scaling of C, the y variables, and r.
The interface between the SDPCone and the dense matrix array.
struct DSDPVMat_C DSDPVMat
Represents a dense symmetric matrix for one block in the semidefinite cone.
Each block of the SDPCone has two vectors of appropriate size.
struct SDPConeVec_C SDPConeVec
SDPConeVec is a vector with the dimension of the block in the SDP cone.
Internal structure for data in one block of semidefintie.
Table of function pointers that operate on the data matrix.
Internal structure for transpose of data.
Apply Lanczos prodedure to find distance to boundary.
Internal structure for semidefinite cone.
Internal structure for block of semidefinite cone.