DSDP
|
Functions | |
int | SDPConeAddADenseVecMat (SDPCone sdpcone, int blockj, int vari, int n, double alpha, double val[], int nnz) |
Add a matrix ![]() | |
int | SDPConeAddARankOneMat (SDPCone sdpcone, int blockj, int vari, int n, double alpha, int ishift, const int ind[], const double val[], int nnz) |
Add data matrix ![]() | |
int | SDPConeAddASparseVecMat (SDPCone sdpcone, int blockj, int vari, int n, double alpha, int ishift, const int ind[], const double val[], int nnz) |
Add data matrix ![]() | |
int | SDPConeAddConstantMat (SDPCone sdpcone, int blockj, int vari, int n, double value) |
Add a matrix ![]() | |
int | SDPConeAddDataMatrix (SDPCone sdpcone, int blockj, int vari, int n, char format, struct DSDPDataMat_Ops *dsdpdataops, void *data) |
Add a data matrix ![]() | |
int | SDPConeAddIdentity (SDPCone sdpcone, int blockj, int vari, int n, double val) |
Add a matrix ![]() | |
int | SDPConeCheckData (SDPCone sdpcone) |
Check the matrix operations on a data matrix;. More... | |
int | SDPConeGetStorageFormat (SDPCone sdpcone, int blockj, char *format) |
Get the storage format for the block. More... | |
int | SDPConeRemoveDataMatrix (SDPCone sdpcone, int blockj, int vari) |
Remove the data matrix ![]() | |
int | SDPConeSetARankOneMat (SDPCone sdpcone, int blockj, int vari, int n, double alpha, int ishift, const int ind[], const double val[], int nnz) |
Set data matrix ![]() | |
int | SDPConeSetConstantMat (SDPCone sdpcone, int blockj, int vari, int n, double value) |
Set a matrix ![]() | |
int | SDPConeSetIdentity (SDPCone sdpcone, int blockj, int vari, int n, double val) |
Set a matrix ![]() | |
int | SDPConeSetStorageFormat (SDPCone sdpcone, int blockj, char format) |
Set the dense storage format of a block in the semidefinite cone. More... | |
int | SDPConeSetZeroMat (SDPCone sdpcone, int blockj, int vari, int n) |
Set a matrix ![]() | |
int | SDPConeUseFullSymmetricFormat (SDPCone sdpcone, int blockj) |
Use full symmetric format for the dense array. More... | |
int | SDPConeUsePackedFormat (SDPCone sdpcone, int blockj) |
Use packed symmetric format for the dense array. More... | |
int | SDPConeView2 (SDPCone sdpcone) |
Print the SDP cone to the screen in a second way. More... | |
int | SDPConeView3 (SDPCone sdpcone) |
Print the SDP cone to the screen in a third way. More... | |
Less frequently used routines to set data into the SDPCone object and operate on the variables.
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 SDPConeAddADenseVecMat | ( | SDPCone | sdpcone, |
int | blockj, | ||
int | vari, | ||
int | n, | ||
double | alpha, | ||
double | val[], | ||
int | nnz | ||
) |
Add 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 data (usually 1.0) |
val | array of elements in the matrix |
nnz | length of the previous two arrays |
val
array in many routines, but it will not modify or delete it until finished with DSDP.The matrix
can be inserted into the cone in symmetric packed format as follows
Definition at line 203 of file dsdpadddatamat.c.
Referenced by SDPConeAddADenseVecMat(), and SDPConeSetADenseVecMat().
int SDPConeAddARankOneMat | ( | SDPCone | sdpcone, |
int | blockj, | ||
int | vari, | ||
int | n, | ||
double | alpha, | ||
int | ishift, | ||
const int | ind[], | ||
const double | val[], | ||
int | nnz | ||
) |
Add data matrix where v is a sparse vector.
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 outer product |
ishift | index of first element in a dense vector (usually 0) |
val | array of elements in the vector |
ind | array of indices representing the location of the nonzeros |
nnz | length of the previous two arrays |
Definition at line 478 of file dsdpadddatamat.c.
Referenced by SDPConeSetARankOneMat(), and SetStableSetData().
int SDPConeAddASparseVecMat | ( | SDPCone | sdpcone, |
int | blockj, | ||
int | vari, | ||
int | n, | ||
double | alpha, | ||
int | ishift, | ||
const int | ind[], | ||
const double | val[], | ||
int | nnz | ||
) |
Add 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 first element (usually 0) |
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 |
Definition at line 49 of file dsdpadddatamat.c.
Referenced by MaxCut(), SDPConeAddASparseVecMat(), SDPConeSetASparseVecMat(), and SetStableSetData().
int SDPConeAddConstantMat | ( | SDPCone | sdpcone, |
int | blockj, | ||
int | vari, | ||
int | n, | ||
double | value | ||
) |
Add a matrix whose elements are all the same.
sdpcone | SDP cone |
blockj | block number j from 0 to nblocks |
vari | variable i from 0 through m |
n | dimension of the matrix |
value | the value of each element in the matrix |
Definition at line 356 of file dsdpadddatamat.c.
Referenced by SDPConeSetConstantMat().
int SDPConeAddDataMatrix | ( | SDPCone | sdpcone, |
int | blockj, | ||
int | vari, | ||
int | n, | ||
char | format, | ||
struct DSDPDataMat_Ops * | dsdpdataops, | ||
void * | data | ||
) |
Add a data matrix .
sdpcone | SDP cone |
blockj | block number j from 0 to nblocks |
vari | variable i from 0 through m |
n | dimension of the matrix |
format | storage format 'P' (default) or 'U' |
data | address of a structure ( cast to void* ) with matrix data. |
dsdpdataops | address of a structure of function pointers that operate on the matrix data |
Definition at line 154 of file dsdpadddata.c.
Referenced by SDPConeAddADenseVecMat(), SDPConeAddARankOneMat(), SDPConeAddASparseVecMat(), SDPConeAddConstantMat(), SDPConeAddIdentity(), SDPConeSetZeroMat(), and SetThetaData().
int SDPConeAddIdentity | ( | SDPCone | sdpcone, |
int | blockj, | ||
int | vari, | ||
int | n, | ||
double | val | ||
) |
Add a matrix that is a multiple of the identity matrix.
sdpcone | SDP cone |
blockj | block number j from 0 to nblocks |
vari | variable i from 0 through m |
n | dimension of the matrix |
val | multiple of identity matrix |
Definition at line 299 of file dsdpadddatamat.c.
Referenced by SDPConeSetIdentity().
int SDPConeCheckData | ( | SDPCone | sdpcone | ) |
Check the matrix operations on a data matrix;.
sdpcone | the cone |
Definition at line 692 of file dsdpadddata.c.
Referenced by LovaszTheta(), ReadSDPAFile(), and StableSet().
int SDPConeGetStorageFormat | ( | SDPCone | sdpcone, |
int | blockj, | ||
char * | format | ||
) |
Get the storage format for the block.
sdpcone | semidefinite cone object |
blockj | block number |
format | format the block |
The default format is 'P' (packed symmetric format).
Definition at line 505 of file dsdpadddata.c.
Referenced by DSDPPrintData(), DSDPPrintSolution(), SDPConeAddADenseVecMat(), SDPConeAddADotX(), SDPConeAddARankOneMat(), SDPConeAddASparseVecMat(), SDPConeAddConstantMat(), SDPConeAddIdentity(), SDPConeComputeS(), SDPConeComputeX(), SDPConeSetRIdentity(), SDPConeSetXArray(), SDPConeSetXMat(), SDPConeSetZeroMat(), and SDPConeViewX().
int SDPConeRemoveDataMatrix | ( | SDPCone | sdpcone, |
int | blockj, | ||
int | vari | ||
) |
Remove the data matrix from the cone.
sdpcone | SDP cone |
blockj | block number j from 0 to nblocks |
vari | variable i from 0 through m |
Definition at line 127 of file dsdpadddata.c.
Referenced by SDPConeSetADenseVecMat(), SDPConeSetARankOneMat(), SDPConeSetASparseVecMat(), SDPConeSetConstantMat(), SDPConeSetIdentity(), and SDPConeSetZeroMat().
int SDPConeSetARankOneMat | ( | SDPCone | sdpcone, |
int | blockj, | ||
int | vari, | ||
int | n, | ||
double | alpha, | ||
int | ishift, | ||
const int | ind[], | ||
const double | val[], | ||
int | nnz | ||
) |
Set data matrix where v is a sparse vector.
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 outer product |
ishift | index of first element in a dense vector (usually 0) |
val | array of elements in the vector |
ind | array of indices representing the location of the nonzeros |
nnz | length of the previous two arrays |
Definition at line 519 of file dsdpadddatamat.c.
int SDPConeSetConstantMat | ( | SDPCone | sdpcone, |
int | blockj, | ||
int | vari, | ||
int | n, | ||
double | value | ||
) |
Set a matrix whose elements are all the same.
sdpcone | SDP cone |
blockj | block number j from 0 to nblocks |
vari | variable i from 0 through m |
n | dimension of the matrix |
value | the value of each element in the matrix |
Definition at line 391 of file dsdpadddatamat.c.
Referenced by mexFunction(), and ReadSDPAFile().
int SDPConeSetIdentity | ( | SDPCone | sdpcone, |
int | blockj, | ||
int | vari, | ||
int | n, | ||
double | val | ||
) |
Set a matrix to be a multiple of the identity matrix.
sdpcone | SDP cone |
blockj | block number j from 0 to nblocks |
vari | variable i from 0 through m |
n | dimension of the matrix |
val | multiple of identity matrix |
Definition at line 334 of file dsdpadddatamat.c.
int SDPConeSetStorageFormat | ( | SDPCone | sdpcone, |
int | blockj, | ||
char | format | ||
) |
Set the dense storage format of a block in the semidefinite cone.
sdpcone | semidefinite cone object |
blockj | block number |
format | format the block |
This routine determines the ordering of elements in the data matrices and the X matrix. The default format is 'P' (packed symmetric format), but the full symmetric format 'U' is also supported. The format used to factor the S matrix is independent of the format used for the data and X matrix.
Definition at line 479 of file dsdpadddata.c.
Referenced by ReadSDPAFile(), SDPConeUseFullSymmetricFormat(), and SDPConeUsePackedFormat().
int SDPConeSetZeroMat | ( | SDPCone | sdpcone, |
int | blockj, | ||
int | vari, | ||
int | n | ||
) |
Set a matrix whose elements are all equal zero.
sdpcone | SDP cone |
blockj | block number j from 0 to nblocks |
vari | variable i from 0 through m |
n | dimension of the matrix |
Definition at line 414 of file dsdpadddatamat.c.
int SDPConeUseFullSymmetricFormat | ( | SDPCone | sdpcone, |
int | blockj | ||
) |
Use full symmetric format for the dense array.
sdpcone | semidefinite cone object |
blockj | block number |
In this format, an symmetric matrix is represented by an array of length
. Each element of the array corresponds to an element of the matrix and the mapping is given below.
but elements are not used.
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 414 of file dsdpadddata.c.
int SDPConeUsePackedFormat | ( | SDPCone | sdpcone, |
int | blockj | ||
) |
Use packed symmetric format for the dense array.
sdpcone | semidefinite cone object |
blockj | block number |
In this format, an symmetric matrix is represented by an array of length
. Each element of the array corresponds to an element of the matrix and the mapping is given below.
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 452 of file dsdpadddata.c.
Referenced by LovaszTheta(), mexFunction(), and StableSet().
int SDPConeView2 | ( | SDPCone | sdpcone | ) |
Print the SDP cone to the screen in a second way.
sdpcone | the cone |
Definition at line 637 of file dsdpadddata.c.
Referenced by ReadSDPAFile().
int SDPConeView3 | ( | SDPCone | sdpcone | ) |
Print the SDP cone to the screen in a third way.
sdpcone | the cone |
Definition at line 657 of file dsdpadddata.c.