next up previous contents index
Next: Creating the Solver Up: DSDP5 User Guide - Previous: Applying DSDP to Graph   Contents   Index

DSDP Subroutine Library

DSDP can also be used within a C application through a set of subroutines. There are several examples of applications that use the DSDP application program interface. Within the DSDPROOT/examples/ directory, the file dsdp.c is a mex function that reads data from the MATLAB environment, passes the data to the DSDP solver, and returns the solution. The file readsdpa.c reads data from a file for data in SDPA format, passes the data to the solver, and prints the solution. The files maxcut.c and theta.c read a graph, formulate a semidefinite relaxation to a combinatorial problem, and pass the data to a DSDP solver. The subroutines used in these examples are described in this chapter.

Each of these applications includes the header file DSDPROOT/include/dsdp5.h and links to the library DSDPROOT/lib/libdsdp.a. All DSDP subroutines also return an int that represents an error code. A return value of zero indicates success, whereas a nonzero return value indicates that an error has occurred. The documentation of DSDP subroutines in this chapter will not show the return integer, but we highly recommend that applications check for errors after each subroutine.



Subsections
next up previous contents index
Next: Creating the Solver Up: DSDP5 User Guide - Previous: Applying DSDP to Graph   Contents   Index
Steven Benson 2005-02-11