DSDP
Functions
Examples

Functions

int DSDPPrintData (DSDP dsdp, SDPCone sdpcone, LPCone lpcone)
 Print data in SDPA format to a file named "output.sdpa".
int DSDPPrintSolution (FILE *fp, DSDP dsdp, SDPCone sdpcone, LPCone lpcone)
 Print solution in SDPA format.
int LovaszTheta (int argc, char *argv[])
 Formulate and solve the Lovasz theta problem.
int MaxCut (int, int, int[], int[], double[])
 Formulate and solve the SDP relaxation of the Maximum Cut problem.
int MaxCutRandomized (SDPCone sdpcone, int nnodes)
 Apply the Goemens and Williamson randomized cut algorithm to the SDP relaxation of the max-cut problem.
void mexFunction (int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
 Call DSDP from the Matlab environment.
int MinColoring (int argc, char *argv[])
 SDP relaxation of k-coloring problem.
int ReadSDPAFile (int argc, char *argv[])
 Read SDPA formatted file and solve the semidefinite program.
int SetStableSetData (DSDP, SDPCone, int, int, EdgeMat[])
 Given a graph, formulate maximum Stable Set problem and place data into solver.
int SetThetaData (DSDP, SDPCone, int, int, EdgeMat[])
 Given a graph, formulate Lovasz problem and set data.
int StableRandomized (SDPCone sdpcone, int nodes, int edges, EdgeMat Edge[])
 Apply a randomized procedure to find feasible stable sets.
int StableSet (int argc, char *argv[])
 Formulate and solve the maximum Stable Set problem.

Detailed Description

Examples that formulate problems in DSDP Standard Form. and solve them using DSDP.

Note:
These routines are examples! They not part of the subroutine library.

Function Documentation

int DSDPPrintData ( DSDP  dsdp,
SDPCone  sdpcone,
LPCone  lpcone 
)

Print data in SDPA format to a file named "output.sdpa".

Parameters:
dsdpthe solver
sdpconesemidefinite cone
lpconeLP cone

Definition at line 164 of file printsdpa.c.

Referenced by mexFunction(), and ReadSDPAFile().

int DSDPPrintSolution ( FILE *  fp,
DSDP  dsdp,
SDPCone  sdpcone,
LPCone  lpcone 
)

Print solution in SDPA format.

Parameters:
fpfile pointer
dsdpthe solver
sdpconesemidefinite cone
lpconeLP cone

Definition at line 94 of file printsdpa.c.

Referenced by ReadSDPAFile().

int LovaszTheta ( int  argc,
char *  argv[] 
)

Formulate and solve the Lovasz theta problem.

Parameters:
argcnumber of command line arguments
argvcommand line arguments
See also:
SetThetaData()

Definition at line 56 of file theta.c.

int MaxCut ( int  nnodes,
int  nedged,
int  node1[],
int  node2[],
double  weight[] 
)

Formulate and solve the SDP relaxation of the Maximum Cut problem.

Parameters:
nnodesnumber of nodes in graph
nedgesnumber of edges in graph
node1first node of each edge
node2second node of each edge
weightweight of each edge
Note:
This routine is an example! It is not part of the solver library.

Definition at line 51 of file maxcut.c.

int MaxCutRandomized ( SDPCone  sdpcone,
int  nnodes 
)

Apply the Goemens and Williamson randomized cut algorithm to the SDP relaxation of the max-cut problem.

int MaxCutRandomized(SDPCone sdpcone,int nnodes);

Parameters:
sdpconethe SDP cone
nnodesnumber of nodes in the graph
Note:
This routine is an example! It is not part of the solver library.
See also:
MaxCut()

Definition at line 175 of file maxcut.c.

Referenced by MaxCut().

void mexFunction ( int  nlhs,
mxArray *  plhs[],
int  nrhs,
const mxArray *  prhs[] 
)

Call DSDP from the Matlab environment.

Parameters:
nlhsis the number of output arguments
plhsare the output arguments
nrhsis the number of input arguments
prhsare the input arguments
Note:
Must be called from Matlab

Definition at line 35 of file dsdp.c.

int MinColoring ( int  argc,
char *  argv[] 
)

SDP relaxation of k-coloring problem.

Parameters:
argcnumber of command line arguments
argvcommand line arguments

Definition at line 39 of file color.c.

int ReadSDPAFile ( int  argc,
char *  argv[] 
)

Read SDPA formatted file and solve the semidefinite program.

Parameters:
argcnumber of command line arguments
argvcommand line arguments

Definition at line 80 of file readsdpa.c.

int SetStableSetData ( DSDP  dsdp,
SDPCone  sdpcone,
int  nodes,
int  edges,
EdgeMat  Edge[] 
)

Given a graph, formulate maximum Stable Set problem and place data into solver.

Parameters:
dsdpthe solver
sdpconethe semidefinite cone
nodesnumber of nodes in graph
edgesnumber of edges in graph
Edgeedges in graph
See also:
StableSet

Definition at line 107 of file stable.c.

Referenced by StableSet().

int SetThetaData ( DSDP  dsdp,
SDPCone  sdpcone,
int  nodes,
int  edges,
EdgeMat  Edge[] 
)

Given a graph, formulate Lovasz problem and set data.

Parameters:
dsdpthe solver
sdpconethe semidefinite cone
nodesnumber of nodes in graph
edgesnumber of edges in graph
Edgeedges in graph
See also:
LovaszTheta

Definition at line 126 of file theta.c.

Referenced by LovaszTheta().

int StableRandomized ( SDPCone  sdpcone,
int  nodes,
int  edges,
EdgeMat  Edge[] 
)

Apply a randomized procedure to find feasible stable sets.

int StableRandomized(SDPCone sdpcone,int nodes, int edges, EdgeMat Edge[]);

Parameters:
sdpconethe SDP cone
nodesnumber of nodes in the graph
edgesnumber of edges in the graph
EdgeArray of edges
Note:
This routine is an example! It is not part of the solver library.
See also:
MaxCutRandomized()

Definition at line 164 of file stable.c.

Referenced by StableSet().

int StableSet ( int  argc,
char *  argv[] 
)

Formulate and solve the maximum Stable Set problem.

Parameters:
argcnumber of command line arguments
argvcommand line arguments
See also:
SetStableSetData()

Definition at line 40 of file stable.c.