DSDP
dsdp5.h
Go to the documentation of this file.
1 #if !defined(__DSDP_INTERFACE_H)
2 #define __DSDP_INTERFACE_H
3 
8 #include "dsdpbasictypes.h"
9 #include "dsdpsys.h"
10 
26 typedef struct SDPCone_C* SDPCone;
27 typedef struct LPCone_C* LPCone;
28 typedef struct BCone_C* BCone;
29 extern FILE *dsdpoutputfile;
30 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34 
35 
36 extern int DSDPCreate(int, DSDP *);
37 extern int DSDPSetup(DSDP);
38 extern int DSDPSolve(DSDP);
39 extern int DSDPComputeX(DSDP);
41 extern int DSDPDestroy(DSDP);
42 
43 extern int DSDPCreateBCone(DSDP, BCone*);
44 extern int BConeAllocateBounds(BCone,int);
45 extern int BConeSetLowerBound(BCone,int, double);
46 extern int BConeSetUpperBound(BCone,int, double);
47 extern int BConeSetPSlackVariable(BCone,int);
48 extern int BConeSetPSurplusVariable(BCone,int);
49 extern int BConeScaleBarrier(BCone,double);
50 extern int BConeView(BCone);
51 extern int BConeSetXArray(BCone,double[], int);
52 extern int BConeCopyX(BCone,double[],double[],int);
53 
54 extern int DSDPBoundDualVariables(DSDP,double, double);
55 extern int DSDPSetYBounds(DSDP,double,double);
56 extern int DSDPGetYBounds(DSDP,double*,double*);
57 
58 extern int DSDPCreateLPCone(DSDP,LPCone*);
59 extern int LPConeSetData(LPCone,int,const int[],const int[],const double[]);
60 extern int LPConeSetData2(LPCone,int,const int[],const int[],const double[]);
61 extern int LPConeGetData(LPCone,int,double[],int);
62 extern int LPConeScaleBarrier(LPCone,double);
63 extern int LPConeGetXArray(LPCone,double*[], int*);
64 extern int LPConeGetSArray(LPCone,double*[], int*);
65 extern int LPConeGetDimension(LPCone,int*);
66 extern int LPConeView(LPCone lpcone);
67 extern int LPConeView2(LPCone lpcone);
68 extern int LPConeCopyS(LPCone,double[],int);
69 
70 extern int DSDPCreateSDPCone(DSDP, int, SDPCone*);
71 extern int SDPConeSetBlockSize(SDPCone, int, int);
72 extern int SDPConeGetBlockSize(SDPCone, int, int*);
73 extern int SDPConeSetStorageFormat(SDPCone, int, char);
74 extern int SDPConeGetStorageFormat(SDPCone, int, char*);
75 extern int SDPConeCheckStorageFormat(SDPCone, int, char);
76 extern int SDPConeSetSparsity(SDPCone, int, int);
77 extern int SDPConeView(SDPCone);
78 extern int SDPConeView2(SDPCone);
79 extern int SDPConeView3(SDPCone);
80 
81 extern int SDPConeSetASparseVecMat(SDPCone,int,int,int,double,int,const int[],const double[],int);
82 extern int SDPConeSetADenseVecMat(SDPCone,int,int,int,double,double[],int);
83 /* extern int SDPConeSetDenseMatWSparseData(SDPCone,int, int, int, double*, int*, int*); */
84 extern int SDPConeSetARankOneMat(SDPCone,int,int,int,double,int,const int[],const double[],int);
85 extern int SDPConeSetConstantMat(SDPCone,int,int,int,double);
86 extern int SDPConeSetZeroMat(SDPCone,int,int,int);
87 extern int SDPConeSetIdentity(SDPCone,int,int,int,double);
88 extern int SDPConeViewDataMatrix(SDPCone,int,int);
89 extern int SDPConeMatrixView(SDPCone,int);
90 
91 extern int SDPConeAddASparseVecMat(SDPCone,int,int,int,double,int,const int[],const double[],int);
92 extern int SDPConeAddADenseVecMat(SDPCone,int,int,int,double,double[],int);
93 extern int SDPConeAddConstantMat(SDPCone,int,int,int,double);
94 extern int SDPConeAddIdentity(SDPCone,int,int,int,double);
95 extern int SDPConeAddARankOneMat(SDPCone,int,int,int,double,int,const int[],const double[],int);
96 
97 /* For backward compatibility */
98 extern int SDPConeAddSparseVecMat(SDPCone,int,int,int,int,const int[],const double[],int);
99 extern int SDPConeAddDenseVecMat(SDPCone,int,int,int,double[],int);
100 extern int SDPConeSetSparseVecMat(SDPCone,int,int,int,int,const int[],const double[],int);
101 extern int SDPConeSetDenseVecMat(SDPCone,int,int,int,double[],int);
102 
103 extern int SDPConeSetXMat(SDPCone,int,int);
104 extern int SDPConeSetXArray(SDPCone,int,int,double[], int);
105 extern int SDPConeGetXArray(SDPCone,int,double*[],int*);
106 extern int SDPConeRestoreXArray(SDPCone,int,double*[],int*);
107 extern int SDPConeCheckData(SDPCone);
108 extern int SDPConeRemoveDataMatrix(SDPCone,int,int);
109 extern int SDPConeGetNumberOfBlocks(SDPCone, int*);
110 extern int SDPConeComputeS(SDPCone, int, double,double[], int, double,int,double[],int);
111 extern int SDPConeComputeX(SDPCone,int,int,double[],int);
112 extern int SDPConeAddADotX(SDPCone,int,double,double[],int,double[],int);
113 extern int SDPConeViewX(SDPCone,int,int,double[],int);
114 extern int SDPConeSetLanczosIterations(SDPCone,int);
115 extern int SDPConeScaleBarrier(SDPCone,int,double);
116 extern int SDPConeXVMultiply(SDPCone,int,double[],double[],int);
117 extern int SDPConeComputeXV(SDPCone,int,int*);
118 extern int SDPConeAddXVAV(SDPCone,int,double[],int,double[],int);
119 extern int SDPConeUseLAPACKForDualMatrix(SDPCone,int);
120 
121 extern int DSDPSetDualObjective(DSDP,int,double);
122 extern int DSDPAddObjectiveConstant(DSDP,double);
123 extern int DSDPGetDObjective(DSDP,double*);
124 extern int DSDPGetDDObjective(DSDP,double*);
125 extern int DSDPGetPObjective(DSDP,double*);
126 extern int DSDPGetPPObjective(DSDP,double*);
127 /*
128 extern int DSDPGetDualObjective(DSDP,double*);
129 extern int DSDPGetPrimalObjective(DSDP,double*);
130 */
131 #define DSDPGetDualObjective DSDPGetDDObj
132 #define DSDPGetPrimalObjective DSDPGetPPObj
133 extern int DSDPGetDualityGap(DSDP,double*);
134 extern int DSDPGetScale(DSDP,double*);
135 extern int DSDPSetScale(DSDP,double);
136 extern int DSDPGetPenaltyParameter(DSDP,double*);
137 extern int DSDPGetPenalty(DSDP,double*);
138 extern int DSDPCopyB(DSDP,double[], int);
139 
140 extern int DSDPSetR0(DSDP,double);
141 extern int DSDPGetR(DSDP, double *);
142 extern int DSDPSetRTolerance(DSDP,double);
143 extern int DSDPGetRTolerance(DSDP,double*);
144 
145 extern int DSDPSetY0(DSDP,int, double);
146 extern int DSDPGetY(DSDP, double[], int);
147 extern int DSDPGetYMakeX(DSDP, double[], int);
148 extern int DSDPGetDYMakeX(DSDP, double[], int);
149 extern int DSDPGetMuMakeX(DSDP, double*);
150 
151 #define DSDPSetInitialBarrierParameter DSDPSetBarrierParameter
152 #define DSDPGetInitialBarrierParameter DSDPGetBarrierParameter
153 extern int DSDPGetBarrierParameter(DSDP, double *);
154 extern int DSDPSetBarrierParameter(DSDP, double);
155 extern int DSDPReuseMatrix(DSDP,int);
156 extern int DSDPGetReuseMatrix(DSDP,int*);
157 extern int DSDPGetDimension(DSDP, double*);
158 
159 extern int DSDPSetMaxIts(DSDP,int);
160 extern int DSDPGetMaxIts(DSDP,int*);
161 extern int DSDPSetStepTolerance(DSDP,double);
162 extern int DSDPGetStepTolerance(DSDP,double*);
163 extern int DSDPSetGapTolerance(DSDP,double);
164 extern int DSDPGetGapTolerance(DSDP,double*);
165 extern int DSDPSetPNormTolerance(DSDP,double);
166 extern int DSDPGetPNormTolerance(DSDP,double*);
167 extern int DSDPSetDualBound(DSDP,double);
168 extern int DSDPGetDualBound(DSDP,double*);
169 extern int DSDPSetPTolerance(DSDP,double);
170 extern int DSDPGetPTolerance(DSDP,double*);
171 extern int DSDPGetPInfeasibility(DSDP,double*);
172 extern int DSDPSetMaxTrustRadius(DSDP,double);
173 extern int DSDPGetMaxTrustRadius(DSDP,double*);
176 extern int DSDPSetPotentialParameter(DSDP, double);
177 extern int DSDPGetPotentialParameter(DSDP, double*);
178 extern int DSDPUseDynamicRho(DSDP, int);
179 extern int DSDPGetPotential(DSDP,double*);
180 extern int DSDPUseLAPACKForSchur(DSDP,int);
181 extern int DSDPGetNumberOfVariables(DSDP,int*);
182 extern int DSDPGetFinalErrors(DSDP,double[6]);
183 extern int DSDPGetGapHistory(DSDP, double[], int);
184 extern int DSDPGetRHistory(DSDP, double[], int);
185 extern int DSDPGetIts(DSDP,int *);
186 extern int DSDPGetPnorm(DSDP, double *);
187 extern int DSDPGetStepLengths(DSDP, double*,double*);
188 extern int DSDPSetMonitor(DSDP, int (*)(DSDP,void*),void*);
189 extern int DSDPSetStandardMonitor(DSDP,int);
190 extern int DSDPSetFileMonitor(DSDP,int);
191 extern int DSDPSetPenaltyParameter(DSDP,double);
192 extern int DSDPUsePenalty(DSDP,int);
193 extern int DSDPPrintLogInfo(int);
194 extern int DSDPComputeMinimumXEigenvalue(DSDP, double*);
195 extern int DSDPGetTraceX(DSDP dsdp, double*);
196 extern int DSDPSetZBar(DSDP,double);
197 extern int DSDPSetDualLowerBound(DSDP, double);
198 extern int DSDPGetDataNorms(DSDP, double[3]);
199 extern int DSDPGetYMaxNorm(DSDP, double*);
200 extern int SDPConeUseFullSymmetricFormat(SDPCone, int);
201 extern int SDPConeUsePackedFormat(SDPCone, int);
202 extern int DSDPSetFixedVariable(DSDP,int,double);
203 extern int DSDPSetFixedVariables(DSDP,double[],double[],double[],int);
204 extern int DSDPGetFixedYX(DSDP,int,double*);
205 extern int DSDPView(DSDP);
206 extern int DSDPPrintOptions();
207 extern int DSDPPrintData(DSDP,SDPCone,LPCone);
208 extern int DSDPPrintSolution(FILE*,DSDP,SDPCone, LPCone);
209 extern int DSDPSetOptions(DSDP,char*[], int);
210 extern int DSDPReadOptions(DSDP, char[]);
211 extern int DSDPSetDestroyRoutine(DSDP, int (*)(void*), void*);
212 
213 #ifdef __cplusplus
214 }
215 #endif
216 
217 #endif
int DSDPSetBarrierParameter(DSDP dsdp, double mu)
Set the current barrier parameter.
Definition: dsdpsetdata.c:340
int DSDPCreate(int m, DSDP *dsdpnew)
Create a DSDP solver. FIRST DSDP routine!
Definition: dsdpsetup.c:30
int LPConeGetDimension(LPCone lpcone, int *n)
Get the dimension is the number of variables x, which equals the number of slack variables s...
Definition: dsdplp.c:616
int DSDPGetFinalErrors(DSDP dsdp, double err[6])
Copy six different error measurements into an array.
Definition: dsdpx.c:297
DSDPTruth
Boolean variables.
int DSDPGetDualBound(DSDP dsdp, double *dbound)
Get the termination parameter.
Definition: dsdpconverge.c:227
int DSDPDestroy(DSDP dsdp)
Free the internal data structures of the solver and the cones associated with it. ...
Definition: dsdpsetup.c:496
int DSDPGetStepTolerance(DSDP dsdp, double *steptol)
Get the current tolerance.
Definition: dsdpconverge.c:273
int LPConeView2(LPCone lpcone)
Print the data in the LP cone to the screen.
Definition: dsdplp.c:744
int DSDPGetStepLengths(DSDP dsdp, double *pstep, double *dstep)
Copy the step sizes in the current iteration.
Definition: dsdpsetdata.c:742
int DSDPGetBarrierParameter(DSDP dsdp, double *mu)
Copy the current barrier parameter.
Definition: dsdpsetdata.c:364
int DSDPGetDYMakeX(DSDP dsdp, double dy[], int m)
Copies the variables dy used to construct X into an array.
Definition: dsdpx.c:483
int DSDPGetPPObjective(DSDP dsdp, double *ppobj)
Copy the objective value (PP).
Definition: dsdpsetdata.c:479
int DSDPAddObjectiveConstant(DSDP dsdp, double c)
Add a constant to the objective.
Definition: dsdpsetdata.c:185
int DSDPReadOptions(DSDP dsdp, char filename[])
Read DSDP parameters from a file.
int DSDPGetRHistory(DSDP dsdp, double hist[], int length)
Copy a history of the infeasibility in (D) into an array.
Definition: dsdpconverge.c:298
int DSDPSetDualBound(DSDP dsdp, double dbound)
Terminate the solver if the objective value in (DD) is greater than this tolerance.
Definition: dsdpconverge.c:205
int SDPConeSetARankOneMat(SDPCone sdpcone, int blockj, int vari, int n, double alpha, int ishift, const int ind[], const double val[], int nnz)
Set data matrix where v is a sparse vector.
int DSDPGetPenaltyParameter(DSDP dsdp, double *Gamma)
Copy the penalty parameter Gamma.
Definition: dsdpsetdata.c:443
int DSDPCreateBCone(DSDP dsdp, BCone *dspcone)
Create a new cone that represents bounds on the y variables.
Definition: dbounds.c:467
int DSDPSetOptions(DSDP dsdp, char *runargs[], int nargs)
Read command line arguments to set options in DSDP.
Error handling, printing, and profiling.
int SDPConeSetStorageFormat(SDPCone sdpcone, int blockj, char format)
Set the dense storage format of a block in the semidefinite cone.
Definition: dsdpadddata.c:479
int DSDPGetGapTolerance(DSDP dsdp, double *gaptol)
Get the termination tolerance.
Definition: dsdpconverge.c:132
int SDPConeGetBlockSize(SDPCone sdpcone, int blockj, int *n)
Get the dimension of one block in the semidefinite cone.
Definition: dsdpadddata.c:560
int BConeSetUpperBound(BCone bcone, int vari, double ubound)
Set an upper bound on a variable y.
Definition: dbounds.c:583
int DSDPSetZBar(DSDP dsdp, double ppobj)
Set an upper bound on the objective value at the solution.
Definition: dsdpsetdata.c:283
int DSDPSetDestroyRoutine(DSDP dsdp, int(*fd)(void *), void *ctx)
Set a routine that will be called during DSDPDestroy().
Definition: dsdpsetup.c:469
int DSDPGetPTolerance(DSDP dsdp, double *inftol)
Copy the feasibility tolerance.
Definition: dsdpx.c:386
int DSDPComputeAndFactorS(DSDP dsdp, DSDPTruth *psdefinite)
Compute and factor the dual matrix variables.
Definition: dualalg.c:540
int DSDPSetDualObjective(DSDP dsdp, int i, double bi)
Set the objective vector b in (D).
Definition: dsdpsetdata.c:25
int DSDPSetScale(DSDP dsdp, double scale)
Set the internal scaling factor.
Definition: dsdpsetdata.c:153
int SDPConeCheckData(SDPCone sdpcone)
Check the matrix operations on a data matrix;.
Definition: dsdpadddata.c:692
int DSDPUseDynamicRho(DSDP dsdp, int yesorno)
Use a dynamic strategy to choose parameter rho.
Definition: dsdpsetdata.c:821
int DSDPGetPnorm(DSDP dsdp, double *pnorm)
Copy the proximity of the solution to the central path.
Definition: dsdpsetdata.c:724
int SDPConeComputeX(SDPCone sdpcone, int blockj, int n, double x[], int nn)
Compute the matrix X.
Definition: sdpcone.c:191
int SDPConeSetXArray(SDPCone sdpcone, int blockj, int n, double xx[], int nn)
Provide an array for the SDPCone object can use to store dense matrices.
Definition: dsdpadddata.c:278
int SDPConeAddConstantMat(SDPCone sdpcone, int blockj, int vari, int n, double value)
Add a matrix whose elements are all the same.
int DSDPPrintSolution(FILE *fp, DSDP dsdp, SDPCone sdpcone, LPCone lpcone)
Print solution in SDPA format.
Definition: printsdpa.c:94
Internal structures for the DSDP solver.
Definition: dsdp.h:65
int DSDPCreateLPCone(DSDP dsdp, LPCone *dspcone)
Create a new object for linear programs and scalar inequalities.
Definition: dsdplp.c:509
int SDPConeAddADenseVecMat(SDPCone sdpcone, int blockj, int vari, int n, double alpha, double val[], int nnz)
Add a matrix in a dense format.
DSDPTerminationReason
There are many reasons to terminate the solver.
int DSDPSetGapTolerance(DSDP dsdp, double gaptol)
Terminate the solver when the relative duality gap is less than this tolerance.
Definition: dsdpconverge.c:110
int LPConeCopyS(LPCone lpcone, double s[], int n)
Copy the variables s into the spedified array.
Definition: dsdplp.c:595
int SDPConeRestoreXArray(SDPCone sdpcone, int blockj, double *xx[], int *nn)
Restore the dense array and set these pointers to null.
Definition: dsdpadddata.c:351
int DSDPPrintData(DSDP dsdp, SDPCone sdpcone, LPCone lpcone)
Print data in SDPA format to a file named "output.sdpa".
Definition: printsdpa.c:164
int SDPConeGetXArray(SDPCone sdpcone, int blockj, double *xx[], int *nn)
After applying the solver, set a pointer to the array in the object with the solution X...
Definition: dsdpadddata.c:328
int DSDPGetDataNorms(DSDP dsdp, double dnorm[3])
Copy the norms of the data C, A, and b into an array.
Definition: dsdpsetdata.c:621
int SDPConeUseFullSymmetricFormat(SDPCone sdpcone, int blockj)
Use full symmetric format for the dense array.
Definition: dsdpadddata.c:414
int LPConeGetXArray(LPCone lpcone, double *x[], int *n)
Get the array used to store the x variables.
Definition: dsdplp.c:556
int BConeSetLowerBound(BCone bcone, int vari, double lbound)
Set a lower bound on a variable y.
Definition: dbounds.c:566
int DSDPSetMonitor(DSDP dsdp, int(*monitor)(DSDP, void *), void *monitorctx)
Monitor each iteration of the solver.
Definition: dsdpsetdata.c:945
int DSDPSetRTolerance(DSDP dsdp, double inftol)
Classify (D) as feasible only if the variable r is less than this tolerance.
Definition: dsdpx.c:409
int DSDPSetPTolerance(DSDP dsdp, double inftol)
Classify (P) as feasible only if the infeasibility is less than this tolerance.
Definition: dsdpx.c:365
int SDPConeSetConstantMat(SDPCone sdpcone, int blockj, int vari, int n, double value)
Set a matrix whose elements are all the same.
int DSDPSetMaxTrustRadius(DSDP dsdp, double rad)
Set a maximum trust radius on the step direction.
Definition: dsdpsetdata.c:246
int SDPConeAddXVAV(SDPCone sdpcone, int blockj, double vin[], int n, double sum[], int mm)
Compute for i = 0 through m.
Definition: sdpcone.c:292
int LPConeSetData(LPCone lpcone, int n, const int ik[], const int cols[], const double vals[])
Set data into the LP cone.
Definition: dsdplp.c:666
int DSDPGetSolutionType(DSDP dsdp, DSDPSolutionType *pdfeasible)
Solutions can be bounded, infeasible, or unbounded.
Definition: dsdpx.c:254
int DSDPGetDimension(DSDP dsdp, double *n)
Copy the dimension of the cones, or the number of constraints in (D).
Definition: dsdpsetdata.c:661
int SDPConeViewDataMatrix(SDPCone sdpcone, int blockj, int vari)
Print a data matrix to the screen.
Definition: dsdpadddata.c:205
int DSDPSetup(DSDP dsdp)
Set up data structures in the solver and the cones associated with it.
Definition: dsdpsetup.c:193
int DSDPReuseMatrix(DSDP dsdp, int rm)
Reuse the Hessian of the barrier function multiple times at each DSDP iteration.
Definition: dsdpsetdata.c:905
int SDPConeGetNumberOfBlocks(SDPCone sdpcone, int *nblocks)
Get the number of blocks in the semidefinite cone.
Definition: dsdpadddata.c:578
Solver, solution types, termination codes,.
int BConeCopyX(BCone bcone, double xl[], double xu[], int m)
Copy the variables into arrays.
Definition: dbounds.c:517
int BConeAllocateBounds(BCone bcone, int nnz)
Set a surplus variable in constraint in (P).
Definition: dbounds.c:645
int DSDPSetPenaltyParameter(DSDP dsdp, double Gamma)
Set the penalty parameter Gamma.
Definition: dsdpsetdata.c:418
int DSDPGetReuseMatrix(DSDP dsdp, int *rm)
Copy this parameter.
Definition: dsdpsetdata.c:925
int SDPConeSetZeroMat(SDPCone sdpcone, int blockj, int vari, int n)
Set a matrix whose elements are all equal zero.
int LPConeGetData(LPCone lpcone, int vari, double vv[], int n)
Get one column (or row) of the LP data.
Definition: dsdplp.c:783
int SDPConeRemoveDataMatrix(SDPCone sdpcone, int blockj, int vari)
Remove the data matrix from the cone.
Definition: dsdpadddata.c:127
int SDPConeAddADotX(SDPCone sdpcone, int blockj, double alpha, double x[], int nn, double adotx[], int m)
Compute the inner products of a dense matrix X with the data matrices.
Definition: sdpcone.c:75
int DSDPGetPInfeasibility(DSDP dsdp, double *pperror)
Copy the infeasibility in (P).
Definition: dsdpx.c:343
int SDPConeAddARankOneMat(SDPCone sdpcone, int blockj, int vari, int n, double alpha, int ishift, const int ind[], const double val[], int nnz)
Add data matrix where v is a sparse vector.
int DSDPGetMaxTrustRadius(DSDP dsdp, double *rad)
Copy the current radius of the trust region.
Definition: dsdpsetdata.c:265
int BConeSetPSlackVariable(BCone bcone, int vari)
Set a slack variable to a constraint in (P).
Definition: dbounds.c:607
int DSDPGetDObjective(DSDP dsdp, double *dobj)
Copy the objective value (D).
Definition: dsdpsetdata.c:502
int SDPConeAddASparseVecMat(SDPCone sdpcone, int blockj, int vari, int n, double alpha, int ishift, const int ind[], const double val[], int nnz)
Add data matrix in a sparse format.
int DSDPGetPotential(DSDP dsdp, double *potential)
Copy the potential of the current solution.
Definition: dsdpsetdata.c:803
int DSDPSetFixedVariables(DSDP dsdp, double vars[], double vals[], double xout[], int nvars)
Fix variable y to exact values.
Definition: dsdpschurmat.c:695
int DSDPSetPotentialParameter(DSDP dsdp, double rho)
Set the potential parameter.
Definition: dsdpsetdata.c:765
int DSDPStopReason(DSDP dsdp, DSDPTerminationReason *reason)
Copy the reason why the solver terminated.
Definition: dsdpsetdata.c:582
int SDPConeSetIdentity(SDPCone sdpcone, int blockj, int vari, int n, double val)
Set a matrix to be a multiple of the identity matrix.
int SDPConeCheckStorageFormat(SDPCone sdpcone, int blockj, char format)
Check validity of parameters.
Definition: dsdpadddata.c:101
int DSDPPrintOptions()
Print runtime options;.
int SDPConeSetXMat(SDPCone sdpcone, int blockj, int n)
Create X matrix.
Definition: dsdpadddata.c:247
int SDPConeComputeXV(SDPCone sdpcone, int blockj, int *derror)
Compute a factor V such that .
Definition: sdpcone.c:325
int DSDPGetPObjective(DSDP dsdp, double *pobj)
Copy the objective value (P).
Definition: dsdpx.c:232
int DSDPSetY0(DSDP dsdp, int i, double yi0)
Set the initial values of variables y in (D).
Definition: dsdpsetdata.c:77
int DSDPSetStepTolerance(DSDP dsdp, double steptol)
Terminate the solver if the step length in (DD) is below this tolerance.
Definition: dsdpconverge.c:252
int SDPConeUsePackedFormat(SDPCone sdpcone, int blockj)
Use packed symmetric format for the dense array.
Definition: dsdpadddata.c:452
int DSDPGetIts(DSDP dsdp, int *its)
Copy the current iteration number.
Definition: dsdpsetdata.c:564
int SDPConeView2(SDPCone sdpcone)
Print the SDP cone to the screen in a second way.
Definition: dsdpadddata.c:637
int SDPConeView(SDPCone sdpcone)
Print the SDPCone to the screen;.
Definition: dsdpadddata.c:617
int DSDPView(DSDP dsdp)
Print many of the parameters currently set in DSDP.
int LPConeView(LPCone lpcone)
Print the data in the LP cone to the screen.
Definition: dsdplp.c:1078
int BConeSetPSurplusVariable(BCone bcone, int vari)
Set a surplus variable in constraint in (P).
Definition: dbounds.c:624
int SDPConeMatrixView(SDPCone sdpcone, int blockj)
Print the dense array to the screen.
Definition: dsdpadddata.c:372
int DSDPSetPNormTolerance(DSDP dsdp, double ptol)
Terminate the solver when the relative duality gap is suffiently small and the PNorm is less than thi...
Definition: dsdpconverge.c:158
int SDPConeView3(SDPCone sdpcone)
Print the SDP cone to the screen in a third way.
Definition: dsdpadddata.c:657
int SDPConeXVMultiply(SDPCone sdpcone, int blockj, double vin[], double vout[], int n)
Multiply an array by a factor V such that .
Definition: sdpcone.c:251
int DSDPGetMuMakeX(DSDP dsdp, double *mu)
Copies the value of mu used to construct X.
Definition: dsdpx.c:511
int DSDPGetYMaxNorm(DSDP dsdp, double *ynorm)
Copy the the infinity norm of the variables y.
Definition: dsdpsetdata.c:678
int DSDPSolve(DSDP dsdp)
Apply DSDP to the problem.
Definition: dsdpsetup.c:343
struct SDPCone_C * SDPCone
The SDPCone object points to blocks of data that specify semidefinite matrix inequalities.
Definition: dsdp5.h:26
int SDPConeSetBlockSize(SDPCone sdpcone, int blockj, int n)
Set the dimension of one block in the semidefinite cone.
Definition: dsdpadddata.c:535
Internal structure for semidefinite cone.
Definition: dsdpsdp.h:80
int DSDPGetY(DSDP dsdp, double y[], int m)
Copies the variables y into an array.
Definition: dsdpsetdata.c:100
int SDPConeSetSparsity(SDPCone sdpcone, int blockj, int nnz)
Set the number of nonzero matrices in a block of the semidefinite cone.
Definition: dsdpadddata.c:596
int DSDPGetNumberOfVariables(DSDP dsdp, int *m)
Copy the number of variables y.
Definition: dsdpsetdata.c:707
int DSDPUsePenalty(DSDP dsdp, int yesorno)
Use penalty parameter to enforce feasibility.
Definition: dsdpsetdata.c:383
int SDPConeGetStorageFormat(SDPCone sdpcone, int blockj, char *format)
Get the storage format for the block.
Definition: dsdpadddata.c:505
int DSDPGetDDObjective(DSDP dsdp, double *ddobj)
Copy the objective value (DD).
Definition: dsdpsetdata.c:523
int DSDPGetPNormTolerance(DSDP dsdp, double *ptol)
Get the termination tolerance.
Definition: dsdpconverge.c:180
int DSDPGetRTolerance(DSDP dsdp, double *inftol)
Copy the maximum infeasibility allowed (D).
Definition: dsdpx.c:434
int DSDPGetTraceX(DSDP dsdp, double *tracex)
Copy the trace of the variables X in (P).
Definition: dsdpx.c:278
int DSDPGetR(DSDP dsdp, double *res)
Copy the infeasibility in (D), or the variable r in (DD).
Definition: dsdpsetdata.c:601
int DSDPComputeX(DSDP dsdp)
Compute the X variables.
Definition: dsdpx.c:55
int DSDPGetScale(DSDP dsdp, double *scale)
Copy the internal scaling factor from the solver.
Definition: dsdpsetdata.c:128
int DSDPGetMaxIts(DSDP dsdp, int *its)
Copy the maximum number of iterations from the solver.
Definition: dsdpsetdata.c:225
int SDPConeAddIdentity(SDPCone sdpcone, int blockj, int vari, int n, double val)
Add a matrix that is a multiple of the identity matrix.
int SDPConeSetASparseVecMat(SDPCone sdpcone, int blockj, int vari, int n, double alpha, int ishift, const int ind[], const double val[], int nnz)
Set data matrix in a sparse format.
int DSDPGetDualityGap(DSDP dsdp, double *dgap)
Copy the difference between the objective values.
Definition: dsdpsetdata.c:545
struct BCone_C * BCone
The BCone object points to lower and upper bounds on the variable y in (D).
Definition: dsdp5.h:28
int SDPConeSetADenseVecMat(SDPCone sdpcone, int blockj, int vari, int n, double alpha, double val[], int nnz)
Set a matrix in a dense format.
int DSDPSetYBounds(DSDP dsdp, double lbound, double ubound)
Bound the variables y.
Definition: dsdpsetdata.c:885
int SDPConeComputeS(SDPCone sdpcone, int blockj, double cc, double y[], int nvars, double r, int n, double s[], int nn)
Compute the dual matrix S.
Definition: sdpcone.c:42
int DSDPGetPotentialParameter(DSDP dsdp, double *rho)
Copy the potential parameter.
Definition: dsdpsetdata.c:784
int DSDPGetYBounds(DSDP dsdp, double *lbound, double *ubound)
Copy the bounds on the variables y.
Definition: dsdpsetdata.c:866
int LPConeSetData2(LPCone lpcone, int n, const int ik[], const int cols[], const double vals[])
Set data A and into the LP cone.
Definition: dsdplp.c:717
int DSDPCopyB(DSDP dsdp, double bb[], int m)
Copies the variables b from solver into an array.
Definition: dsdpsetdata.c:46
int DSDPSetR0(DSDP dsdp, double res)
Set an initial value for the variable r in (DD)
Definition: dsdpsetdata.c:311
int DSDPSetMaxIts(DSDP dsdp, int its)
Terminate the solver after this number of iterations.
Definition: dsdpsetdata.c:206
int DSDPGetGapHistory(DSDP dsdp, double hist[], int length)
Copy a history of the duality gap into an array.
Definition: dsdpconverge.c:321
int DSDPGetYMakeX(DSDP dsdp, double y[], int m)
Copies the variables y used to construct X into an array.
Definition: dsdpx.c:455
int DSDPSetFixedVariable(DSDP dsdp, int vari, double val)
Fix variable y to exact value.
Definition: dsdpschurmat.c:675
int DSDPSetStandardMonitor(DSDP dsdp, int k)
Print at every kth iteration.
Definition: dsdpprintout.c:153
struct LPCone_C * LPCone
The LPCone object points to blocks of data that specify linear scalar inequality constraints.
Definition: dsdp5.h:27
DSDPSolutionType
Formulations (P) and (D) can be feasible and bounded, feasible and unbounded, or infeasible.
int SDPConeViewX(SDPCone sdpcone, int blockj, int n, double x[], int nn)
Print a dense array X to the screen.
Definition: sdpcone.c:223