DSDP
|
Functions | |
int | SDPConeGetXArray (SDPCone sdpcone, int blockj, double *xx[], int *nn) |
After applying the solver, set a pointer to the array in the object with the solution X. More... | |
int | SDPConeSetADenseVecMat (SDPCone sdpcone, int blockj, int vari, int n, double alpha, double val[], int nnz) |
Set a matrix ![]() | |
int | SDPConeSetASparseVecMat (SDPCone sdpcone, int blockj, int vari, int n, double alpha, int ishift, const int ind[], const double val[], int nnz) |
Set data matrix ![]() | |
int | SDPConeViewDataMatrix (SDPCone sdpcone, int blockj, int vari) |
Print a data matrix to the screen. More... | |
int | SDPConeViewX (SDPCone sdpcone, int blockj, int n, double x[], int nn) |
Print a dense array X to the screen. More... | |
Routines that create the SDPCone object, set the data, and get the solution for problems.
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 .
By default, this cone represents symmetric matrices in packed symmetric format. This format uses an array of length
and orders the the elements of the matrix as follows:
0 | if successful |
int SDPConeGetXArray | ( | SDPCone | sdpcone, |
int | blockj, | ||
double * | xx[], | ||
int * | nn | ||
) |
After applying the solver, set a pointer to the array in the object with the solution X.
sdpcone | semidefinite cone object |
blockj | block number |
xx | address of an array for dense matrices |
*nn | the length of the array |
DSDP uses a single dense array to add data matrices, compute the matrix X, and take the inner product of X with the data matrices. Therefore, the ordering of elements in this array must also be used in the data matrices.
Definition at line 328 of file dsdpadddata.c.
Referenced by DSDPPrintData(), DSDPPrintSolution(), LovaszTheta(), MaxCut(), MinColoring(), and StableSet().
int SDPConeSetADenseVecMat | ( | SDPCone | sdpcone, |
int | blockj, | ||
int | vari, | ||
int | n, | ||
double | alpha, | ||
double | val[], | ||
int | nnz | ||
) |
Set a matrix in a dense format.
sdpcone | SDP cone |
blockj | block number j from 0 to nblocks |
vari | variable i from 0 through m |
n | dimension of the matrix |
alpha | multiple of the data (usually 1.0) |
val | array of elements in the matrix |
nnz | length of the array |
For example, the matrix
can be inserted into the cone in packed symmetric format as follows
val
array in many routines, but it will not modify or delete it.Definition at line 265 of file dsdpadddatamat.c.
Referenced by mexFunction(), ReadSDPAFile(), and SDPConeSetADenseVecMat().
int SDPConeSetASparseVecMat | ( | SDPCone | sdpcone, |
int | blockj, | ||
int | vari, | ||
int | n, | ||
double | alpha, | ||
int | ishift, | ||
const int | ind[], | ||
const double | val[], | ||
int | nnz | ||
) |
Set data matrix in a sparse format.
sdpcone | SDP cone |
blockj | block number j from 0 to nblocks |
vari | variable i from 0 through m |
n | dimension of the matrix |
ishift | index of ![]() |
alpha | multiple of the data (usually 1) |
val | array of elements in the matrix |
ind | array of indices representing the location of the elements |
nnz | length of the previous two arrays |
For example, the matrix
can be inserted into the cone in packed symmetric format in several ways.
Using the ordering of the packed symmetric format, we can index each element of the matrix with an integer between 0 and n(n+1)/2-1 (inclusive). If the first element in the val
array is , the first element in the
ind
array should be 0 . If the second element in the val
array is , then the second element in
ind
array should be 1 (the second element in dense representation). If the third element in the val
array is , then the third element in
ind
array should be 4. Explicitly,
If we index the elements from 1 through n(n+1)/2, we can use
The ordering of the elements in the array can be changed and zero elements can be included.
The elements can also be scaled.
Definition at line 152 of file dsdpadddatamat.c.
Referenced by MaxCut(), mexFunction(), MinColoring(), ReadSDPAFile(), SDPConeSetASparseVecMat(), and SetStableSetData().
int SDPConeViewDataMatrix | ( | SDPCone | sdpcone, |
int | blockj, | ||
int | vari | ||
) |
Print a data matrix to the screen.
sdpcone | semidefinite cone object |
blockj | block number |
vari | variable number from 0 through m |
Definition at line 205 of file dsdpadddata.c.
Referenced by MaxCut(), ReadSDPAFile(), and SetStableSetData().
int SDPConeViewX | ( | SDPCone | sdpcone, |
int | blockj, | ||
int | n, | ||
double | x[], | ||
int | nn | ||
) |
Print a dense array X to the screen.
sdpcone | semidefinite cone |
blockj | block number |
n | the dimension of the block |
x | dense matrix array. |
nn | length of the array x |