<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <title>DSDP: src/solver/dsdpcone.c Source File</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="doxygen.css" rel="stylesheet" type="text/css"/> </head> <body> <!-- Generated by Doxygen 1.7.4 --> <div id="top"> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">DSDP</div> </td> </tr> </tbody> </table> </div> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li><a href="annotated.html"><span>Data Structures</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> <li><a href="dirs.html"><span>Directories</span></a></li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="files.html"><span>File List</span></a></li> <li><a href="globals.html"><span>Globals</span></a></li> </ul> </div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="dir_23046874d7fed141927c769a66d8e3a5.html">src</a> </li> <li class="navelem"><a class="el" href="dir_03c647d51c93e018646ff83aa2eeb169.html">solver</a> </li> </ul> </div> </div> <div class="header"> <div class="headertitle"> <div class="title">dsdpcone.c</div> </div> </div> <div class="contents"> <a href="dsdpcone_8c.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#include "<a class="code" href="dsdpcone__impl_8h.html" title="Implementations of a cone (SDP,LP,...) must provide a structure of function pointers.">dsdpcone_impl.h</a>"</span> <a name="l00002"></a>00002 <span class="preprocessor">#include "<a class="code" href="dsdpcone_8h.html" title="The public interface between the cones and the solver.">dsdpcone.h</a>"</span> <a name="l00003"></a>00003 <span class="preprocessor">#include "<a class="code" href="dsdpsys_8h.html" title="Error handling, printing, and profiling.">dsdpsys.h</a>"</span> <a name="l00004"></a>00004 <a name="l00010"></a>00010 <span class="preprocessor">#define DSDPNoOperationError(a); { DSDPSETERR1(10,"Cone type: %s, Operation not defined\n",(a).dsdpops->name); }</span> <a name="l00011"></a>00011 <span class="preprocessor"></span><span class="preprocessor">#define DSDPChkConeError(a,b); { if (b){DSDPSETERR1(b,"Cone type: %s,\n",(a).dsdpops->name); } }</span> <a name="l00012"></a>00012 <span class="preprocessor"></span> <a name="l00020"></a>00020 <span class="preprocessor">#undef __FUNCT__ </span> <a name="l00021"></a>00021 <span class="preprocessor"></span><span class="preprocessor">#define __FUNCT__ "DSDPConeSetUp"</span> <a name="l00022"></a><a class="code" href="dsdpcone_8h.html#a7ec7799a19b23027131c33d498602941">00022</a> <span class="preprocessor"></span><span class="keywordtype">int</span> <a class="code" href="dsdpcone_8c.html#aa1f01d8a4b8c0c27f00f2921c015dce7" title="Factor the data and allocate data structures.">DSDPConeSetUp</a>(<a class="code" href="dsdpcone_8h.html#a635fc48fba0ec5edb9b23bd57aadb1e1" title="This object holds the data of a SDP, LP, or other cone. Its structure is opaque to the DSDP Solver...">DSDPCone</a> K,<a class="code" href="dsdpvec_8h.html#a421243d35437ad44ded3c1e34198e8e9" title="This object hold m+2 variables: a scaling of C, the y variables, and r.">DSDPVec</a> y){ <a name="l00023"></a>00023 <span class="keywordtype">int</span> info; <a name="l00024"></a>00024 DSDPFunctionBegin; <a name="l00025"></a>00025 <span class="keywordflow">if</span> (K.dsdpops->conesetup){ <a name="l00026"></a>00026 info=K.dsdpops->conesetup(K.conedata,y);DSDPChkConeError(K,info); <a name="l00027"></a>00027 } <span class="keywordflow">else</span> { <a name="l00028"></a>00028 DSDPNoOperationError(K); <a name="l00029"></a>00029 } <a name="l00030"></a>00030 DSDPFunctionReturn(0); <a name="l00031"></a>00031 } <a name="l00032"></a>00032 <a name="l00041"></a>00041 <span class="preprocessor">#undef __FUNCT__ </span> <a name="l00042"></a>00042 <span class="preprocessor"></span><span class="preprocessor">#define __FUNCT__ "DSDPConeSetUp2"</span> <a name="l00043"></a><a class="code" href="dsdpcone_8h.html#a181349b08c203b493ded2cb6de8897a8">00043</a> <span class="preprocessor"></span><span class="keywordtype">int</span> <a class="code" href="dsdpcone_8c.html#ae1ea61e209ed52b7f11098cf5365c195" title="Factor the data and allocate data structures.">DSDPConeSetUp2</a>(<a class="code" href="dsdpcone_8h.html#a635fc48fba0ec5edb9b23bd57aadb1e1" title="This object holds the data of a SDP, LP, or other cone. Its structure is opaque to the DSDP Solver...">DSDPCone</a> K, <a class="code" href="dsdpvec_8h.html#a421243d35437ad44ded3c1e34198e8e9" title="This object hold m+2 variables: a scaling of C, the y variables, and r.">DSDPVec</a> yy0, <a class="code" href="structDSDPSchurMat__C.html" title="Schur complement matrix whose solution is the Newton direction.">DSDPSchurMat</a> M){ <a name="l00044"></a>00044 <span class="keywordtype">int</span> info; <a name="l00045"></a>00045 DSDPFunctionBegin; <a name="l00046"></a>00046 <span class="keywordflow">if</span> (K.dsdpops->conesetup2){ <a name="l00047"></a>00047 info=K.dsdpops->conesetup2(K.conedata,yy0,M);DSDPChkConeError(K,info); <a name="l00048"></a>00048 } <span class="keywordflow">else</span> { <a name="l00049"></a>00049 DSDPNoOperationError(K); <a name="l00050"></a>00050 } <a name="l00051"></a>00051 DSDPFunctionReturn(0); <a name="l00052"></a>00052 } <a name="l00053"></a>00053 <a name="l00054"></a>00054 <a name="l00062"></a>00062 <span class="preprocessor">#undef __FUNCT__ </span> <a name="l00063"></a>00063 <span class="preprocessor"></span><span class="preprocessor">#define __FUNCT__ "DSDPConeDestroy"</span> <a name="l00064"></a><a class="code" href="dsdpcone_8h.html#a166cb6e08acee23f62b1cc7a73711bdf">00064</a> <span class="preprocessor"></span><span class="keywordtype">int</span> <a class="code" href="dsdpcone_8c.html#aa83677b3889ea8b0f6c2ab5f96e556d3" title="Free the internal memory of the cone.">DSDPConeDestroy</a>(<a class="code" href="dsdpcone_8h.html#a635fc48fba0ec5edb9b23bd57aadb1e1" title="This object holds the data of a SDP, LP, or other cone. Its structure is opaque to the DSDP Solver...">DSDPCone</a> *K){ <a name="l00065"></a>00065 <span class="keywordtype">int</span> info; <a name="l00066"></a>00066 DSDPFunctionBegin; <a name="l00067"></a>00067 <span class="keywordflow">if</span> ((*K).dsdpops->conedestroy){ <a name="l00068"></a>00068 info=(*K).dsdpops->conedestroy((*K).conedata);DSDPChkConeError(*K,info); <a name="l00069"></a>00069 info=<a class="code" href="dsdpcone_8c.html#a3a14b6dd810e1cbed712537487a1ce58" title="Initialize the pointers to 0.">DSDPConeInitialize</a>(K); DSDPCHKERR(info); <a name="l00070"></a>00070 } <span class="keywordflow">else</span> { <a name="l00071"></a>00071 DSDPNoOperationError(*K); <a name="l00072"></a>00072 } <a name="l00073"></a>00073 DSDPFunctionReturn(0); <a name="l00074"></a>00074 } <a name="l00075"></a>00075 <a name="l00076"></a>00076 <a name="l00090"></a>00090 <span class="preprocessor">#undef __FUNCT__ </span> <a name="l00091"></a>00091 <span class="preprocessor"></span><span class="preprocessor">#define __FUNCT__ "DSDPConeComputeHessian"</span> <a name="l00092"></a><a class="code" href="dsdpcone_8h.html#a49145120bcef4810adbfbc4246ca37aa">00092</a> <span class="preprocessor"></span><span class="keywordtype">int</span> <a class="code" href="dsdpcone_8c.html#abf554f6b46448ff85d00cbafd0ebb27a" title="Compute Hessian and gradient of barrier function.">DSDPConeComputeHessian</a>( <a class="code" href="dsdpcone_8h.html#a635fc48fba0ec5edb9b23bd57aadb1e1" title="This object holds the data of a SDP, LP, or other cone. Its structure is opaque to the DSDP Solver...">DSDPCone</a> K , <span class="keywordtype">double</span> mu, <a class="code" href="structDSDPSchurMat__C.html" title="Schur complement matrix whose solution is the Newton direction.">DSDPSchurMat</a> M, <a class="code" href="dsdpvec_8h.html#a421243d35437ad44ded3c1e34198e8e9" title="This object hold m+2 variables: a scaling of C, the y variables, and r.">DSDPVec</a> vrhs1, <a class="code" href="dsdpvec_8h.html#a421243d35437ad44ded3c1e34198e8e9" title="This object hold m+2 variables: a scaling of C, the y variables, and r.">DSDPVec</a> vrhs2){ <a name="l00093"></a>00093 <span class="keywordtype">int</span> info; <a name="l00094"></a>00094 DSDPFunctionBegin; <a name="l00095"></a>00095 <span class="keywordflow">if</span> (K.dsdpops->conehessian){ <a name="l00096"></a>00096 info=K.dsdpops->conehessian(K.conedata,mu,M,vrhs1,vrhs2);DSDPChkConeError(K,info); <a name="l00097"></a>00097 } <span class="keywordflow">else</span> { <a name="l00098"></a>00098 DSDPNoOperationError(K); <a name="l00099"></a>00099 } <a name="l00100"></a>00100 DSDPFunctionReturn(0); <a name="l00101"></a>00101 } <a name="l00102"></a>00102 <a name="l00103"></a>00103 <a name="l00117"></a>00117 <span class="preprocessor">#undef __FUNCT__ </span> <a name="l00118"></a>00118 <span class="preprocessor"></span><span class="preprocessor">#define __FUNCT__ "DSDPConeMultiplyAdd"</span> <a name="l00119"></a><a class="code" href="dsdpcone_8h.html#aabd067915e91d346ed8d5b01b1a6bdc1">00119</a> <span class="preprocessor"></span><span class="keywordtype">int</span> <a class="code" href="dsdpcone_8c.html#ace18be7143284ccf104156494f081660" title="Multiply Hessian by a vector and add the result.">DSDPConeMultiplyAdd</a>( <a class="code" href="dsdpcone_8h.html#a635fc48fba0ec5edb9b23bd57aadb1e1" title="This object holds the data of a SDP, LP, or other cone. Its structure is opaque to the DSDP Solver...">DSDPCone</a> K , <span class="keywordtype">double</span> mu, <a class="code" href="dsdpvec_8h.html#a421243d35437ad44ded3c1e34198e8e9" title="This object hold m+2 variables: a scaling of C, the y variables, and r.">DSDPVec</a> vrow, <a class="code" href="dsdpvec_8h.html#a421243d35437ad44ded3c1e34198e8e9" title="This object hold m+2 variables: a scaling of C, the y variables, and r.">DSDPVec</a> v, <a class="code" href="dsdpvec_8h.html#a421243d35437ad44ded3c1e34198e8e9" title="This object hold m+2 variables: a scaling of C, the y variables, and r.">DSDPVec</a> vv){ <a name="l00120"></a>00120 <span class="keywordtype">int</span> info; <a name="l00121"></a>00121 DSDPFunctionBegin; <a name="l00122"></a>00122 <span class="keywordflow">if</span> (K.dsdpops->conehmultiplyadd){ <a name="l00123"></a>00123 info=K.dsdpops->conehmultiplyadd(K.conedata,mu,vrow,v,vv);DSDPChkConeError(K,info); <a name="l00124"></a>00124 } <span class="keywordflow">else</span> { <a name="l00125"></a>00125 DSDPNoOperationError(K); <a name="l00126"></a>00126 } <a name="l00127"></a>00127 DSDPFunctionReturn(0); <a name="l00128"></a>00128 } <a name="l00129"></a>00129 <a name="l00130"></a>00130 <a name="l00145"></a>00145 <span class="preprocessor">#undef __FUNCT__ </span> <a name="l00146"></a>00146 <span class="preprocessor"></span><span class="preprocessor">#define __FUNCT__ "DSDPConeComputeRHS"</span> <a name="l00147"></a><a class="code" href="dsdpcone_8h.html#a6c146a9edd67495742945f8510df9291">00147</a> <span class="preprocessor"></span><span class="keywordtype">int</span> <a class="code" href="dsdpcone_8c.html#aab3922a9faf6cb038282a61c2647c8e7" title="Compute gradient of barrier function.">DSDPConeComputeRHS</a>( <a class="code" href="dsdpcone_8h.html#a635fc48fba0ec5edb9b23bd57aadb1e1" title="This object holds the data of a SDP, LP, or other cone. Its structure is opaque to the DSDP Solver...">DSDPCone</a> K , <span class="keywordtype">double</span> mu, <a class="code" href="dsdpvec_8h.html#a421243d35437ad44ded3c1e34198e8e9" title="This object hold m+2 variables: a scaling of C, the y variables, and r.">DSDPVec</a> vrow,<a class="code" href="dsdpvec_8h.html#a421243d35437ad44ded3c1e34198e8e9" title="This object hold m+2 variables: a scaling of C, the y variables, and r.">DSDPVec</a> rhs1,<a class="code" href="dsdpvec_8h.html#a421243d35437ad44ded3c1e34198e8e9" title="This object hold m+2 variables: a scaling of C, the y variables, and r.">DSDPVec</a> rhs2){ <a name="l00148"></a>00148 <span class="keywordtype">int</span> info; <a name="l00149"></a>00149 DSDPFunctionBegin; <a name="l00150"></a>00150 <span class="keywordflow">if</span> (K.dsdpops->conerhs){ <a name="l00151"></a>00151 info=K.dsdpops->conerhs(K.conedata,mu,vrow,rhs1,rhs2);DSDPChkConeError(K,info); <a name="l00152"></a>00152 } <span class="keywordflow">else</span> { <a name="l00153"></a>00153 DSDPNoOperationError(K); <a name="l00154"></a>00154 } <a name="l00155"></a>00155 DSDPFunctionReturn(0); <a name="l00156"></a>00156 } <a name="l00157"></a>00157 <a name="l00166"></a>00166 <span class="preprocessor">#undef __FUNCT__ </span> <a name="l00167"></a>00167 <span class="preprocessor"></span><span class="preprocessor">#define __FUNCT__ "DSDPConeANorm2"</span> <a name="l00168"></a><a class="code" href="dsdpcone_8h.html#ad07445aa1e62ad491b95280bdccd82ca">00168</a> <span class="preprocessor"></span><span class="keywordtype">int</span> <a class="code" href="dsdpcone_8c.html#af1530141e91409217aabb01bbdac244a" title="Add square of 2-norm of data correponding to each variable y.">DSDPConeANorm2</a>( <a class="code" href="dsdpcone_8h.html#a635fc48fba0ec5edb9b23bd57aadb1e1" title="This object holds the data of a SDP, LP, or other cone. Its structure is opaque to the DSDP Solver...">DSDPCone</a> K , <a class="code" href="dsdpvec_8h.html#a421243d35437ad44ded3c1e34198e8e9" title="This object hold m+2 variables: a scaling of C, the y variables, and r.">DSDPVec</a> anorm2){ <a name="l00169"></a>00169 <span class="keywordtype">int</span> info; <a name="l00170"></a>00170 DSDPFunctionBegin; <a name="l00171"></a>00171 <span class="keywordflow">if</span> (K.dsdpops->coneanorm2){ <a name="l00172"></a>00172 info=K.dsdpops->coneanorm2(K.conedata,anorm2);DSDPChkConeError(K,info); <a name="l00173"></a>00173 } <span class="keywordflow">else</span> { <a name="l00174"></a>00174 DSDPNoOperationError(K); <a name="l00175"></a>00175 } <a name="l00176"></a>00176 DSDPFunctionReturn(0); <a name="l00177"></a>00177 } <a name="l00178"></a>00178 <a name="l00189"></a>00189 <span class="preprocessor">#undef __FUNCT__ </span> <a name="l00190"></a>00190 <span class="preprocessor"></span><span class="preprocessor">#define __FUNCT__ "DSDPConeSetXMaker"</span> <a name="l00191"></a><a class="code" href="dsdpcone_8h.html#adb36f7523951f8164b00f8374ec175e0">00191</a> <span class="preprocessor"></span><span class="keywordtype">int</span> <a class="code" href="dsdpcone_8c.html#a855eebeeb260f54298f00c05171e4f5a" title="Pass information needed to construct X.">DSDPConeSetXMaker</a>( <a class="code" href="dsdpcone_8h.html#a635fc48fba0ec5edb9b23bd57aadb1e1" title="This object holds the data of a SDP, LP, or other cone. Its structure is opaque to the DSDP Solver...">DSDPCone</a> K, <span class="keywordtype">double</span> mu, <a class="code" href="dsdpvec_8h.html#a421243d35437ad44ded3c1e34198e8e9" title="This object hold m+2 variables: a scaling of C, the y variables, and r.">DSDPVec</a> y, <a class="code" href="dsdpvec_8h.html#a421243d35437ad44ded3c1e34198e8e9" title="This object hold m+2 variables: a scaling of C, the y variables, and r.">DSDPVec</a> dy){ <a name="l00192"></a>00192 <span class="keywordtype">int</span> info; <a name="l00193"></a>00193 DSDPFunctionBegin; <a name="l00194"></a>00194 <span class="keywordflow">if</span> (K.dsdpops->conesetxmaker){ <a name="l00195"></a>00195 info=K.dsdpops->conesetxmaker(K.conedata,mu,y,dy);DSDPChkConeError(K,info); <a name="l00196"></a>00196 } <span class="keywordflow">else</span> { <a name="l00197"></a>00197 DSDPNoOperationError(K); <a name="l00198"></a>00198 } <a name="l00199"></a>00199 DSDPFunctionReturn(0); <a name="l00200"></a>00200 } <a name="l00201"></a>00201 <a name="l00214"></a>00214 <span class="preprocessor">#undef __FUNCT__ </span> <a name="l00215"></a>00215 <span class="preprocessor"></span><span class="preprocessor">#define __FUNCT__ "DSDPConeComputeX"</span> <a name="l00216"></a><a class="code" href="dsdpcone_8h.html#a8dc04fee8a2283c27399db098fe8d189">00216</a> <span class="preprocessor"></span><span class="keywordtype">int</span> <a class="code" href="dsdpcone_8c.html#a08aac87e75081491fa3c500e37c2ce51" title="Given y,dy, and mu, construct X and add its inner product with the data and S.">DSDPConeComputeX</a>( <a class="code" href="dsdpcone_8h.html#a635fc48fba0ec5edb9b23bd57aadb1e1" title="This object holds the data of a SDP, LP, or other cone. Its structure is opaque to the DSDP Solver...">DSDPCone</a> K, <span class="keywordtype">double</span> mu, <a class="code" href="dsdpvec_8h.html#a421243d35437ad44ded3c1e34198e8e9" title="This object hold m+2 variables: a scaling of C, the y variables, and r.">DSDPVec</a> y, <a class="code" href="dsdpvec_8h.html#a421243d35437ad44ded3c1e34198e8e9" title="This object hold m+2 variables: a scaling of C, the y variables, and r.">DSDPVec</a> dy, <a class="code" href="dsdpvec_8h.html#a421243d35437ad44ded3c1e34198e8e9" title="This object hold m+2 variables: a scaling of C, the y variables, and r.">DSDPVec</a> AX, <span class="keywordtype">double</span> *tracexs){ <a name="l00217"></a>00217 <span class="keywordtype">int</span> info; <a name="l00218"></a>00218 <span class="keywordtype">double</span> trxs; <a name="l00219"></a>00219 DSDPFunctionBegin; <a name="l00220"></a>00220 <span class="keywordflow">if</span> (K.dsdpops->conecomputex){ <a name="l00221"></a>00221 trxs=0; <a name="l00222"></a>00222 info=K.dsdpops->conecomputex(K.conedata,mu,y,dy,AX,&trxs);DSDPChkConeError(K,info); <a name="l00223"></a>00223 *tracexs+=trxs; <a name="l00224"></a>00224 } <span class="keywordflow">else</span> { <a name="l00225"></a>00225 DSDPNoOperationError(K); <a name="l00226"></a>00226 } <a name="l00227"></a>00227 DSDPFunctionReturn(0); <a name="l00228"></a>00228 } <a name="l00229"></a>00229 <a name="l00240"></a>00240 <span class="preprocessor">#undef __FUNCT__</span> <a name="l00241"></a>00241 <span class="preprocessor"></span><span class="preprocessor">#define __FUNCT__ "DSDPConeComputeS"</span> <a name="l00242"></a><a class="code" href="dsdpcone_8h.html#a592b13c0d47de855dd6595e4bc0bfc2c">00242</a> <span class="preprocessor"></span><span class="keywordtype">int</span> <a class="code" href="dsdpcone_8c.html#a662cc8198f094c46e5bce9f25a21e245" title="Given y, compute S and determine whether its in the cone.">DSDPConeComputeS</a>(<a class="code" href="dsdpcone_8h.html#a635fc48fba0ec5edb9b23bd57aadb1e1" title="This object holds the data of a SDP, LP, or other cone. Its structure is opaque to the DSDP Solver...">DSDPCone</a> K, <a class="code" href="dsdpvec_8h.html#a421243d35437ad44ded3c1e34198e8e9" title="This object hold m+2 variables: a scaling of C, the y variables, and r.">DSDPVec</a> Y, <a class="code" href="dsdpbasictypes_8h.html#ae47666e7e5d77002110e20ef9ebb634b" title="DSDP requires two instances of the data structures S.">DSDPDualFactorMatrix</a> flag, <a class="code" href="dsdpbasictypes_8h.html#ae667f2bff3ab5ab0bc109fa76dc4ed65" title="Boolean variables.">DSDPTruth</a> *ispsdefinite){ <a name="l00243"></a>00243 <span class="keywordtype">int</span> info; <a name="l00244"></a>00244 DSDPFunctionBegin; <a name="l00245"></a>00245 <span class="keywordflow">if</span> (K.dsdpops->conecomputes){ <a name="l00246"></a>00246 info=K.dsdpops->conecomputes(K.conedata,Y,flag,ispsdefinite);DSDPChkConeError(K,info); <a name="l00247"></a>00247 } <span class="keywordflow">else</span> { <a name="l00248"></a>00248 DSDPNoOperationError(K); <a name="l00249"></a>00249 } <a name="l00250"></a>00250 DSDPFunctionReturn(0); <a name="l00251"></a>00251 } <a name="l00252"></a>00252 <a name="l00253"></a>00253 <a name="l00263"></a>00263 <span class="preprocessor">#undef __FUNCT__</span> <a name="l00264"></a>00264 <span class="preprocessor"></span><span class="preprocessor">#define __FUNCT__ "DSDPConeInvertS"</span> <a name="l00265"></a><a class="code" href="dsdpcone_8h.html#a1e54269e513d8b24042d534d5da3ded2">00265</a> <span class="preprocessor"></span><span class="keywordtype">int</span> <a class="code" href="dsdpcone_8c.html#a8eb4a6997933bfd177cfc1bf75f9a3bf" title="Invert the dual matrix S.">DSDPConeInvertS</a>(<a class="code" href="dsdpcone_8h.html#a635fc48fba0ec5edb9b23bd57aadb1e1" title="This object holds the data of a SDP, LP, or other cone. Its structure is opaque to the DSDP Solver...">DSDPCone</a> K){ <a name="l00266"></a>00266 <span class="keywordtype">int</span> info; <a name="l00267"></a>00267 DSDPFunctionBegin; <a name="l00268"></a>00268 <span class="keywordflow">if</span> (K.dsdpops->coneinverts){ <a name="l00269"></a>00269 info=K.dsdpops->coneinverts(K.conedata);DSDPChkConeError(K,info); <a name="l00270"></a>00270 } <span class="keywordflow">else</span> { <a name="l00271"></a>00271 DSDPNoOperationError(K); <a name="l00272"></a>00272 } <a name="l00273"></a>00273 DSDPFunctionReturn(0); <a name="l00274"></a>00274 } <a name="l00275"></a>00275 <a name="l00286"></a>00286 <span class="preprocessor">#undef __FUNCT__</span> <a name="l00287"></a>00287 <span class="preprocessor"></span><span class="preprocessor">#define __FUNCT__ "DSDPConeComputeMaxStepLength"</span> <a name="l00288"></a><a class="code" href="dsdpcone_8h.html#acc327af027a77aa7d924b9974e5a3620">00288</a> <span class="preprocessor"></span><span class="keywordtype">int</span> <a class="code" href="dsdpcone_8c.html#a57df4302573f1afba87d10eb098be9b7" title="Determine distance to the edge of the cone.">DSDPConeComputeMaxStepLength</a>(<a class="code" href="dsdpcone_8h.html#a635fc48fba0ec5edb9b23bd57aadb1e1" title="This object holds the data of a SDP, LP, or other cone. Its structure is opaque to the DSDP Solver...">DSDPCone</a> K, <a class="code" href="dsdpvec_8h.html#a421243d35437ad44ded3c1e34198e8e9" title="This object hold m+2 variables: a scaling of C, the y variables, and r.">DSDPVec</a> DY, <a class="code" href="dsdpbasictypes_8h.html#ae47666e7e5d77002110e20ef9ebb634b" title="DSDP requires two instances of the data structures S.">DSDPDualFactorMatrix</a> flag, <span class="keywordtype">double</span> *maxsteplength){ <a name="l00289"></a>00289 <span class="keywordtype">int</span> info; <a name="l00290"></a>00290 <span class="keywordtype">double</span> conesteplength=1.0e20; <a name="l00291"></a>00291 DSDPFunctionBegin; <a name="l00292"></a>00292 conesteplength=1.0e30; <a name="l00293"></a>00293 <span class="keywordflow">if</span> (K.dsdpops->conemaxsteplength){ <a name="l00294"></a>00294 info=K.dsdpops->conemaxsteplength(K.conedata,DY,flag,&conesteplength);DSDPChkConeError(K,info); <a name="l00295"></a>00295 } <span class="keywordflow">else</span> { <a name="l00296"></a>00296 DSDPNoOperationError(K); <a name="l00297"></a>00297 } <a name="l00298"></a>00298 *maxsteplength=conesteplength; <a name="l00299"></a>00299 DSDPFunctionReturn(0); <a name="l00300"></a>00300 } <a name="l00301"></a>00301 <a name="l00310"></a>00310 <span class="preprocessor">#undef __FUNCT__</span> <a name="l00311"></a>00311 <span class="preprocessor"></span><span class="preprocessor">#define __FUNCT__ "DSDPConeGetDimension"</span> <a name="l00312"></a><a class="code" href="dsdpcone_8h.html#aa9f368dde0884b83e829d032fa14b4ee">00312</a> <span class="preprocessor"></span><span class="keywordtype">int</span> <a class="code" href="dsdpcone_8c.html#a952e902aab678a96a00cefeb27861a8b" title="Provide the dimension of the cone.">DSDPConeGetDimension</a>(<a class="code" href="dsdpcone_8h.html#a635fc48fba0ec5edb9b23bd57aadb1e1" title="This object holds the data of a SDP, LP, or other cone. Its structure is opaque to the DSDP Solver...">DSDPCone</a> K, <span class="keywordtype">double</span> *n){ <a name="l00313"></a>00313 <span class="keywordtype">int</span> info; <a name="l00314"></a>00314 <span class="keywordtype">double</span> nn=0; <a name="l00315"></a>00315 DSDPFunctionBegin; <a name="l00316"></a>00316 <span class="keywordflow">if</span> (K.dsdpops->conesize){ <a name="l00317"></a>00317 info=K.dsdpops->conesize(K.conedata,&nn);DSDPChkConeError(K,info); <a name="l00318"></a>00318 } <span class="keywordflow">else</span> { <a name="l00319"></a>00319 DSDPNoOperationError(K); <a name="l00320"></a>00320 } <a name="l00321"></a>00321 *n=nn; <a name="l00322"></a>00322 DSDPFunctionReturn(0); <a name="l00323"></a>00323 } <a name="l00324"></a>00324 <a name="l00336"></a>00336 <span class="preprocessor">#undef __FUNCT__</span> <a name="l00337"></a>00337 <span class="preprocessor"></span><span class="preprocessor">#define __FUNCT__ "DSDPSparsityInSchurMat"</span> <a name="l00338"></a><a class="code" href="dsdpcone_8h.html#a8bbc97b1d6ab25b35c5818ab52c9afe9">00338</a> <span class="preprocessor"></span><span class="keywordtype">int</span> <a class="code" href="dsdpcone_8c.html#ab2d33b754ac2b2adc12b72eb93d6f00a" title="Identify sparsity pattern in a row of the Hessian term.">DSDPConeSparsityInSchurMat</a>(<a class="code" href="dsdpcone_8h.html#a635fc48fba0ec5edb9b23bd57aadb1e1" title="This object holds the data of a SDP, LP, or other cone. Its structure is opaque to the DSDP Solver...">DSDPCone</a> K, <span class="keywordtype">int</span> row, <span class="keywordtype">int</span> rnnz[], <span class="keywordtype">int</span> m){ <a name="l00339"></a>00339 <span class="keywordtype">int</span> info,tt; <a name="l00340"></a>00340 DSDPFunctionBegin; <a name="l00341"></a>00341 <span class="keywordflow">if</span> (K.dsdpops->conesparsity){ <a name="l00342"></a>00342 info=K.dsdpops->conesparsity(K.conedata,row,&tt,rnnz,m);DSDPChkConeError(K,info); <a name="l00343"></a>00343 } <span class="keywordflow">else</span> { <a name="l00344"></a>00344 DSDPNoOperationError(K); <a name="l00345"></a>00345 } <a name="l00346"></a>00346 DSDPFunctionReturn(0); <a name="l00347"></a>00347 } <a name="l00348"></a>00348 <a name="l00356"></a>00356 <span class="preprocessor">#undef __FUNCT__</span> <a name="l00357"></a>00357 <span class="preprocessor"></span><span class="preprocessor">#define __FUNCT__ "DSDPConeView"</span> <a name="l00358"></a><a class="code" href="dsdpcone_8h.html#a1bf79645f43ecdb30a84add27e51e165">00358</a> <span class="preprocessor"></span><span class="keywordtype">int</span> <a class="code" href="dsdpcone_8c.html#a02e7404ce5e23352fd5f988d03300335" title="View contents of the cone.">DSDPConeView</a>(<a class="code" href="dsdpcone_8h.html#a635fc48fba0ec5edb9b23bd57aadb1e1" title="This object holds the data of a SDP, LP, or other cone. Its structure is opaque to the DSDP Solver...">DSDPCone</a> K){ <a name="l00359"></a>00359 <span class="keywordtype">int</span> info; <a name="l00360"></a>00360 DSDPFunctionBegin; <a name="l00361"></a>00361 <span class="keywordflow">if</span> (K.dsdpops->coneview){ <a name="l00362"></a>00362 info=K.dsdpops->coneview(K.conedata);DSDPChkConeError(K,info); <a name="l00363"></a>00363 } <span class="keywordflow">else</span> { <a name="l00364"></a>00364 DSDPNoOperationError(K); <a name="l00365"></a>00365 } <a name="l00366"></a>00366 DSDPFunctionReturn(0); <a name="l00367"></a>00367 } <a name="l00368"></a>00368 <a name="l00378"></a>00378 <span class="preprocessor">#undef __FUNCT__</span> <a name="l00379"></a>00379 <span class="preprocessor"></span><span class="preprocessor">#define __FUNCT__ "DSDPConeMonitor"</span> <a name="l00380"></a><a class="code" href="dsdpcone_8h.html#ac57dc15d70a812f3a2332d5dc9d8b137">00380</a> <span class="preprocessor"></span><span class="keywordtype">int</span> <a class="code" href="dsdpcone_8c.html#a86d47e198ccf3003c2fa4f1710002146" title="Do anything at in the cone at each iteration.">DSDPConeMonitor</a>(<a class="code" href="dsdpcone_8h.html#a635fc48fba0ec5edb9b23bd57aadb1e1" title="This object holds the data of a SDP, LP, or other cone. Its structure is opaque to the DSDP Solver...">DSDPCone</a> K, <span class="keywordtype">int</span> tag){ <a name="l00381"></a>00381 <span class="keywordtype">int</span> info; <a name="l00382"></a>00382 DSDPFunctionBegin; <a name="l00383"></a>00383 <span class="keywordflow">if</span> (K.dsdpops->conemonitor){ <a name="l00384"></a>00384 info=K.dsdpops->conemonitor(K.conedata,tag);DSDPChkConeError(K,info); <a name="l00385"></a>00385 } <span class="keywordflow">else</span> { <a name="l00386"></a>00386 DSDPNoOperationError(K); <a name="l00387"></a>00387 } <a name="l00388"></a>00388 DSDPFunctionReturn(0); <a name="l00389"></a>00389 } <a name="l00390"></a>00390 <a name="l00391"></a>00391 <a name="l00401"></a>00401 <span class="preprocessor">#undef __FUNCT__</span> <a name="l00402"></a>00402 <span class="preprocessor"></span><span class="preprocessor">#define __FUNCT__ "DSDPConeComputeLogSDeterminant"</span> <a name="l00403"></a><a class="code" href="dsdpcone_8h.html#aa98f51d173b57e43d1a97198f5a26c2a">00403</a> <span class="preprocessor"></span><span class="keywordtype">int</span> <a class="code" href="dsdpcone_8c.html#a8ded3e18b57af86f930fbc025c529d70" title="Evaluate logrithmic barrier function.">DSDPConeComputeLogSDeterminant</a>(<a class="code" href="dsdpcone_8h.html#a635fc48fba0ec5edb9b23bd57aadb1e1" title="This object holds the data of a SDP, LP, or other cone. Its structure is opaque to the DSDP Solver...">DSDPCone</a> K, <span class="keywordtype">double</span> *logdetobj, <span class="keywordtype">double</span> *logdet){ <a name="l00404"></a>00404 <span class="keywordtype">int</span> info; <a name="l00405"></a>00405 <span class="keywordtype">double</span> conepotential1=0,conepotential2=0; <a name="l00406"></a>00406 DSDPFunctionBegin; <a name="l00407"></a>00407 <span class="keywordflow">if</span> (K.dsdpops->conelogpotential){ <a name="l00408"></a>00408 info=K.dsdpops->conelogpotential(K.conedata,&conepotential1,&conepotential2);DSDPChkConeError(K,info); <a name="l00409"></a>00409 } <span class="keywordflow">else</span> { <a name="l00410"></a>00410 DSDPNoOperationError(K); <a name="l00411"></a>00411 } <a name="l00412"></a>00412 *logdetobj=conepotential1; <a name="l00413"></a>00413 *logdet=conepotential2; <a name="l00414"></a>00414 DSDPFunctionReturn(0); <a name="l00415"></a>00415 } <a name="l00416"></a>00416 <a name="l00425"></a>00425 <span class="preprocessor">#undef __FUNCT__</span> <a name="l00426"></a>00426 <span class="preprocessor"></span><span class="preprocessor">#define __FUNCT__ "DSDPGetConeName"</span> <a name="l00427"></a><a class="code" href="dsdpcone_8h.html#a7cd9b87b0e700050fda2f3c8f942e419">00427</a> <span class="preprocessor"></span><span class="keywordtype">int</span> <a class="code" href="dsdpcone_8c.html#a4c1f6ff4554b63539556c8c00a79e205" title="Get name of the cone.">DSDPGetConeName</a>(<a class="code" href="dsdpcone_8h.html#a635fc48fba0ec5edb9b23bd57aadb1e1" title="This object holds the data of a SDP, LP, or other cone. Its structure is opaque to the DSDP Solver...">DSDPCone</a> K, <span class="keywordtype">char</span> *cname, <span class="keywordtype">int</span> maxlength){ <a name="l00428"></a>00428 DSDPFunctionBegin; <a name="l00429"></a>00429 strncpy(cname,K.dsdpops->name,maxlength); <a name="l00430"></a>00430 DSDPFunctionReturn(0); <a name="l00431"></a>00431 } <a name="l00432"></a>00432 <a name="l00433"></a>00433 <a name="l00434"></a>00434 <a name="l00441"></a>00441 <span class="preprocessor">#undef __FUNCT__</span> <a name="l00442"></a>00442 <span class="preprocessor"></span><span class="preprocessor">#define __FUNCT__ "DSDPConeOpsInitialize"</span> <a name="l00443"></a><a class="code" href="dsdpcone__impl_8h.html#ac6eb8fe37627410ea4aa4ba94c0badda">00443</a> <span class="preprocessor"></span><span class="keywordtype">int</span> <a class="code" href="dsdpcone_8c.html#ad1e12a500997ab2be6b7e24536017e95" title="Initialize the function pointers to 0.">DSDPConeOpsInitialize</a>(<span class="keyword">struct</span> DSDPCone_Ops* dops){ <a name="l00444"></a>00444 DSDPFunctionBegin; <a name="l00445"></a>00445 <span class="keywordflow">if</span> (dops==NULL) <span class="keywordflow">return</span> 0; <a name="l00446"></a>00446 <a name="l00447"></a>00447 dops->conesetup=0; <a name="l00448"></a>00448 dops->conesetup2=0; <a name="l00449"></a>00449 dops->conedestroy=0; <a name="l00450"></a>00450 dops->coneanorm2=0; <a name="l00451"></a>00451 dops->conehessian=0; <a name="l00452"></a>00452 dops->conehmultiplyadd=0; <a name="l00453"></a>00453 dops->conerhs=0; <a name="l00454"></a>00454 dops->conesetxmaker=0; <a name="l00455"></a>00455 dops->conecomputex=0; <a name="l00456"></a>00456 dops->conecomputes=0; <a name="l00457"></a>00457 dops->coneinverts=0; <a name="l00458"></a>00458 dops->conemaxsteplength=0; <a name="l00459"></a>00459 dops->conesparsity=0; <a name="l00460"></a>00460 dops->conelogpotential=0; <a name="l00461"></a>00461 dops->conemonitor=0; <a name="l00462"></a>00462 dops->coneview=0; <a name="l00463"></a>00463 dops->id=0; <a name="l00464"></a>00464 DSDPFunctionReturn(0); <a name="l00465"></a>00465 } <a name="l00466"></a>00466 <a name="l00475"></a>00475 <span class="preprocessor">#undef __FUNCT__</span> <a name="l00476"></a>00476 <span class="preprocessor"></span><span class="preprocessor">#define __FUNCT__ "DSDPConeSetData"</span> <a name="l00477"></a><a class="code" href="dsdpcone_8h.html#a073ebe136767091d83d4fa2c5b992cf8">00477</a> <span class="preprocessor"></span><span class="keywordtype">int</span> <a class="code" href="dsdpcone_8c.html#abf7509c885d7e32c250657ecf88619d4" title="Initialize the pointers to 0.">DSDPConeSetData</a>(<a class="code" href="dsdpcone_8h.html#a635fc48fba0ec5edb9b23bd57aadb1e1" title="This object holds the data of a SDP, LP, or other cone. Its structure is opaque to the DSDP Solver...">DSDPCone</a> *K, <span class="keyword">struct</span> DSDPCone_Ops* ops, <span class="keywordtype">void</span>* data){ <a name="l00478"></a>00478 DSDPFunctionBegin; <a name="l00479"></a>00479 (*K).dsdpops=ops; <a name="l00480"></a>00480 (*K).conedata=data; <a name="l00481"></a>00481 DSDPFunctionReturn(0); <a name="l00482"></a>00482 } <a name="l00483"></a>00483 <a name="l00484"></a>00484 <a name="l00485"></a>00485 <span class="keyword">static</span> <span class="keyword">struct </span>DSDPCone_Ops dsdpcops; <a name="l00493"></a>00493 <span class="preprocessor">#undef __FUNCT__</span> <a name="l00494"></a>00494 <span class="preprocessor"></span><span class="preprocessor">#define __FUNCT__ "DSDPConeOpsInitialize"</span> <a name="l00495"></a><a class="code" href="dsdpcone_8h.html#aaad1e0d0532f8aef93ffab1d6c5e4058">00495</a> <span class="preprocessor"></span><span class="keywordtype">int</span> <a class="code" href="dsdpcone_8c.html#a3a14b6dd810e1cbed712537487a1ce58" title="Initialize the pointers to 0.">DSDPConeInitialize</a>(<a class="code" href="dsdpcone_8h.html#a635fc48fba0ec5edb9b23bd57aadb1e1" title="This object holds the data of a SDP, LP, or other cone. Its structure is opaque to the DSDP Solver...">DSDPCone</a> *K){ <a name="l00496"></a>00496 <span class="keywordtype">int</span> info; <a name="l00497"></a>00497 DSDPFunctionBegin; <a name="l00498"></a>00498 info=<a class="code" href="dsdpcone_8c.html#ad1e12a500997ab2be6b7e24536017e95" title="Initialize the function pointers to 0.">DSDPConeOpsInitialize</a>(&dsdpcops); DSDPCHKERR(info); <a name="l00499"></a>00499 info=<a class="code" href="dsdpcone_8c.html#abf7509c885d7e32c250657ecf88619d4" title="Initialize the pointers to 0.">DSDPConeSetData</a>(K,&dsdpcops,0); DSDPCHKERR(info); <a name="l00500"></a>00500 DSDPFunctionReturn(0); <a name="l00501"></a>00501 } <a name="l00502"></a>00502 </pre></div></div> </div> <hr class="footer"/><address class="footer"><small>Generated on Wed Jun 8 2011 for DSDP by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address> </body> </html>