DSDP
|
Functions | |
int | SDPConeAddADotX (SDPCone sdpcone, int blockj, double alpha, double x[], int nn, double adotx[], int m) |
Compute the inner products of a dense matrix X with the data matrices. More... | |
int | SDPConeAddXVAV (SDPCone sdpcone, int blockj, double vin[], int n, double sum[], int mm) |
Compute ![]() | |
int | SDPConeComputeS (SDPCone sdpcone, int blockj, double cc, double y[], int nvars, double r, int n, double s[], int nn) |
Compute the dual matrix S. More... | |
int | SDPConeComputeX (SDPCone sdpcone, int blockj, int n, double x[], int nn) |
Compute the matrix X. More... | |
int | SDPConeComputeXV (SDPCone sdpcone, int blockj, int *derror) |
Compute a factor V such that ![]() | |
int | SDPConeGetBlockSize (SDPCone sdpcone, int blockj, int *n) |
Get the dimension of one block in the semidefinite cone. More... | |
int | SDPConeGetNumberOfBlocks (SDPCone sdpcone, int *nblocks) |
Get the number of blocks in the semidefinite cone. More... | |
int | SDPConeMatrixView (SDPCone sdpcone, int blockj) |
Print the dense array to the screen. More... | |
int | SDPConeRestoreXArray (SDPCone sdpcone, int blockj, double *xx[], int *nn) |
Restore the dense array and set these pointers to null. More... | |
int | SDPConeSetBlockSize (SDPCone sdpcone, int blockj, int n) |
Set the dimension of one block in the semidefinite cone. More... | |
int | SDPConeSetSparsity (SDPCone sdpcone, int blockj, int nnz) |
Set the number of nonzero matrices in a block of the semidefinite cone. More... | |
int | SDPConeSetXArray (SDPCone sdpcone, int blockj, int n, double xx[], int nn) |
Provide an array for the SDPCone object can use to store dense matrices. More... | |
int | SDPConeXVMultiply (SDPCone sdpcone, int blockj, double vin[], double vout[], int n) |
Multiply an array by a factor V such that ![]() | |
Additional routines that operate on the data.
In DSDP Standard Form a semidefinite program is given by the pair of problems
where the data and
are symmetric matrices of the same dimension and the inner product of two
matrices
and
is defined by
.
Blocks are labelled from 0 to nblocks, where nblocks is the total number of blocks in the SDPCone object.
Variables y are numbered 1 through m. Variable 0 designates the C matrices, which are also denoted .
0 | if successful |
int SDPConeAddADotX | ( | SDPCone | sdpcone, |
int | blockj, | ||
double | alpha, | ||
double | x[], | ||
int | nn, | ||
double | adotx[], | ||
int | m | ||
) |
Compute the inner products of a dense matrix X with the data matrices.
sdpcone | semidefinite cone |
blockj | block number |
alpha | multiply inner product be this multiple |
x | the dense array representing a matrix X. |
nn | length of the array |
adotx | array. |
m | the length of the array and the number of variables y, plus two. |
int SDPConeAddXVAV | ( | SDPCone | sdpcone, |
int | blockj, | ||
double | vin[], | ||
int | n, | ||
double | sum[], | ||
int | mm | ||
) |
Compute for i = 0 through m.
sdpcone | the SDP cone |
blockj | block number |
vin | array |
n | dimension of the block and the length of the two arrays. |
sum | input array |
mm | the number of variables plus 2 |
Definition at line 292 of file sdpcone.c.
Referenced by MaxCutRandomized(), and StableRandomized().
int SDPConeComputeS | ( | SDPCone | sdpcone, |
int | blockj, | ||
double | cc, | ||
double | y[], | ||
int | nvars, | ||
double | r, | ||
int | n, | ||
double | s[], | ||
int | nn | ||
) |
Compute the dual matrix S.
sdpcone | semidefinite cone object |
blockj | block number |
cc | the multiple of the matrix C (or A_0) |
y | an array of containing the variables y |
nvars | the length of the array and the number of variables y |
r | the multiple of the identity matrix to add |
n | the dimension of the block |
s | array to where the matrix S will be copied. |
nn | length of the array s |
Definition at line 42 of file sdpcone.c.
Referenced by DSDPPrintData(), and DSDPPrintSolution().
int SDPConeComputeX | ( | SDPCone | sdpcone, |
int | blockj, | ||
int | n, | ||
double | x[], | ||
int | nn | ||
) |
Compute the matrix X.
sdpcone | semidefinite cone |
n | di |
blockj | block number |
n | the dimension of the block |
x | array to where the matrix X will be copied. |
nn | length of the array x |
int SDPConeComputeXV | ( | SDPCone | sdpcone, |
int | blockj, | ||
int * | derror | ||
) |
Compute a factor V such that .
sdpcone | the SDP cone |
blockj | block number |
derror | nonzero if no such factor could be computed. |
This routine is helpful in semidefinite relaxations of combinatorial problems.
Definition at line 325 of file sdpcone.c.
Referenced by MaxCutRandomized(), and StableRandomized().
int SDPConeGetBlockSize | ( | SDPCone | sdpcone, |
int | blockj, | ||
int * | n | ||
) |
Get the dimension of one block in the semidefinite cone.
sdpcone | semidefinite cone object |
blockj | block number |
*n | set to the dimension of the block |
Definition at line 560 of file dsdpadddata.c.
Referenced by DSDPPrintData(), DSDPPrintSolution(), and SDPConeAddADotX().
int SDPConeGetNumberOfBlocks | ( | SDPCone | sdpcone, |
int * | nblocks | ||
) |
Get the number of blocks in the semidefinite cone.
sdpcone | semidefinite cone object |
*nblocks | set to the dimension of the block |
Definition at line 578 of file dsdpadddata.c.
Referenced by DSDPPrintData(), and DSDPPrintSolution().
int SDPConeMatrixView | ( | SDPCone | sdpcone, |
int | blockj | ||
) |
Print the dense array to the screen.
sdpcone | semidefinite cone object |
blockj | block number |
Definition at line 372 of file dsdpadddata.c.
int SDPConeRestoreXArray | ( | SDPCone | sdpcone, |
int | blockj, | ||
double * | xx[], | ||
int * | nn | ||
) |
Restore the dense array and set these pointers to null.
sdpcone | semidefinite cone object |
blockj | block number |
xx | address of an array for dense matrices |
*nn | the length of the array |
Definition at line 351 of file dsdpadddata.c.
Referenced by DSDPPrintSolution().
int SDPConeSetBlockSize | ( | SDPCone | sdpcone, |
int | blockj, | ||
int | n | ||
) |
Set the dimension of one block in the semidefinite cone.
sdpcone | semidefinite cone object |
blockj | block number |
n | dimension of the block |
Definition at line 535 of file dsdpadddata.c.
Referenced by LovaszTheta(), MaxCut(), mexFunction(), MinColoring(), ReadSDPAFile(), SDPConeCheckN(), and StableSet().
int SDPConeSetSparsity | ( | SDPCone | sdpcone, |
int | blockj, | ||
int | nnz | ||
) |
Set the number of nonzero matrices in a block of the semidefinite cone.
sdpcone | semidefinite cone object |
blockj | block number |
nnz | number of nonzero matrices in the block |
Definition at line 596 of file dsdpadddata.c.
Referenced by LovaszTheta(), mexFunction(), MinColoring(), ReadSDPAFile(), and StableSet().
int SDPConeSetXArray | ( | SDPCone | sdpcone, |
int | blockj, | ||
int | n, | ||
double | xx[], | ||
int | nn | ||
) |
Provide an array for the SDPCone object can use to store dense matrices.
sdpcone | semidefinite cone object |
blockj | block number |
n | dimension of the block |
xx | array for dense matrices |
nn | length of array |
This routine elimates the need to copy the solution X into a separate array.
Definition at line 278 of file dsdpadddata.c.
Referenced by mexFunction(), and ReadSDPAFile().
int SDPConeXVMultiply | ( | SDPCone | sdpcone, |
int | blockj, | ||
double | vin[], | ||
double | vout[], | ||
int | n | ||
) |
Multiply an array by a factor V such that .
sdpcone | the SDP cone |
blockj | block number |
vin | input array |
vout | the product V vin |
n | dimension of the block and the length of the two arrays. |
Definition at line 251 of file sdpcone.c.
Referenced by MaxCutRandomized(), and StableRandomized().