Examples


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.


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.


Function Documentation

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

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

Parameters:
dsdp the solver
sdpcone semidefinite cone
lpcone LP 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:
fp file pointer
dsdp the solver
sdpcone semidefinite cone
lpcone LP 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:
argc number of command line arguments
argv command 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:
nnodes number of nodes in graph
nedges number of edges in graph
node1 first node of each edge
node2 second node of each edge
weight weight 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:
sdpcone the SDP cone
nnodes number 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:
nlhs is the number of output arguments
plhs are the output arguments
nrhs is the number of input arguments
prhs are 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:
argc number of command line arguments
argv command 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:
argc number of command line arguments
argv command 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:
dsdp the solver
sdpcone the semidefinite cone
nodes number of nodes in graph
edges number of edges in graph
Edge edges 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:
dsdp the solver
sdpcone the semidefinite cone
nodes number of nodes in graph
edges number of edges in graph
Edge edges 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:
sdpcone the SDP cone
nodes number of nodes in the graph
edges number of edges in the graph
Edge Array 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:
argc number of command line arguments
argv command line arguments
See also:
SetStableSetData()

Definition at line 40 of file stable.c.


Generated on Sun Mar 23 07:30:50 2008 for DSDP by  doxygen 1.5.5