/
dsdp5_API.jl
394 lines (308 loc) · 10.8 KB
/
dsdp5_API.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
# Julia wrapper for header: include/dsdp5.h
# Automatically generated using Clang.jl wrap_c, version 0.0.0
function SetConvergenceFlag(dsdp::DSDPT, arg2::DSDPTerminationReason)
@dsdp_ccall DSDPSetConvergenceFlag (DSDPT, DSDPTerminationReason) dsdp arg2
end
function Create(m::Integer)
dsdp = Ref{DSDPT}()
@dsdp_ccall DSDPCreate (Cint, Ref{DSDPT}) m dsdp
dsdp[]
end
function Setup(dsdp::DSDPT)
@dsdp_ccall DSDPSetup (DSDPT,) dsdp
end
function Solve(dsdp::DSDPT)
@dsdp_ccall DSDPSolve (DSDPT,) dsdp
end
function ComputeX(dsdp::DSDPT)
@dsdp_ccall DSDPComputeX (DSDPT,) dsdp
end
function ComputeAndFactorS(dsdp::DSDPT)
psdefinite = Ref{DSDPTruth}()
GC.@preserve psdefinite dsdp begin
@dsdp_ccall DSDPComputeAndFactorS (DSDPT, Ref{DSDPTruth}) dsdp psdefinite
return psdefinite[]
end
end
function Destroy(dsdp::DSDPT)
@dsdp_ccall DSDPDestroy (DSDPT,) dsdp
end
function SetDualObjective(dsdp::DSDPT, arg2::Integer, arg3::Cdouble)
@dsdp_ccall DSDPSetDualObjective (DSDPT, Cint, Cdouble) dsdp arg2 arg3
end
function AddObjectiveConstant(dsdp::DSDPT, arg2::Cdouble)
@dsdp_ccall DSDPAddObjectiveConstant (DSDPT, Cdouble) dsdp arg2
end
function GetDObjective(dsdp::DSDPT)
dobj = Ref{Cdouble}()
@dsdp_ccall DSDPGetDObjective (DSDPT, Ref{Cdouble}) dsdp dobj
dobj[]
end
function GetDDObjective(dsdp::DSDPT)
ddobj = Ref{Cdouble}()
@dsdp_ccall DSDPGetDDObjective (DSDPT, Ref{Cdouble}) dsdp ddobj
ddobj[]
end
function GetPObjective(dsdp::DSDPT)
pobj = Ref{Cdouble}()
@dsdp_ccall DSDPGetPObjective (DSDPT, Ptr{Cdouble}) dsdp pobj
pobj[]
end
function GetPPObjective(dsdp::DSDPT)
ppobj = Ref{Cdouble}()
@dsdp_ccall DSDPGetPPObjective (DSDPT, Ptr{Cdouble}) dsdp ppobj
ppobj[]
end
function GetDualityGap(dsdp::DSDPT)
dgap = Ref{Cdouble}()
@dsdp_ccall DSDPGetDualityGap (DSDPT, Ptr{Cdouble}) dsdp dgap
dgap[]
end
function GetScale(dsdp::DSDPT)
scale = Ref{Cdouble}()
@dsdp_ccall DSDPGetScale (DSDPT, Ref{Cdouble}) dsdp scale
scale[]
end
function SetScale(dsdp::DSDPT, scale::Cdouble)
@dsdp_ccall DSDPSetScale (DSDPT, Cdouble) dsdp scale
end
function GetPenaltyParameter(dsdp::DSDPT)
pp = Ref{Cdouble}()
@dsdp_ccall DSDPGetPenaltyParameter (DSDPT, Ref{Cdouble}) dsdp pp
pp[]
end
function GetPenalty(dsdp::DSDPT, arg2)
@dsdp_ccall DSDPGetPenalty (DSDPT, Ptr{Cdouble}) dsdp arg2
end
function CopyB(dsdp::DSDPT, arg2, arg3::Integer)
@dsdp_ccall DSDPCopyB (DSDPT, Ptr{Cdouble}, Cint) dsdp arg2 arg3
end
function SetR0(dsdp::DSDPT, arg2::Cdouble)
@dsdp_ccall DSDPSetR0 (DSDPT, Cdouble) dsdp arg2
end
function GetR(dsdp::DSDPT, arg2)
@dsdp_ccall DSDPGetR (DSDPT, Ptr{Cdouble}) dsdp arg2
end
function SetRTolerance(dsdp::DSDPT, arg2::Cdouble)
@dsdp_ccall DSDPSetRTolerance (DSDPT, Cdouble) dsdp arg2
end
function GetRTolerance(dsdp::DSDPT)
rtol = Ref{Cdouble}()
@dsdp_ccall DSDPGetRTolerance (DSDPT, Ref{Cdouble}) dsdp rtol
rtol[]
end
function SetY0(dsdp::DSDPT, arg2::Integer, arg3::Cdouble)
@dsdp_ccall DSDPSetY0 (DSDPT, Cint, Cdouble) dsdp arg2 arg3
end
function GetY(dsdp::DSDPT, y::Vector{Cdouble})
@dsdp_ccall DSDPGetY (DSDPT, Ptr{Cdouble}, Cint) dsdp pointer(y) length(y)
end
function GetYMakeX(dsdp::DSDPT, arg2, arg3::Integer)
@dsdp_ccall DSDPGetYMakeX (DSDPT, Ptr{Cdouble}, Cint) dsdp arg2 arg3
end
function GetDYMakeX(dsdp::DSDPT, arg2, arg3::Integer)
@dsdp_ccall DSDPGetDYMakeX (DSDPT, Ptr{Cdouble}, Cint) dsdp arg2 arg3
end
function GetMuMakeX(dsdp::DSDPT, arg2)
@dsdp_ccall DSDPGetMuMakeX (DSDPT, Ptr{Cdouble}) dsdp arg2
end
function GetBarrierParameter(dsdp::DSDPT)
bp = Ref{Cdouble}()
@dsdp_ccall DSDPGetBarrierParameter (DSDPT, Ptr{Cdouble}) dsdp bp
bp[]
end
function SetBarrierParameter(dsdp::DSDPT, arg2::Cdouble)
@dsdp_ccall DSDPSetBarrierParameter (DSDPT, Cdouble) dsdp arg2
end
function SetReuseMatrix(dsdp::DSDPT, arg2::Integer)
@dsdp_ccall DSDPReuseMatrix (DSDPT, Cint) dsdp arg2
end
function GetReuseMatrix(dsdp::DSDPT)
reuse = Ref{Cint}()
@dsdp_ccall DSDPGetReuseMatrix (DSDPT, Ref{Cint}) dsdp reuse
reuse[]
end
function GetDimension(dsdp::DSDPT, arg2)
@dsdp_ccall DSDPGetDimension (DSDPT, Ptr{Cdouble}) dsdp arg2
end
function SetMaxIts(dsdp::DSDPT, arg2::Integer)
@dsdp_ccall DSDPSetMaxIts (DSDPT, Cint) dsdp arg2
end
function GetMaxIts(dsdp::DSDPT)
maxits = Ref{Cint}()
@dsdp_ccall DSDPGetMaxIts (DSDPT, Ref{Cint}) dsdp maxits
maxits[]
end
function SetStepTolerance(dsdp::DSDPT, steptol::Cdouble)
@assert steptol > 0
@dsdp_ccall DSDPSetStepTolerance (DSDPT, Cdouble) dsdp arg2
end
function GetStepTolerance(dsdp::DSDPT)
steptol = Ref{Cdouble}()
@dsdp_ccall DSDPGetStepTolerance (DSDPT, Ref{Cdouble}) dsdp steptol
steptol[]
end
function SetGapTolerance(dsdp::DSDPT, arg2::Cdouble)
@dsdp_ccall DSDPSetGapTolerance (DSDPT, Cdouble) dsdp arg2
end
function GetGapTolerance(dsdp::DSDPT)
gaptol = Ref{Cdouble}()
@dsdp_ccall DSDPGetGapTolerance (DSDPT, Ref{Cdouble}) dsdp gaptol
gaptol[]
end
function SetPNormTolerance(dsdp::DSDPT, pnormtol::Real)
@assert pnormtol > 0
@dsdp_ccall DSDPSetPNormTolerance (DSDPT, Cdouble) dsdp pnormtol
end
function GetPNormTolerance(dsdp::DSDPT)
pnormtol = Ref{Cdouble}()
@dsdp_ccall DSDPGetPNormTolerance (DSDPT, Ref{Cdouble}) dsdp pnormtol
pnormtol[]
end
function SetDualBound(dsdp::DSDPT, arg2::Cdouble)
@dsdp_ccall DSDPSetDualBound (DSDPT, Cdouble) dsdp arg2
end
function GetDualBound(dsdp::DSDPT)
dualb = Ref{Cdouble}()
@dsdp_ccall DSDPGetDualBound (DSDPT, Ref{Cdouble}) dsdp dualb
dualb[]
end
function SetPTolerance(dsdp::DSDPT, arg2::Cdouble)
@dsdp_ccall DSDPSetPTolerance (DSDPT, Cdouble) dsdp arg2
end
function GetPTolerance(dsdp::DSDPT)
ptol = Ref{Cdouble}()
@dsdp_ccall DSDPGetPTolerance (DSDPT, Ref{Cdouble}) dsdp ptol
ptol[]
end
function GetPInfeasibility(dsdp::DSDPT, arg2)
@dsdp_ccall DSDPGetPInfeasibility (DSDPT, Ptr{Cdouble}) dsdp arg2
end
function SetMaxTrustRadius(dsdp::DSDPT, maxtrust::Cdouble)
@dsdp_ccall DSDPSetMaxTrustRadius (DSDPT, Cdouble) dsdp maxtrust
end
function GetMaxTrustRadius(dsdp::DSDPT)
maxtrust = Ref{Cdouble}()
@dsdp_ccall DSDPGetMaxTrustRadius (DSDPT, Ptr{Cdouble}) dsdp maxtrust
maxtrust[]
end
function StopReason(dsdp::DSDPT)
stop = Ref{DSDPTerminationReason}()
@dsdp_ccall DSDPStopReason (DSDPT, Ref{DSDPTerminationReason}) dsdp stop
stop[]
end
function GetSolutionType(dsdp::DSDPT)
sol = Ref{DSDPSolutionType}()
@dsdp_ccall DSDPGetSolutionType (DSDPT, Ref{DSDPSolutionType}) dsdp sol
sol[]
end
function SetPotentialParameter(dsdp::DSDPT, pp::Real)
@dsdp_ccall DSDPSetPotentialParameter (DSDPT, Cdouble) dsdp pp
end
function GetPotentialParameter(dsdp::DSDPT)
pp = Ref{Cdouble}()
@dsdp_ccall DSDPGetPotentialParameter (DSDPT, Ref{Cdouble}) dsdp pp
pp[]
end
function UseDynamicRho(dsdp::DSDPT, arg2::Integer)
@dsdp_ccall DSDPUseDynamicRho (DSDPT, Cint) dsdp arg2
end
function GetPotential(dsdp::DSDPT, arg2)
@dsdp_ccall DSDPGetPotential (DSDPT, Ptr{Cdouble}) dsdp arg2
end
function UseLAPACKForSchur(dsdp::DSDPT, arg2::Integer)
@dsdp_ccall DSDPUseLAPACKForSchur (DSDPT, Cint) dsdp arg2
end
function GetNumberOfVariables(dsdp::DSDPT, arg2)
@dsdp_ccall DSDPGetNumberOfVariables (DSDPT, Ptr{Cint}) dsdp arg2
end
function GetFinalErrors(dsdp::DSDPT, arg2::NTuple{6, Cdouble})
@dsdp_ccall DSDPGetFinalErrors (DSDPT, NTuple{6, Cdouble}) dsdp arg2
end
function GetGapHistory(dsdp::DSDPT, arg2, arg3::Integer)
@dsdp_ccall DSDPGetGapHistory (DSDPT, Ptr{Cdouble}, Cint) dsdp arg2 arg3
end
function GetRHistory(dsdp::DSDPT, arg2, arg3::Integer)
@dsdp_ccall DSDPGetRHistory (DSDPT, Ptr{Cdouble}, Cint) dsdp arg2 arg3
end
function GetIts(dsdp::DSDPT, arg2)
@dsdp_ccall DSDPGetIts (DSDPT, Ptr{Cint}) dsdp arg2
end
function GetPnorm(dsdp::DSDPT, arg2)
@dsdp_ccall DSDPGetPnorm (DSDPT, Ptr{Cdouble}) dsdp arg2
end
function GetStepLengths(dsdp::DSDPT, arg2, arg3)
@dsdp_ccall DSDPGetStepLengths (DSDPT, Ptr{Cdouble}, Ptr{Cdouble}) dsdp arg2 arg3
end
function SetMonitor(dsdp::DSDPT, arg2, arg3)
@dsdp_ccall DSDPSetMonitor (DSDPT, DSDPT, DSDPT) dsdp arg2 arg3
end
function SetStandardMonitor(dsdp::DSDPT, arg2::Integer)
@dsdp_ccall DSDPSetStandardMonitor (DSDPT, Cint) dsdp arg2
end
function SetFileMonitor(dsdp::DSDPT, arg2::Integer)
@dsdp_ccall DSDPSetFileMonitor (DSDPT, Cint) dsdp arg2
end
function SetPenaltyParameter(dsdp::DSDPT, arg2::Cdouble)
@dsdp_ccall DSDPSetPenaltyParameter (DSDPT, Cdouble) dsdp arg2
end
function UsePenalty(dsdp::DSDPT, arg2::Integer)
@dsdp_ccall DSDPUsePenalty (DSDPT, Cint) dsdp arg2
end
function PrintLogInfo(arg1::Integer)
@dsdp_ccall DSDPPrintLogInfo (Cint,) arg1
end
function ComputeMinimumXEigenvalue(dsdp::DSDPT, arg2)
@dsdp_ccall DSDPComputeMinimumXEigenvalue (DSDPT, Ptr{Cdouble}) dsdp arg2
end
function GetTraceX(dsdp::DSDPT, sdpcone)
@dsdp_ccall DSDPGetTraceX (DSDPT, Ptr{Cdouble}) dsdp sdpcone
end
function SetZBar(dsdp::DSDPT, arg2::Cdouble)
@dsdp_ccall DSDPSetZBar (DSDPT, Cdouble) dsdp arg2
end
function SetDualLowerBound(dsdp::DSDPT, arg2::Cdouble)
@dsdp_ccall DSDPSetDualLowerBound (DSDPT, Cdouble) dsdp arg2
end
function GetDataNorms(dsdp::DSDPT, arg2::NTuple{3, Cdouble})
@dsdp_ccall DSDPGetDataNorms (DSDPT, NTuple{3, Cdouble}) dsdp arg2
end
function GetYMaxNorm(dsdp::DSDPT, arg2)
@dsdp_ccall DSDPGetYMaxNorm (DSDPT, Ptr{Cdouble}) dsdp arg2
end
function BoundDualVariables(dsdp::DSDPT, arg2::Cdouble, arg3::Cdouble)
@dsdp_ccall DSDPBoundDualVariables (DSDPT, Cdouble, Cdouble) dsdp arg2 arg3
end
function SetYBounds(dsdp::DSDPT, ylow::Cdouble, yhigh::Cdouble)
@dsdp_ccall DSDPSetYBounds (DSDPT, Cdouble, Cdouble) dsdp ylow yhigh
end
function GetYBounds(dsdp::DSDPT)
ylow = Ref{Cdouble}()
yhigh = Ref{Cdouble}()
@dsdp_ccall DSDPGetYBounds (DSDPT, Ref{Cdouble}, Ref{Cdouble}) dsdp ylow yhigh
ylow[], yhigh[]
end
function SetFixedVariable(dsdp::DSDPT, arg2::Integer, arg3::Cdouble)
@dsdp_ccall DSDPSetFixedVariable (DSDPT, Cint, Cdouble) dsdp arg2 arg3
end
function SetFixedVariables(dsdp::DSDPT, arg2, arg3, arg4, arg5::Integer)
@dsdp_ccall DSDPSetFixedVariables (DSDPT, Ptr{Cdouble}, Ptr{Cdouble}, Ptr{Cdouble}, Cint) dsdp arg2 arg3 arg4 arg5
end
function GetFixedYX(dsdp::DSDPT, arg2::Integer, arg3)
@dsdp_ccall DSDPGetFixedYX (DSDPT, Cint, Ptr{Cdouble}) dsdp arg2 arg3
end
function View(dsdp::DSDPT)
@dsdp_ccall DSDPView (DSDPT,) dsdp
end
function PrintOptions()
ccall((:DSDPPrintOptions, libdsdp), Cint, ())
end
function SetOptions(dsdp::DSDPT, arg2, arg3::Integer)
@dsdp_ccall DSDPSetOptions (DSDPT, Ptr{Cstring}, Cint) dsdp arg2 arg3
end
function ReadOptions(dsdp::DSDPT, arg2)
@dsdp_ccall DSDPReadOptions (DSDPT, Ptr{UInt8}) dsdp arg2
end
function SetDestroyRoutine(dsdp::DSDPT, arg2, arg3)
@dsdp_ccall DSDPSetDestroyRoutine (DSDPT, DSDPT, DSDPT) dsdp arg2 arg3
end