DSDP
Functions
Examples

Functions

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

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

◆ DSDPPrintData()

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.

◆ DSDPPrintSolution()

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.

◆ LovaszTheta()

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.

◆ MaxCut()

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.

◆ MaxCutRandomized()

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.

◆ mexFunction()

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.

◆ MinColoring()

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.

◆ ReadSDPAFile()

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.

◆ SetStableSetData()

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.

◆ SetThetaData()

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.

◆ StableRandomized()

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.

◆ 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.