casadi 3.6.3__cp35-none-manylinux2010_x86_64.whl → 3.6.5__cp35-none-manylinux2010_x86_64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (571) hide show
  1. casadi/_casadi.so +0 -0
  2. casadi/casadi.py +415 -260
  3. casadi/cbc +0 -0
  4. casadi/clp +0 -0
  5. casadi/cmake/casadi-config-version.cmake +1 -1
  6. casadi/include/casadi/casadi.i +43 -18
  7. casadi/include/casadi/config.h +6 -6
  8. casadi/include/casadi/core/calculus.hpp +1 -1
  9. casadi/include/casadi/core/code_generator.hpp +29 -1
  10. casadi/include/casadi/core/core.hpp +1 -0
  11. casadi/include/casadi/core/fmu.hpp +29 -1
  12. casadi/include/casadi/core/generic_expression.hpp +1 -1
  13. casadi/include/casadi/core/generic_type.hpp +25 -1
  14. casadi/include/casadi/core/matrix_decl.hpp +15 -0
  15. casadi/include/casadi/core/nlpsol.hpp +0 -2
  16. casadi/include/casadi/core/runtime/casadi_nlp.hpp +131 -6
  17. casadi/include/casadi/core/runtime/casadi_sqpmethod.hpp +11 -1
  18. casadi/include/casadi/core/serializing_stream.hpp +12 -0
  19. casadi/include/casadi/core/sparsity.hpp +5 -3
  20. casadi/include/casadi/core/tools.hpp +67 -0
  21. casadi/include/casadi/doc.i +1457 -825
  22. casadi/include/casadi/doc_merged.i +1089 -570
  23. casadi/include/coin/BonArraysHelpers.hpp +52 -0
  24. casadi/include/coin/BonAuxInfos.hpp +110 -0
  25. casadi/include/coin/BonBabInfos.hpp +57 -0
  26. casadi/include/coin/BonBabSetupBase.hpp +386 -0
  27. casadi/include/coin/BonBonminSetup.hpp +95 -0
  28. casadi/include/coin/BonBranchingTQP.hpp +197 -0
  29. casadi/include/coin/BonCbc.hpp +127 -0
  30. casadi/include/coin/BonCbcLpStrategy.hpp +45 -0
  31. casadi/include/coin/BonCbcNlpStrategy.hpp +98 -0
  32. casadi/include/coin/BonCbcNode.hpp +133 -0
  33. casadi/include/coin/BonChooseVariable.hpp +345 -0
  34. casadi/include/coin/BonCurvBranchingSolver.hpp +77 -0
  35. casadi/include/coin/BonCutStrengthener.hpp +244 -0
  36. casadi/include/coin/BonDiver.hpp +424 -0
  37. casadi/include/coin/BonDummyHeuristic.hpp +53 -0
  38. casadi/include/coin/BonDummyPump.hpp +43 -0
  39. casadi/include/coin/BonEcpCuts.hpp +97 -0
  40. casadi/include/coin/BonExitCodes.hpp +12 -0
  41. casadi/include/coin/BonFixAndSolveHeuristic.hpp +43 -0
  42. casadi/include/coin/BonGuessHeuristic.hpp +46 -0
  43. casadi/include/coin/BonHeuristicDive.hpp +88 -0
  44. casadi/include/coin/BonHeuristicDiveFractional.hpp +67 -0
  45. casadi/include/coin/BonHeuristicDiveMIP.hpp +83 -0
  46. casadi/include/coin/BonHeuristicDiveMIPFractional.hpp +67 -0
  47. casadi/include/coin/BonHeuristicDiveMIPVectorLength.hpp +74 -0
  48. casadi/include/coin/BonHeuristicDiveVectorLength.hpp +74 -0
  49. casadi/include/coin/BonHeuristicFPump.hpp +111 -0
  50. casadi/include/coin/BonHeuristicLocalBranching.hpp +59 -0
  51. casadi/include/coin/BonHeuristicRINS.hpp +55 -0
  52. casadi/include/coin/BonIpoptInteriorWarmStarter.hpp +103 -0
  53. casadi/include/coin/BonIpoptSolver.hpp +188 -0
  54. casadi/include/coin/BonIpoptWarmStart.hpp +148 -0
  55. casadi/include/coin/BonLinearCutsGenerator.hpp +75 -0
  56. casadi/include/coin/BonLocalSolverBasedHeuristic.hpp +102 -0
  57. casadi/include/coin/BonLpBranchingSolver.hpp +80 -0
  58. casadi/include/coin/BonMilpRounding.hpp +74 -0
  59. casadi/include/coin/BonOACutGenerator2.hpp +56 -0
  60. casadi/include/coin/BonOAMessages.hpp +44 -0
  61. casadi/include/coin/BonOaDecBase.hpp +297 -0
  62. casadi/include/coin/BonOaFeasChecker.hpp +73 -0
  63. casadi/include/coin/BonOaNlpOptim.hpp +116 -0
  64. casadi/include/coin/BonOsiTMINLPInterface.hpp +1342 -0
  65. casadi/include/coin/BonOuterApprox.hpp +123 -0
  66. casadi/include/coin/BonPseudoCosts.hpp +91 -0
  67. casadi/include/coin/BonPumpForMinlp.hpp +45 -0
  68. casadi/include/coin/BonQuadCut.hpp +217 -0
  69. casadi/include/coin/BonQuadRow.hpp +122 -0
  70. casadi/include/coin/BonRegisteredOptions.hpp +225 -0
  71. casadi/include/coin/BonStrongBranchingSolver.hpp +69 -0
  72. casadi/include/coin/BonSubMipSolver.hpp +143 -0
  73. casadi/include/coin/BonTMINLP.hpp +420 -0
  74. casadi/include/coin/BonTMINLP2OsiLP.hpp +164 -0
  75. casadi/include/coin/BonTMINLP2Quad.hpp +191 -0
  76. casadi/include/coin/BonTMINLP2TNLP.hpp +509 -0
  77. casadi/include/coin/BonTMINLPLinObj.hpp +216 -0
  78. casadi/include/coin/BonTMatrix.hpp +167 -0
  79. casadi/include/coin/BonTNLP2FPNLP.hpp +264 -0
  80. casadi/include/coin/BonTNLPSolver.hpp +241 -0
  81. casadi/include/coin/BonTypes.hpp +95 -0
  82. casadi/include/coin/BonminConfig.h +19 -0
  83. casadi/include/coin/CbcBranchActual.hpp +26 -0
  84. casadi/include/coin/CbcBranchAllDifferent.hpp +61 -0
  85. casadi/include/coin/CbcBranchBase.hpp +79 -0
  86. casadi/include/coin/CbcBranchCut.hpp +182 -0
  87. casadi/include/coin/CbcBranchDecision.hpp +135 -0
  88. casadi/include/coin/CbcBranchDefaultDecision.hpp +101 -0
  89. casadi/include/coin/CbcBranchDynamic.hpp +210 -0
  90. casadi/include/coin/CbcBranchLotsize.hpp +249 -0
  91. casadi/include/coin/CbcBranchToFixLots.hpp +94 -0
  92. casadi/include/coin/CbcBranchingObject.hpp +245 -0
  93. casadi/include/coin/CbcClique.hpp +309 -0
  94. casadi/include/coin/CbcCompare.hpp +46 -0
  95. casadi/include/coin/CbcCompareActual.hpp +16 -0
  96. casadi/include/coin/CbcCompareBase.hpp +155 -0
  97. casadi/include/coin/CbcCompareDefault.hpp +129 -0
  98. casadi/include/coin/CbcCompareDepth.hpp +48 -0
  99. casadi/include/coin/CbcCompareEstimate.hpp +48 -0
  100. casadi/include/coin/CbcCompareObjective.hpp +50 -0
  101. casadi/include/coin/CbcConfig.h +18 -0
  102. casadi/include/coin/CbcConsequence.hpp +50 -0
  103. casadi/include/coin/CbcCountRowCut.hpp +176 -0
  104. casadi/include/coin/CbcCutGenerator.hpp +550 -0
  105. casadi/include/coin/CbcCutModifier.hpp +59 -0
  106. casadi/include/coin/CbcCutSubsetModifier.hpp +69 -0
  107. casadi/include/coin/CbcDummyBranchingObject.hpp +83 -0
  108. casadi/include/coin/CbcEventHandler.hpp +250 -0
  109. casadi/include/coin/CbcFathom.hpp +136 -0
  110. casadi/include/coin/CbcFathomDynamicProgramming.hpp +177 -0
  111. casadi/include/coin/CbcFeasibilityBase.hpp +60 -0
  112. casadi/include/coin/CbcFixVariable.hpp +68 -0
  113. casadi/include/coin/CbcFollowOn.hpp +207 -0
  114. casadi/include/coin/CbcFullNodeInfo.hpp +171 -0
  115. casadi/include/coin/CbcGeneral.hpp +60 -0
  116. casadi/include/coin/CbcGeneralDepth.hpp +289 -0
  117. casadi/include/coin/CbcHeuristic.hpp +735 -0
  118. casadi/include/coin/CbcHeuristicDINS.hpp +98 -0
  119. casadi/include/coin/CbcHeuristicDW.hpp +374 -0
  120. casadi/include/coin/CbcHeuristicDive.hpp +198 -0
  121. casadi/include/coin/CbcHeuristicDiveCoefficient.hpp +52 -0
  122. casadi/include/coin/CbcHeuristicDiveFractional.hpp +52 -0
  123. casadi/include/coin/CbcHeuristicDiveGuided.hpp +55 -0
  124. casadi/include/coin/CbcHeuristicDiveLineSearch.hpp +52 -0
  125. casadi/include/coin/CbcHeuristicDivePseudoCost.hpp +60 -0
  126. casadi/include/coin/CbcHeuristicDiveVectorLength.hpp +52 -0
  127. casadi/include/coin/CbcHeuristicFPump.hpp +375 -0
  128. casadi/include/coin/CbcHeuristicGreedy.hpp +289 -0
  129. casadi/include/coin/CbcHeuristicLocal.hpp +276 -0
  130. casadi/include/coin/CbcHeuristicPivotAndFix.hpp +58 -0
  131. casadi/include/coin/CbcHeuristicRENS.hpp +79 -0
  132. casadi/include/coin/CbcHeuristicRINS.hpp +106 -0
  133. casadi/include/coin/CbcHeuristicRandRound.hpp +58 -0
  134. casadi/include/coin/CbcHeuristicVND.hpp +95 -0
  135. casadi/include/coin/CbcLinked.hpp +1443 -0
  136. casadi/include/coin/CbcMessage.hpp +94 -0
  137. casadi/include/coin/CbcMipStartIO.hpp +29 -0
  138. casadi/include/coin/CbcModel.hpp +3296 -0
  139. casadi/include/coin/CbcNWay.hpp +171 -0
  140. casadi/include/coin/CbcNode.hpp +380 -0
  141. casadi/include/coin/CbcNodeInfo.hpp +377 -0
  142. casadi/include/coin/CbcObject.hpp +288 -0
  143. casadi/include/coin/CbcObjectUpdateData.hpp +63 -0
  144. casadi/include/coin/CbcOrClpParam.cpp +4321 -0
  145. casadi/include/coin/CbcOrClpParam.hpp +585 -0
  146. casadi/include/coin/CbcParam.hpp +338 -0
  147. casadi/include/coin/CbcPartialNodeInfo.hpp +116 -0
  148. casadi/include/coin/CbcSOS.hpp +290 -0
  149. casadi/include/coin/CbcSimpleInteger.hpp +299 -0
  150. casadi/include/coin/CbcSimpleIntegerDynamicPseudoCost.hpp +619 -0
  151. casadi/include/coin/CbcSimpleIntegerPseudoCost.hpp +122 -0
  152. casadi/include/coin/CbcSolver.hpp +460 -0
  153. casadi/include/coin/CbcStrategy.hpp +269 -0
  154. casadi/include/coin/CbcSubProblem.hpp +84 -0
  155. casadi/include/coin/CbcTree.hpp +493 -0
  156. casadi/include/coin/CbcTreeLocal.hpp +393 -0
  157. casadi/include/coin/Cbc_C_Interface.h +904 -0
  158. casadi/include/coin/Cgl012cut.hpp +464 -0
  159. casadi/include/coin/CglAllDifferent.hpp +115 -0
  160. casadi/include/coin/CglClique.hpp +312 -0
  161. casadi/include/coin/CglConfig.h +19 -0
  162. casadi/include/coin/CglCutGenerator.hpp +133 -0
  163. casadi/include/coin/CglDuplicateRow.hpp +189 -0
  164. casadi/include/coin/CglFlowCover.hpp +371 -0
  165. casadi/include/coin/CglGMI.hpp +364 -0
  166. casadi/include/coin/CglGMIParam.hpp +313 -0
  167. casadi/include/coin/CglGomory.hpp +204 -0
  168. casadi/include/coin/CglKnapsackCover.hpp +310 -0
  169. casadi/include/coin/CglLandP.hpp +306 -0
  170. casadi/include/coin/CglLandPValidator.hpp +130 -0
  171. casadi/include/coin/CglLiftAndProject.hpp +104 -0
  172. casadi/include/coin/CglMessage.hpp +49 -0
  173. casadi/include/coin/CglMixedIntegerRounding.hpp +429 -0
  174. casadi/include/coin/CglMixedIntegerRounding2.hpp +427 -0
  175. casadi/include/coin/CglOddHole.hpp +160 -0
  176. casadi/include/coin/CglParam.hpp +93 -0
  177. casadi/include/coin/CglPreProcess.hpp +600 -0
  178. casadi/include/coin/CglProbing.hpp +543 -0
  179. casadi/include/coin/CglRedSplit.hpp +448 -0
  180. casadi/include/coin/CglRedSplit2.hpp +494 -0
  181. casadi/include/coin/CglRedSplit2Param.hpp +495 -0
  182. casadi/include/coin/CglRedSplitParam.hpp +272 -0
  183. casadi/include/coin/CglResidualCapacity.hpp +240 -0
  184. casadi/include/coin/CglSimpleRounding.hpp +174 -0
  185. casadi/include/coin/CglStored.hpp +140 -0
  186. casadi/include/coin/CglTreeInfo.hpp +216 -0
  187. casadi/include/coin/CglTwomir.hpp +562 -0
  188. casadi/include/coin/CglZeroHalf.hpp +133 -0
  189. casadi/include/coin/ClpAmplObjective.hpp +113 -0
  190. casadi/include/coin/ClpCholeskyBase.hpp +321 -0
  191. casadi/include/coin/ClpCholeskyDense.hpp +157 -0
  192. casadi/include/coin/ClpCholeskyMumps.hpp +65 -0
  193. casadi/include/coin/ClpCholeskyPardiso.hpp +67 -0
  194. casadi/include/coin/ClpConfig.h +17 -0
  195. casadi/include/coin/ClpConstraint.hpp +129 -0
  196. casadi/include/coin/ClpConstraintAmpl.hpp +109 -0
  197. casadi/include/coin/ClpConstraintLinear.hpp +113 -0
  198. casadi/include/coin/ClpConstraintQuadratic.hpp +123 -0
  199. casadi/include/coin/ClpDualRowDantzig.hpp +72 -0
  200. casadi/include/coin/ClpDualRowPivot.hpp +136 -0
  201. casadi/include/coin/ClpDualRowSteepest.hpp +160 -0
  202. casadi/include/coin/ClpDummyMatrix.hpp +186 -0
  203. casadi/include/coin/ClpDynamicExampleMatrix.hpp +199 -0
  204. casadi/include/coin/ClpDynamicMatrix.hpp +420 -0
  205. casadi/include/coin/ClpEventHandler.hpp +193 -0
  206. casadi/include/coin/ClpFactorization.hpp +556 -0
  207. casadi/include/coin/ClpGubDynamicMatrix.hpp +270 -0
  208. casadi/include/coin/ClpGubMatrix.hpp +373 -0
  209. casadi/include/coin/ClpInterior.hpp +622 -0
  210. casadi/include/coin/ClpLinearObjective.hpp +104 -0
  211. casadi/include/coin/ClpMatrixBase.hpp +561 -0
  212. casadi/include/coin/ClpMessage.hpp +131 -0
  213. casadi/include/coin/ClpModel.hpp +1442 -0
  214. casadi/include/coin/ClpNetworkMatrix.hpp +235 -0
  215. casadi/include/coin/ClpNode.hpp +364 -0
  216. casadi/include/coin/ClpNonLinearCost.hpp +432 -0
  217. casadi/include/coin/ClpObjective.hpp +142 -0
  218. casadi/include/coin/ClpPEDualRowDantzig.hpp +84 -0
  219. casadi/include/coin/ClpPEDualRowSteepest.hpp +100 -0
  220. casadi/include/coin/ClpPEPrimalColumnDantzig.hpp +71 -0
  221. casadi/include/coin/ClpPEPrimalColumnSteepest.hpp +107 -0
  222. casadi/include/coin/ClpPESimplex.hpp +231 -0
  223. casadi/include/coin/ClpPackedMatrix.hpp +778 -0
  224. casadi/include/coin/ClpParameters.hpp +132 -0
  225. casadi/include/coin/ClpPdcoBase.hpp +110 -0
  226. casadi/include/coin/ClpPlusMinusOneMatrix.hpp +565 -0
  227. casadi/include/coin/ClpPresolve.hpp +379 -0
  228. casadi/include/coin/ClpPrimalColumnDantzig.hpp +74 -0
  229. casadi/include/coin/ClpPrimalColumnPivot.hpp +163 -0
  230. casadi/include/coin/ClpPrimalColumnSteepest.hpp +281 -0
  231. casadi/include/coin/ClpQuadraticObjective.hpp +161 -0
  232. casadi/include/coin/ClpSimplex.hpp +2137 -0
  233. casadi/include/coin/ClpSimplexDual.hpp +304 -0
  234. casadi/include/coin/ClpSimplexNonlinear.hpp +117 -0
  235. casadi/include/coin/ClpSimplexOther.hpp +282 -0
  236. casadi/include/coin/ClpSimplexPrimal.hpp +244 -0
  237. casadi/include/coin/ClpSolve.hpp +505 -0
  238. casadi/include/coin/Clp_C_Interface.h +554 -0
  239. casadi/include/coin/CoinAlloc.hpp +179 -0
  240. casadi/include/coin/CoinBuild.hpp +159 -0
  241. casadi/include/coin/CoinDenseFactorization.hpp +452 -0
  242. casadi/include/coin/CoinDenseVector.hpp +401 -0
  243. casadi/include/coin/CoinDistance.hpp +51 -0
  244. casadi/include/coin/CoinError.hpp +274 -0
  245. casadi/include/coin/CoinFactorization.hpp +2178 -0
  246. casadi/include/coin/CoinFileIO.hpp +185 -0
  247. casadi/include/coin/CoinFinite.hpp +37 -0
  248. casadi/include/coin/CoinFloatEqual.hpp +204 -0
  249. casadi/include/coin/CoinHelperFunctions.hpp +1270 -0
  250. casadi/include/coin/CoinIndexedVector.hpp +1437 -0
  251. casadi/include/coin/CoinLpIO.hpp +836 -0
  252. casadi/include/coin/CoinMessage.hpp +95 -0
  253. casadi/include/coin/CoinMessageHandler.hpp +717 -0
  254. casadi/include/coin/CoinModel.hpp +1214 -0
  255. casadi/include/coin/CoinModelUseful.hpp +518 -0
  256. casadi/include/coin/CoinMpsIO.hpp +1142 -0
  257. casadi/include/coin/CoinOslFactorization.hpp +287 -0
  258. casadi/include/coin/CoinPackedMatrix.hpp +956 -0
  259. casadi/include/coin/CoinPackedVector.hpp +670 -0
  260. casadi/include/coin/CoinPackedVectorBase.hpp +274 -0
  261. casadi/include/coin/CoinParam.hpp +644 -0
  262. casadi/include/coin/CoinPragma.hpp +29 -0
  263. casadi/include/coin/CoinPresolveDoubleton.hpp +76 -0
  264. casadi/include/coin/CoinPresolveDual.hpp +84 -0
  265. casadi/include/coin/CoinPresolveDupcol.hpp +259 -0
  266. casadi/include/coin/CoinPresolveEmpty.hpp +120 -0
  267. casadi/include/coin/CoinPresolveFixed.hpp +185 -0
  268. casadi/include/coin/CoinPresolveForcing.hpp +69 -0
  269. casadi/include/coin/CoinPresolveImpliedFree.hpp +66 -0
  270. casadi/include/coin/CoinPresolveIsolated.hpp +59 -0
  271. casadi/include/coin/CoinPresolveMatrix.hpp +1996 -0
  272. casadi/include/coin/CoinPresolveMonitor.hpp +105 -0
  273. casadi/include/coin/CoinPresolvePsdebug.hpp +169 -0
  274. casadi/include/coin/CoinPresolveSingleton.hpp +115 -0
  275. casadi/include/coin/CoinPresolveSubst.hpp +103 -0
  276. casadi/include/coin/CoinPresolveTighten.hpp +58 -0
  277. casadi/include/coin/CoinPresolveTripleton.hpp +69 -0
  278. casadi/include/coin/CoinPresolveUseless.hpp +63 -0
  279. casadi/include/coin/CoinPresolveZeros.hpp +65 -0
  280. casadi/include/coin/CoinRational.hpp +43 -0
  281. casadi/include/coin/CoinSearchTree.hpp +523 -0
  282. casadi/include/coin/CoinShallowPackedVector.hpp +149 -0
  283. casadi/include/coin/CoinSignal.hpp +127 -0
  284. casadi/include/coin/CoinSimpFactorization.hpp +432 -0
  285. casadi/include/coin/CoinSmartPtr.hpp +548 -0
  286. casadi/include/coin/CoinSnapshot.hpp +572 -0
  287. casadi/include/coin/CoinSort.hpp +753 -0
  288. casadi/include/coin/CoinStructuredModel.hpp +270 -0
  289. casadi/include/coin/CoinTime.hpp +350 -0
  290. casadi/include/coin/CoinTypes.hpp +67 -0
  291. casadi/include/coin/CoinUtility.hpp +26 -0
  292. casadi/include/coin/CoinUtilsConfig.h +34 -0
  293. casadi/include/coin/CoinWarmStart.hpp +56 -0
  294. casadi/include/coin/CoinWarmStartBasis.hpp +468 -0
  295. casadi/include/coin/CoinWarmStartDual.hpp +180 -0
  296. casadi/include/coin/CoinWarmStartPrimalDual.hpp +233 -0
  297. casadi/include/coin/CoinWarmStartVector.hpp +523 -0
  298. casadi/include/coin/Coin_C_defines.h +149 -0
  299. casadi/include/coin/Idiot.hpp +327 -0
  300. casadi/include/coin/OsiAuxInfo.hpp +261 -0
  301. casadi/include/coin/OsiBranchingObject.hpp +1097 -0
  302. casadi/include/coin/OsiCbcSolverInterface.hpp +791 -0
  303. casadi/include/coin/OsiChooseVariable.hpp +645 -0
  304. casadi/include/coin/OsiClpSolverInterface.hpp +1604 -0
  305. casadi/include/coin/OsiColCut.hpp +322 -0
  306. casadi/include/coin/OsiCollections.hpp +34 -0
  307. casadi/include/coin/OsiConfig.h +19 -0
  308. casadi/include/coin/OsiCut.hpp +251 -0
  309. casadi/include/coin/OsiCuts.hpp +505 -0
  310. casadi/include/coin/OsiPresolve.hpp +272 -0
  311. casadi/include/coin/OsiRowCut.hpp +345 -0
  312. casadi/include/coin/OsiRowCutDebugger.hpp +190 -0
  313. casadi/include/coin/OsiSolverBranch.hpp +169 -0
  314. casadi/include/coin/OsiSolverInterface.hpp +2221 -0
  315. casadi/include/coin/OsiSolverParameters.hpp +144 -0
  316. casadi/include/coin/OsiUnitTests.hpp +390 -0
  317. casadi/include/coin-or/IpAlgBuilder.hpp +417 -0
  318. casadi/include/coin-or/IpAlgStrategy.hpp +201 -0
  319. casadi/include/coin-or/IpAlgTypes.hpp +64 -0
  320. casadi/include/coin-or/IpAugSystemSolver.hpp +212 -0
  321. casadi/include/coin-or/IpBlas.hpp +426 -0
  322. casadi/include/coin-or/IpCachedResults.hpp +897 -0
  323. casadi/include/coin-or/IpCompoundMatrix.hpp +423 -0
  324. casadi/include/coin-or/IpCompoundSymMatrix.hpp +348 -0
  325. casadi/include/coin-or/IpCompoundVector.hpp +395 -0
  326. casadi/include/coin-or/IpConvCheck.hpp +97 -0
  327. casadi/include/coin-or/IpDebug.hpp +167 -0
  328. casadi/include/coin-or/IpDenseVector.hpp +626 -0
  329. casadi/include/coin-or/IpDiagMatrix.hpp +158 -0
  330. casadi/include/coin-or/IpEqMultCalculator.hpp +76 -0
  331. casadi/include/coin-or/IpException.hpp +156 -0
  332. casadi/include/coin-or/IpExpansionMatrix.hpp +245 -0
  333. casadi/include/coin-or/IpGenTMatrix.hpp +290 -0
  334. casadi/include/coin-or/IpHessianUpdater.hpp +73 -0
  335. casadi/include/coin-or/IpIdentityMatrix.hpp +167 -0
  336. casadi/include/coin-or/IpIpoptAlg.hpp +257 -0
  337. casadi/include/coin-or/IpIpoptApplication.hpp +367 -0
  338. casadi/include/coin-or/IpIpoptCalculatedQuantities.hpp +1009 -0
  339. casadi/include/coin-or/IpIpoptData.hpp +966 -0
  340. casadi/include/coin-or/IpIpoptNLP.hpp +328 -0
  341. casadi/include/coin-or/IpIterateInitializer.hpp +68 -0
  342. casadi/include/coin-or/IpIteratesVector.hpp +840 -0
  343. casadi/include/coin-or/IpIterationOutput.hpp +78 -0
  344. casadi/include/coin-or/IpJournalist.hpp +573 -0
  345. casadi/include/coin-or/IpLapack.hpp +227 -0
  346. casadi/include/coin-or/IpLibraryLoader.hpp +76 -0
  347. casadi/include/coin-or/IpLineSearch.hpp +106 -0
  348. casadi/include/coin-or/IpLinearSolvers.h +46 -0
  349. casadi/include/coin-or/IpMatrix.hpp +434 -0
  350. casadi/include/coin-or/IpMuUpdate.hpp +77 -0
  351. casadi/include/coin-or/IpNLP.hpp +306 -0
  352. casadi/include/coin-or/IpNLPScaling.hpp +582 -0
  353. casadi/include/coin-or/IpObserver.hpp +422 -0
  354. casadi/include/coin-or/IpOptionsList.hpp +412 -0
  355. casadi/include/coin-or/IpOrigIpoptNLP.hpp +603 -0
  356. casadi/include/coin-or/IpPDSystemSolver.hpp +137 -0
  357. casadi/include/coin-or/IpReferenced.hpp +262 -0
  358. casadi/include/coin-or/IpRegOptions.hpp +1152 -0
  359. casadi/include/coin-or/IpReturnCodes.h +23 -0
  360. casadi/include/coin-or/IpReturnCodes.hpp +18 -0
  361. casadi/include/coin-or/IpReturnCodes.inc +71 -0
  362. casadi/include/coin-or/IpReturnCodes_inc.h +45 -0
  363. casadi/include/coin-or/IpScaledMatrix.hpp +291 -0
  364. casadi/include/coin-or/IpSearchDirCalculator.hpp +72 -0
  365. casadi/include/coin-or/IpSmartPtr.hpp +865 -0
  366. casadi/include/coin-or/IpSolveStatistics.hpp +210 -0
  367. casadi/include/coin-or/IpSparseSymLinearSolverInterface.hpp +260 -0
  368. casadi/include/coin-or/IpStdAugSystemSolver.cpp +555 -0
  369. casadi/include/coin-or/IpStdCInterface.h +428 -0
  370. casadi/include/coin-or/IpSumSymMatrix.hpp +186 -0
  371. casadi/include/coin-or/IpSymLinearSolver.hpp +141 -0
  372. casadi/include/coin-or/IpSymMatrix.hpp +167 -0
  373. casadi/include/coin-or/IpSymScaledMatrix.hpp +255 -0
  374. casadi/include/coin-or/IpSymTMatrix.hpp +275 -0
  375. casadi/include/coin-or/IpTNLP.hpp +820 -0
  376. casadi/include/coin-or/IpTNLPAdapter.hpp +648 -0
  377. casadi/include/coin-or/IpTNLPReducer.hpp +274 -0
  378. casadi/include/coin-or/IpTaggedObject.hpp +128 -0
  379. casadi/include/coin-or/IpTimedTask.hpp +218 -0
  380. casadi/include/coin-or/IpTimingStatistics.hpp +323 -0
  381. casadi/include/coin-or/IpTripletHelper.hpp +308 -0
  382. casadi/include/coin-or/IpTypes.h +81 -0
  383. casadi/include/coin-or/IpTypes.hpp +30 -0
  384. casadi/include/coin-or/IpUtils.hpp +166 -0
  385. casadi/include/coin-or/IpVector.hpp +892 -0
  386. casadi/include/coin-or/IpZeroSymMatrix.hpp +155 -0
  387. casadi/include/coin-or/IpoptConfig.h +45 -0
  388. casadi/include/coin-or/SensAlgorithm.hpp +114 -0
  389. casadi/include/coin-or/SensApplication.hpp +188 -0
  390. casadi/include/coin-or/SensBacksolver.hpp +36 -0
  391. casadi/include/coin-or/SensMeasurement.hpp +56 -0
  392. casadi/include/coin-or/SensPCalculator.hpp +137 -0
  393. casadi/include/coin-or/SensRegOp.hpp +21 -0
  394. casadi/include/coin-or/SensSchurData.hpp +182 -0
  395. casadi/include/coin-or/SensSchurDriver.hpp +118 -0
  396. casadi/include/coin-or/SensSimpleBacksolver.hpp +49 -0
  397. casadi/include/coin-or/SensStepCalc.hpp +85 -0
  398. casadi/include/coin-or/SensUtils.hpp +63 -0
  399. casadi/include/coin-or/metis/defs.h +161 -0
  400. casadi/include/coin-or/metis/macros.h +143 -0
  401. casadi/include/coin-or/metis/metis.h +37 -0
  402. casadi/include/coin-or/metis/proto.h +505 -0
  403. casadi/include/coin-or/metis/rename.h +418 -0
  404. casadi/include/coin-or/metis/struct.h +251 -0
  405. casadi/include/coin-or/mumps/dmumps_c.h +142 -0
  406. casadi/include/coin-or/mumps/mumps_c_types.h +72 -0
  407. casadi/include/coin-or/mumps/mumps_compat.h +27 -0
  408. casadi/include/coin-or/mumps/mumps_int_def.h +11 -0
  409. casadi/include/coin-or/mumps/mumps_mpi.h +67 -0
  410. casadi/include/d_blas.h +78 -0
  411. casadi/include/d_blas_64.h +73 -0
  412. casadi/include/openblas/cblas.h +411 -0
  413. casadi/include/openblas/f77blas.h +796 -0
  414. casadi/include/openblas/lapack.h +22997 -0
  415. casadi/include/openblas/lapacke.h +12665 -0
  416. casadi/include/openblas/lapacke_config.h +119 -0
  417. casadi/include/openblas/lapacke_example_aux.h +9 -0
  418. casadi/include/openblas/lapacke_mangling.h +17 -0
  419. casadi/include/openblas/lapacke_utils.h +582 -0
  420. casadi/include/openblas/openblas/lapacke_mangling.h +17 -0
  421. casadi/include/openblas/openblas_config.h +139 -0
  422. casadi/include/qdldl/qdldl.h +169 -0
  423. casadi/include/qdldl/qdldl_types.h +23 -0
  424. casadi/include/s_blas.h +78 -0
  425. casadi/include/s_blas_64.h +73 -0
  426. casadi/lib64/libtinyxml2.a +0 -0
  427. casadi/libCbc.la +3 -3
  428. casadi/libCbc.so +0 -0
  429. casadi/libCbc.so.3 +0 -0
  430. casadi/libCbc.so.3.10.11 +0 -0
  431. casadi/libCbcSolver.la +3 -3
  432. casadi/libCbcSolver.so +0 -0
  433. casadi/libCbcSolver.so.3 +0 -0
  434. casadi/libCbcSolver.so.3.10.11 +0 -0
  435. casadi/libCgl.la +2 -2
  436. casadi/libCgl.so +0 -0
  437. casadi/libCgl.so.1 +0 -0
  438. casadi/libCgl.so.1.10.8 +0 -0
  439. casadi/libClp.la +2 -2
  440. casadi/libClp.so +0 -0
  441. casadi/libClp.so.1 +0 -0
  442. casadi/libClp.so.1.14.9 +0 -0
  443. casadi/libClpSolver.la +2 -2
  444. casadi/libClpSolver.so +0 -0
  445. casadi/libClpSolver.so.1 +0 -0
  446. casadi/{libClpSolver.so.1.14.7 → libClpSolver.so.1.14.9} +0 -0
  447. casadi/libCoinUtils.la +2 -2
  448. casadi/libCoinUtils.so +0 -0
  449. casadi/libCoinUtils.so.3 +0 -0
  450. casadi/libCoinUtils.so.3.11.10 +0 -0
  451. casadi/libOsi.la +2 -2
  452. casadi/libOsiCbc.la +3 -3
  453. casadi/libOsiCbc.so +0 -0
  454. casadi/libOsiCbc.so.3 +0 -0
  455. casadi/{libOsiCbc.so.3.10.6 → libOsiCbc.so.3.10.11} +0 -0
  456. casadi/libOsiClp.la +2 -2
  457. casadi/libOsiClp.so +0 -0
  458. casadi/libOsiClp.so.1 +0 -0
  459. casadi/libOsiClp.so.1.14.9 +0 -0
  460. casadi/libOsiCommonTests.la +2 -2
  461. casadi/libOsiCommonTests.so +0 -0
  462. casadi/libOsiCommonTests.so.1 +0 -0
  463. casadi/{libOsiCommonTests.so.1.13.7 → libOsiCommonTests.so.1.13.9} +0 -0
  464. casadi/libbonmin.la +3 -3
  465. casadi/libbonmin.so +0 -0
  466. casadi/libbonmin.so.4 +0 -0
  467. casadi/libbonmin.so.4.8.9 +0 -0
  468. casadi/libcasadi.so +0 -0
  469. casadi/libcasadi.so.3.7 +0 -0
  470. casadi/libcasadi_conic_cbc.so +0 -0
  471. casadi/libcasadi_conic_cbc.so.3.7 +0 -0
  472. casadi/libcasadi_conic_clp.so +0 -0
  473. casadi/libcasadi_conic_clp.so.3.7 +0 -0
  474. casadi/libcasadi_conic_cplex.so +0 -0
  475. casadi/libcasadi_conic_cplex.so.3.7 +0 -0
  476. casadi/libcasadi_conic_gurobi.so +0 -0
  477. casadi/libcasadi_conic_gurobi.so.3.7 +0 -0
  478. casadi/libcasadi_conic_hpipm.so +0 -0
  479. casadi/libcasadi_conic_hpipm.so.3.7 +0 -0
  480. casadi/libcasadi_conic_ipqp.so +0 -0
  481. casadi/libcasadi_conic_ipqp.so.3.7 +0 -0
  482. casadi/libcasadi_conic_nlpsol.so +0 -0
  483. casadi/libcasadi_conic_nlpsol.so.3.7 +0 -0
  484. casadi/libcasadi_conic_osqp.so +0 -0
  485. casadi/libcasadi_conic_osqp.so.3.7 +0 -0
  486. casadi/libcasadi_conic_qpoases.so +0 -0
  487. casadi/libcasadi_conic_qpoases.so.3.7 +0 -0
  488. casadi/libcasadi_conic_qrqp.so +0 -0
  489. casadi/libcasadi_conic_qrqp.so.3.7 +0 -0
  490. casadi/libcasadi_conic_superscs.so +0 -0
  491. casadi/libcasadi_conic_superscs.so.3.7 +0 -0
  492. casadi/libcasadi_integrator_collocation.so +0 -0
  493. casadi/libcasadi_integrator_collocation.so.3.7 +0 -0
  494. casadi/libcasadi_integrator_cvodes.so +0 -0
  495. casadi/libcasadi_integrator_cvodes.so.3.7 +0 -0
  496. casadi/libcasadi_integrator_idas.so +0 -0
  497. casadi/libcasadi_integrator_idas.so.3.7 +0 -0
  498. casadi/libcasadi_interpolant_bspline.so +0 -0
  499. casadi/libcasadi_interpolant_bspline.so.3.7 +0 -0
  500. casadi/libcasadi_interpolant_linear.so +0 -0
  501. casadi/libcasadi_interpolant_linear.so.3.7 +0 -0
  502. casadi/libcasadi_linsol_lapacklu.so +0 -0
  503. casadi/libcasadi_linsol_lapacklu.so.3.7 +0 -0
  504. casadi/libcasadi_linsol_lapackqr.so +0 -0
  505. casadi/libcasadi_linsol_lapackqr.so.3.7 +0 -0
  506. casadi/libcasadi_linsol_ldl.so +0 -0
  507. casadi/libcasadi_linsol_ldl.so.3.7 +0 -0
  508. casadi/libcasadi_linsol_mumps.so +0 -0
  509. casadi/libcasadi_linsol_mumps.so.3.7 +0 -0
  510. casadi/libcasadi_linsol_qr.so +0 -0
  511. casadi/libcasadi_linsol_qr.so.3.7 +0 -0
  512. casadi/libcasadi_linsol_symbolicqr.so +0 -0
  513. casadi/libcasadi_linsol_symbolicqr.so.3.7 +0 -0
  514. casadi/libcasadi_nlpsol_ampl.so +0 -0
  515. casadi/libcasadi_nlpsol_ampl.so.3.7 +0 -0
  516. casadi/libcasadi_nlpsol_blocksqp.so +0 -0
  517. casadi/libcasadi_nlpsol_blocksqp.so.3.7 +0 -0
  518. casadi/libcasadi_nlpsol_bonmin.so +0 -0
  519. casadi/libcasadi_nlpsol_bonmin.so.3.7 +0 -0
  520. casadi/libcasadi_nlpsol_feasiblesqpmethod.so +0 -0
  521. casadi/libcasadi_nlpsol_feasiblesqpmethod.so.3.7 +0 -0
  522. casadi/libcasadi_nlpsol_ipopt.so +0 -0
  523. casadi/libcasadi_nlpsol_ipopt.so.3.7 +0 -0
  524. casadi/libcasadi_nlpsol_knitro.so +0 -0
  525. casadi/libcasadi_nlpsol_knitro.so.3.7 +0 -0
  526. casadi/libcasadi_nlpsol_qrsqp.so +0 -0
  527. casadi/libcasadi_nlpsol_qrsqp.so.3.7 +0 -0
  528. casadi/libcasadi_nlpsol_scpgen.so +0 -0
  529. casadi/libcasadi_nlpsol_scpgen.so.3.7 +0 -0
  530. casadi/libcasadi_nlpsol_snopt.so +0 -0
  531. casadi/libcasadi_nlpsol_snopt.so.3.7 +0 -0
  532. casadi/libcasadi_nlpsol_sqpmethod.so +0 -0
  533. casadi/libcasadi_nlpsol_sqpmethod.so.3.7 +0 -0
  534. casadi/libcasadi_nlpsol_worhp.so +0 -0
  535. casadi/libcasadi_nlpsol_worhp.so.3.7 +0 -0
  536. casadi/libcasadi_rootfinder_fast_newton.so +0 -0
  537. casadi/libcasadi_rootfinder_fast_newton.so.3.7 +0 -0
  538. casadi/libcasadi_rootfinder_newton.so +0 -0
  539. casadi/libcasadi_rootfinder_newton.so.3.7 +0 -0
  540. casadi/libcasadi_sundials_common.so +0 -0
  541. casadi/libcasadi_sundials_common.so.3.7 +0 -0
  542. casadi/libindirect.a +0 -0
  543. casadi/liblinsys.a +0 -0
  544. casadi/libosqp.a +0 -0
  545. casadi/libqdldl.a +0 -0
  546. casadi/libsuperscs.a +0 -0
  547. casadi/pkgconfig/blas.pc +11 -0
  548. casadi/pkgconfig/bonmin.pc +1 -1
  549. casadi/pkgconfig/casadi.pc +1 -1
  550. casadi/pkgconfig/cbc.pc +2 -2
  551. casadi/pkgconfig/cgl.pc +2 -2
  552. casadi/pkgconfig/clp.pc +1 -1
  553. casadi/pkgconfig/coinutils.pc +1 -1
  554. casadi/pkgconfig/lapack.pc +11 -0
  555. casadi/pkgconfig/openblas.pc +1 -1
  556. casadi/pkgconfig/osi-cbc.pc +1 -1
  557. casadi/pkgconfig/osi-clp.pc +1 -1
  558. casadi/pkgconfig/osi-unittests.pc +1 -1
  559. casadi/pkgconfig/osi.pc +1 -1
  560. {casadi-3.6.3.dist-info → casadi-3.6.5.dist-info}/METADATA +11 -3
  561. casadi-3.6.5.dist-info/RECORD +987 -0
  562. casadi/libCbc.so.3.10.6 +0 -0
  563. casadi/libCbcSolver.so.3.10.6 +0 -0
  564. casadi/libCgl.so.1.10.4 +0 -0
  565. casadi/libClp.so.1.14.7 +0 -0
  566. casadi/libCoinUtils.so.3.11.6 +0 -0
  567. casadi/libOsiClp.so.1.14.7 +0 -0
  568. casadi/libbonmin.so.4.8.8 +0 -0
  569. casadi-3.6.3.dist-info/RECORD +0 -581
  570. /casadi/{libOsi.so.1.13.7 → libOsi.so.1.13.9} +0 -0
  571. {casadi-3.6.3.dist-info → casadi-3.6.5.dist-info}/WHEEL +0 -0
@@ -0,0 +1,753 @@
1
+ /* $Id$ */
2
+ // Copyright (C) 2000, International Business Machines
3
+ // Corporation and others. All Rights Reserved.
4
+ // This code is licensed under the terms of the Eclipse Public License (EPL).
5
+
6
+ #ifndef CoinSort_H
7
+ #define CoinSort_H
8
+
9
+ #include <functional>
10
+ #include <new>
11
+ #include <algorithm>
12
+ #include "CoinDistance.hpp"
13
+
14
+ // Uncomment the next three lines to get thorough initialisation of memory.
15
+ // #ifndef ZEROFAULT
16
+ // #define ZEROFAULT
17
+ // #endif
18
+
19
+ #ifdef COIN_FAST_CODE
20
+ #ifndef COIN_USE_EKK_SORT
21
+ #define COIN_USE_EKK_SORT
22
+ #endif
23
+ #endif
24
+
25
+ //#############################################################################
26
+
27
+ /** An ordered pair. It's the same as std::pair, just this way it'll have the
28
+ same look as the triple sorting. */
29
+ template < class S, class T >
30
+ struct CoinPair {
31
+ public:
32
+ /// First member of pair
33
+ S first;
34
+ /// Second member of pair
35
+ T second;
36
+
37
+ public:
38
+ /// Construct from ordered pair
39
+ CoinPair(const S &s, const T &t)
40
+ : first(s)
41
+ , second(t)
42
+ {
43
+ }
44
+ };
45
+
46
+ //#############################################################################
47
+
48
+ /**@name Comparisons on first element of two ordered pairs */
49
+ //@{
50
+ /** Function operator.
51
+ Returns true if t1.first &lt; t2.first (i.e., increasing). */
52
+ template < class S, class T >
53
+ class CoinFirstLess_2 {
54
+ public:
55
+ /// Compare function
56
+ inline bool operator()(const CoinPair< S, T > &t1,
57
+ const CoinPair< S, T > &t2) const
58
+ {
59
+ return t1.first < t2.first;
60
+ }
61
+ };
62
+ //-----------------------------------------------------------------------------
63
+ /** Function operator.
64
+ Returns true if t1.first &gt; t2.first (i.e, decreasing). */
65
+ template < class S, class T >
66
+ class CoinFirstGreater_2 {
67
+ public:
68
+ /// Compare function
69
+ inline bool operator()(const CoinPair< S, T > &t1,
70
+ const CoinPair< S, T > &t2) const
71
+ {
72
+ return t1.first > t2.first;
73
+ }
74
+ };
75
+ //-----------------------------------------------------------------------------
76
+ /** Function operator.
77
+ Returns true if abs(t1.first) &lt; abs(t2.first) (i.e., increasing). */
78
+ template < class S, class T >
79
+ class CoinFirstAbsLess_2 {
80
+ public:
81
+ /// Compare function
82
+ inline bool operator()(const CoinPair< S, T > &t1,
83
+ const CoinPair< S, T > &t2) const
84
+ {
85
+ const T t1Abs = t1.first < static_cast< T >(0) ? -t1.first : t1.first;
86
+ const T t2Abs = t2.first < static_cast< T >(0) ? -t2.first : t2.first;
87
+ return t1Abs < t2Abs;
88
+ }
89
+ };
90
+ //-----------------------------------------------------------------------------
91
+ /** Function operator.
92
+ Returns true if abs(t1.first) &gt; abs(t2.first) (i.e., decreasing). */
93
+ template < class S, class T >
94
+ class CoinFirstAbsGreater_2 {
95
+ public:
96
+ /// Compare function
97
+ inline bool operator()(CoinPair< S, T > t1, CoinPair< S, T > t2) const
98
+ {
99
+ const T t1Abs = t1.first < static_cast< T >(0) ? -t1.first : t1.first;
100
+ const T t2Abs = t2.first < static_cast< T >(0) ? -t2.first : t2.first;
101
+ return t1Abs > t2Abs;
102
+ }
103
+ };
104
+ //-----------------------------------------------------------------------------
105
+ /** Function operator.
106
+ Compare based on the entries of an external vector, i.e., returns true if
107
+ vec[t1.first &lt; vec[t2.first] (i.e., increasing wrt. vec). Note that to
108
+ use this comparison operator .first must be a data type automatically
109
+ convertible to int. */
110
+ template < class S, class T, class V >
111
+ class CoinExternalVectorFirstLess_2 {
112
+ private:
113
+ CoinExternalVectorFirstLess_2();
114
+
115
+ private:
116
+ const V *vec_;
117
+
118
+ public:
119
+ inline bool operator()(const CoinPair< S, T > &t1,
120
+ const CoinPair< S, T > &t2) const
121
+ {
122
+ return vec_[t1.first] < vec_[t2.first];
123
+ }
124
+ CoinExternalVectorFirstLess_2(const V *v)
125
+ : vec_(v)
126
+ {
127
+ }
128
+ };
129
+ //-----------------------------------------------------------------------------
130
+ /** Function operator.
131
+ Compare based on the entries of an external vector, i.e., returns true if
132
+ vec[t1.first &gt; vec[t2.first] (i.e., decreasing wrt. vec). Note that to
133
+ use this comparison operator .first must be a data type automatically
134
+ convertible to int. */
135
+ template < class S, class T, class V >
136
+ class CoinExternalVectorFirstGreater_2 {
137
+ private:
138
+ CoinExternalVectorFirstGreater_2();
139
+
140
+ private:
141
+ const V *vec_;
142
+
143
+ public:
144
+ inline bool operator()(const CoinPair< S, T > &t1,
145
+ const CoinPair< S, T > &t2) const
146
+ {
147
+ return vec_[t1.first] > vec_[t2.first];
148
+ }
149
+ CoinExternalVectorFirstGreater_2(const V *v)
150
+ : vec_(v)
151
+ {
152
+ }
153
+ };
154
+ //@}
155
+
156
+ //#############################################################################
157
+
158
+ /** Sort a pair of containers.<br>
159
+
160
+ Iter_S - iterator for first container<br>
161
+ Iter_T - iterator for 2nd container<br>
162
+ CoinCompare2 - class comparing CoinPairs<br>
163
+ */
164
+
165
+ #ifdef COIN_SORT_ARBITRARY_CONTAINERS
166
+ template < class Iter_S, class Iter_T, class CoinCompare2 >
167
+ void CoinSort_2(Iter_S sfirst, Iter_S slast, Iter_T tfirst, const CoinCompare2 &pc)
168
+ {
169
+ typedef typename std::iterator_traits< Iter_S >::value_type S;
170
+ typedef typename std::iterator_traits< Iter_T >::value_type T;
171
+ const size_t len = coinDistance(sfirst, slast);
172
+ if (len <= 1)
173
+ return;
174
+
175
+ typedef CoinPair< S, T > ST_pair;
176
+ ST_pair *x = static_cast< ST_pair * >(::operator new(len * sizeof(ST_pair)));
177
+ #ifdef ZEROFAULT
178
+ memset(x, 0, (len * sizeof(ST_pair)));
179
+ #endif
180
+
181
+ int i = 0;
182
+ Iter_S scurrent = sfirst;
183
+ Iter_T tcurrent = tfirst;
184
+ while (scurrent != slast) {
185
+ new (x + i++) ST_pair(*scurrent++, *tcurrent++);
186
+ }
187
+
188
+ std::sort(x.begin(), x.end(), pc);
189
+
190
+ scurrent = sfirst;
191
+ tcurrent = tfirst;
192
+ for (i = 0; i < len; ++i) {
193
+ *scurrent++ = x[i].first;
194
+ *tcurrent++ = x[i].second;
195
+ }
196
+
197
+ ::operator delete(x);
198
+ }
199
+ //-----------------------------------------------------------------------------
200
+ template < class Iter_S, class Iter_T >
201
+ void CoinSort_2(Iter_S sfirst, Iter_S slast, Iter_T tfirst)
202
+ {
203
+ typedef typename std::iterator_traits< Iter_S >::value_type S;
204
+ typedef typename std::iterator_traits< Iter_T >::value_type T;
205
+ CoinSort_2(sfirst, slast, tfirst, CoinFirstLess_2< S, T >());
206
+ }
207
+
208
+ #else //=======================================================================
209
+
210
+ template < class S, class T, class CoinCompare2 >
211
+ void CoinSort_2(S *sfirst, S *slast, T *tfirst, const CoinCompare2 &pc)
212
+ {
213
+ const size_t len = coinDistance(sfirst, slast);
214
+ if (len <= 1)
215
+ return;
216
+
217
+ typedef CoinPair< S, T > ST_pair;
218
+ ST_pair *x = static_cast< ST_pair * >(::operator new(len * sizeof(ST_pair)));
219
+ #ifdef ZEROFAULT
220
+ // Can show RUI errors on some systems due to copy of ST_pair with gaps.
221
+ // E.g., <int, double> has 4 byte alignment gap on Solaris/SUNWspro.
222
+ memset(x, 0, (len * sizeof(ST_pair)));
223
+ #endif
224
+
225
+ size_t i = 0;
226
+ S *scurrent = sfirst;
227
+ T *tcurrent = tfirst;
228
+ while (scurrent != slast) {
229
+ new (x + i++) ST_pair(*scurrent++, *tcurrent++);
230
+ }
231
+
232
+ std::sort(x, x + len, pc);
233
+
234
+ scurrent = sfirst;
235
+ tcurrent = tfirst;
236
+ for (i = 0; i < len; ++i) {
237
+ *scurrent++ = x[i].first;
238
+ *tcurrent++ = x[i].second;
239
+ }
240
+
241
+ ::operator delete(x);
242
+ }
243
+ template < class S, class T >
244
+ void
245
+ // This Always uses std::sort
246
+ CoinSort_2Std(S *sfirst, S *slast, T *tfirst)
247
+ {
248
+ CoinSort_2(sfirst, slast, tfirst, CoinFirstLess_2< S, T >());
249
+ }
250
+ #ifndef COIN_USE_EKK_SORT
251
+ //-----------------------------------------------------------------------------
252
+ template < class S, class T >
253
+ void CoinSort_2(S *sfirst, S *slast, T *tfirst)
254
+ {
255
+ CoinSort_2(sfirst, slast, tfirst, CoinFirstLess_2< S, T >());
256
+ }
257
+ #else
258
+ //-----------------------------------------------------------------------------
259
+ extern int boundary_sort;
260
+ extern int boundary_sort2;
261
+ extern int boundary_sort3;
262
+ /// Sort without new and delete
263
+ template < class S, class T >
264
+ void CoinSort_2(S *key, S *lastKey, T *array2)
265
+ {
266
+ const size_t number = coinDistance(key, lastKey);
267
+ if (number <= 1) {
268
+ return;
269
+ } else if (number > 10000) {
270
+ CoinSort_2Std(key, lastKey, array2);
271
+ return;
272
+ }
273
+ #if 0
274
+ if (number==boundary_sort3) {
275
+ printf("before sort %d entries\n",number);
276
+ for (int j=0;j<number;j++) {
277
+ std::cout<<" ( "<<key[j]<<","<<array2[j]<<")";
278
+ }
279
+ std::cout<<std::endl;
280
+ }
281
+ #endif
282
+ int minsize = 10;
283
+ int n = static_cast< int >(number);
284
+ int sp;
285
+ S *v = key;
286
+ S *m, t;
287
+ S *ls[32], *rs[32];
288
+ S *l, *r, c;
289
+ T it;
290
+ int j;
291
+ /*check already sorted */
292
+ S last = key[0];
293
+ for (j = 1; j < n; j++) {
294
+ if (key[j] >= last) {
295
+ last = key[j];
296
+ } else {
297
+ break;
298
+ } /* endif */
299
+ } /* endfor */
300
+ if (j == n) {
301
+ return;
302
+ } /* endif */
303
+ sp = 0;
304
+ ls[sp] = v;
305
+ rs[sp] = v + (n - 1);
306
+ while (sp >= 0) {
307
+ if (rs[sp] - ls[sp] > minsize) {
308
+ l = ls[sp];
309
+ r = rs[sp];
310
+ m = l + (r - l) / 2;
311
+ if (*l > *m) {
312
+ t = *l;
313
+ *l = *m;
314
+ *m = t;
315
+ it = array2[l - v];
316
+ array2[l - v] = array2[m - v];
317
+ array2[m - v] = it;
318
+ }
319
+ if (*m > *r) {
320
+ t = *m;
321
+ *m = *r;
322
+ *r = t;
323
+ it = array2[m - v];
324
+ array2[m - v] = array2[r - v];
325
+ array2[r - v] = it;
326
+ if (*l > *m) {
327
+ t = *l;
328
+ *l = *m;
329
+ *m = t;
330
+ it = array2[l - v];
331
+ array2[l - v] = array2[m - v];
332
+ array2[m - v] = it;
333
+ }
334
+ }
335
+ c = *m;
336
+ while (r - l > 1) {
337
+ while (*(++l) < c)
338
+ ;
339
+ while (*(--r) > c)
340
+ ;
341
+ t = *l;
342
+ *l = *r;
343
+ *r = t;
344
+ it = array2[l - v];
345
+ array2[l - v] = array2[r - v];
346
+ array2[r - v] = it;
347
+ }
348
+ l = r - 1;
349
+ if (l < m) {
350
+ ls[sp + 1] = ls[sp];
351
+ rs[sp + 1] = l;
352
+ ls[sp] = r;
353
+ } else {
354
+ ls[sp + 1] = r;
355
+ rs[sp + 1] = rs[sp];
356
+ rs[sp] = l;
357
+ }
358
+ sp++;
359
+ } else
360
+ sp--;
361
+ }
362
+ for (l = v, m = v + (n - 1); l < m; l++) {
363
+ if (*l > *(l + 1)) {
364
+ c = *(l + 1);
365
+ it = array2[(l - v) + 1];
366
+ for (r = l; r >= v && *r > c; r--) {
367
+ *(r + 1) = *r;
368
+ array2[(r - v) + 1] = array2[(r - v)];
369
+ }
370
+ *(r + 1) = c;
371
+ array2[(r - v) + 1] = it;
372
+ }
373
+ }
374
+ #if 0
375
+ if (number==boundary_sort3) {
376
+ printf("after sort %d entries\n",number);
377
+ for (int j=0;j<number;j++) {
378
+ std::cout<<" ( "<<key[j]<<","<<array2[j]<<")";
379
+ }
380
+ std::cout<<std::endl;
381
+ CoinSort_2Many(key, lastKey, array2);
382
+ printf("after2 sort %d entries\n",number);
383
+ for (int j=0;j<number;j++) {
384
+ std::cout<<" ( "<<key[j]<<","<<array2[j]<<")";
385
+ }
386
+ std::cout<<std::endl;
387
+ }
388
+ #endif
389
+ }
390
+ #endif
391
+ #endif
392
+ /// Sort without new and delete
393
+ template < class S, class T >
394
+ void CoinShortSort_2(S *key, S *lastKey, T *array2)
395
+ {
396
+ const size_t number = coinDistance(key, lastKey);
397
+ if (number <= 2) {
398
+ if (number == 2 && key[0] > key[1]) {
399
+ S tempS = key[0];
400
+ T tempT = array2[0];
401
+ key[0] = key[1];
402
+ array2[0] = array2[1];
403
+ key[1] = tempS;
404
+ array2[1] = tempT;
405
+ }
406
+ return;
407
+ } else if (number > 10000) {
408
+ CoinSort_2Std(key, lastKey, array2);
409
+ return;
410
+ }
411
+ int minsize = 10;
412
+ size_t n = number;
413
+ int sp;
414
+ S *v = key;
415
+ S *m, t;
416
+ S *ls[32], *rs[32];
417
+ S *l, *r, c;
418
+ T it;
419
+ size_t j;
420
+ /*check already sorted */
421
+ S last = key[0];
422
+ for (j = 1; j < n; j++) {
423
+ if (key[j] >= last) {
424
+ last = key[j];
425
+ } else {
426
+ break;
427
+ } /* endif */
428
+ } /* endfor */
429
+ if (j == n) {
430
+ return;
431
+ } /* endif */
432
+ sp = 0;
433
+ ls[sp] = v;
434
+ rs[sp] = v + (n - 1);
435
+ while (sp >= 0) {
436
+ if (rs[sp] - ls[sp] > minsize) {
437
+ l = ls[sp];
438
+ r = rs[sp];
439
+ m = l + (r - l) / 2;
440
+ if (*l > *m) {
441
+ t = *l;
442
+ *l = *m;
443
+ *m = t;
444
+ it = array2[l - v];
445
+ array2[l - v] = array2[m - v];
446
+ array2[m - v] = it;
447
+ }
448
+ if (*m > *r) {
449
+ t = *m;
450
+ *m = *r;
451
+ *r = t;
452
+ it = array2[m - v];
453
+ array2[m - v] = array2[r - v];
454
+ array2[r - v] = it;
455
+ if (*l > *m) {
456
+ t = *l;
457
+ *l = *m;
458
+ *m = t;
459
+ it = array2[l - v];
460
+ array2[l - v] = array2[m - v];
461
+ array2[m - v] = it;
462
+ }
463
+ }
464
+ c = *m;
465
+ while (r - l > 1) {
466
+ while (*(++l) < c)
467
+ ;
468
+ while (*(--r) > c)
469
+ ;
470
+ t = *l;
471
+ *l = *r;
472
+ *r = t;
473
+ it = array2[l - v];
474
+ array2[l - v] = array2[r - v];
475
+ array2[r - v] = it;
476
+ }
477
+ l = r - 1;
478
+ if (l < m) {
479
+ ls[sp + 1] = ls[sp];
480
+ rs[sp + 1] = l;
481
+ ls[sp] = r;
482
+ } else {
483
+ ls[sp + 1] = r;
484
+ rs[sp + 1] = rs[sp];
485
+ rs[sp] = l;
486
+ }
487
+ sp++;
488
+ } else
489
+ sp--;
490
+ }
491
+ for (l = v, m = v + (n - 1); l < m; l++) {
492
+ if (*l > *(l + 1)) {
493
+ c = *(l + 1);
494
+ it = array2[(l - v) + 1];
495
+ for (r = l; r >= v && *r > c; r--) {
496
+ *(r + 1) = *r;
497
+ array2[(r - v) + 1] = array2[(r - v)];
498
+ }
499
+ *(r + 1) = c;
500
+ array2[(r - v) + 1] = it;
501
+ }
502
+ }
503
+ }
504
+ //#############################################################################
505
+ //#############################################################################
506
+
507
+ /**@name Ordered Triple Struct */
508
+ template < class S, class T, class U >
509
+ class CoinTriple {
510
+ public:
511
+ /// First member of triple
512
+ S first;
513
+ /// Second member of triple
514
+ T second;
515
+ /// Third member of triple
516
+ U third;
517
+
518
+ public:
519
+ /// Construct from ordered triple
520
+ CoinTriple(const S &s, const T &t, const U &u)
521
+ : first(s)
522
+ , second(t)
523
+ , third(u)
524
+ {
525
+ }
526
+ };
527
+
528
+ //#############################################################################
529
+ /**@name Comparisons on first element of two ordered triples */
530
+ //@{
531
+ /** Function operator.
532
+ Returns true if t1.first &lt; t2.first (i.e., increasing). */
533
+ template < class S, class T, class U >
534
+ class CoinFirstLess_3 {
535
+ public:
536
+ /// Compare function
537
+ inline bool operator()(const CoinTriple< S, T, U > &t1,
538
+ const CoinTriple< S, T, U > &t2) const
539
+ {
540
+ return t1.first < t2.first;
541
+ }
542
+ };
543
+ //-----------------------------------------------------------------------------
544
+ /** Function operator.
545
+ Returns true if t1.first &gt; t2.first (i.e, decreasing). */
546
+ template < class S, class T, class U >
547
+ class CoinFirstGreater_3 {
548
+ public:
549
+ /// Compare function
550
+ inline bool operator()(const CoinTriple< S, T, U > &t1,
551
+ const CoinTriple< S, T, U > &t2) const
552
+ {
553
+ return t1.first > t2.first;
554
+ }
555
+ };
556
+ //-----------------------------------------------------------------------------
557
+ /** Function operator.
558
+ Returns true if abs(t1.first) &lt; abs(t2.first) (i.e., increasing). */
559
+ template < class S, class T, class U >
560
+ class CoinFirstAbsLess_3 {
561
+ public:
562
+ /// Compare function
563
+ inline bool operator()(const CoinTriple< S, T, U > &t1,
564
+ const CoinTriple< S, T, U > &t2) const
565
+ {
566
+ const T t1Abs = t1.first < static_cast< T >(0) ? -t1.first : t1.first;
567
+ const T t2Abs = t2.first < static_cast< T >(0) ? -t2.first : t2.first;
568
+ return t1Abs < t2Abs;
569
+ }
570
+ };
571
+ //-----------------------------------------------------------------------------
572
+ /** Function operator.
573
+ Returns true if abs(t1.first) &gt; abs(t2.first) (i.e., decreasing). */
574
+ template < class S, class T, class U >
575
+ class CoinFirstAbsGreater_3 {
576
+ public:
577
+ /// Compare function
578
+ inline bool operator()(const CoinTriple< S, T, U > &t1,
579
+ const CoinTriple< S, T, U > &t2) const
580
+ {
581
+ const T t1Abs = t1.first < static_cast< T >(0) ? -t1.first : t1.first;
582
+ const T t2Abs = t2.first < static_cast< T >(0) ? -t2.first : t2.first;
583
+ return t1Abs > t2Abs;
584
+ }
585
+ };
586
+ //-----------------------------------------------------------------------------
587
+ /** Function operator.
588
+ Compare based on the entries of an external vector, i.e., returns true if
589
+ vec[t1.first &lt; vec[t2.first] (i.e., increasing wrt. vec). Note that to
590
+ use this comparison operator .first must be a data type automatically
591
+ convertible to int. */
592
+ template < class S, class T, class U, class V >
593
+ class CoinExternalVectorFirstLess_3 {
594
+ private:
595
+ CoinExternalVectorFirstLess_3();
596
+
597
+ private:
598
+ const V *vec_;
599
+
600
+ public:
601
+ inline bool operator()(const CoinTriple< S, T, U > &t1,
602
+ const CoinTriple< S, T, U > &t2) const
603
+ {
604
+ return vec_[t1.first] < vec_[t2.first];
605
+ }
606
+ CoinExternalVectorFirstLess_3(const V *v)
607
+ : vec_(v)
608
+ {
609
+ }
610
+ };
611
+ //-----------------------------------------------------------------------------
612
+ /** Function operator.
613
+ Compare based on the entries of an external vector, i.e., returns true if
614
+ vec[t1.first &gt; vec[t2.first] (i.e., decreasing wrt. vec). Note that to
615
+ use this comparison operator .first must be a data type automatically
616
+ convertible to int. */
617
+ template < class S, class T, class U, class V >
618
+ class CoinExternalVectorFirstGreater_3 {
619
+ private:
620
+ CoinExternalVectorFirstGreater_3();
621
+
622
+ private:
623
+ const V *vec_;
624
+
625
+ public:
626
+ inline bool operator()(const CoinTriple< S, T, U > &t1,
627
+ const CoinTriple< S, T, U > &t2) const
628
+ {
629
+ return vec_[t1.first] > vec_[t2.first];
630
+ }
631
+ CoinExternalVectorFirstGreater_3(const V *v)
632
+ : vec_(v)
633
+ {
634
+ }
635
+ };
636
+ //@}
637
+
638
+ //#############################################################################
639
+
640
+ /**@name Typedefs for sorting the entries of a packed vector based on an
641
+ external vector. */
642
+ //@{
643
+ /// Sort packed vector in increasing order of the external vector
644
+ typedef CoinExternalVectorFirstLess_3< int, int, double, double >
645
+ CoinIncrSolutionOrdered;
646
+ /// Sort packed vector in decreasing order of the external vector
647
+ typedef CoinExternalVectorFirstGreater_3< int, int, double, double >
648
+ CoinDecrSolutionOrdered;
649
+ //@}
650
+
651
+ //#############################################################################
652
+
653
+ /** Sort a triple of containers.<br>
654
+
655
+ Iter_S - iterator for first container<br>
656
+ Iter_T - iterator for 2nd container<br>
657
+ Iter_U - iterator for 3rd container<br>
658
+ CoinCompare3 - class comparing CoinTriples<br>
659
+ */
660
+ #ifdef COIN_SORT_ARBITRARY_CONTAINERS
661
+ template < class Iter_S, class Iter_T, class Iter_U, class CoinCompare3 >
662
+ void CoinSort_3(Iter_S sfirst, Iter_S slast, Iter_T tfirst, Iter_U, ufirst,
663
+ const CoinCompare3 &tc)
664
+ {
665
+ typedef typename std::iterator_traits< Iter_S >::value_type S;
666
+ typedef typename std::iterator_traits< Iter_T >::value_type T;
667
+ typedef typename std::iterator_traits< Iter_U >::value_type U;
668
+ const size_t len = coinDistance(sfirst, slast);
669
+ if (len <= 1)
670
+ return;
671
+
672
+ typedef CoinTriple< S, T, U > STU_triple;
673
+ STU_triple *x = static_cast< STU_triple * >(::operator new(len * sizeof(STU_triple)));
674
+
675
+ int i = 0;
676
+ Iter_S scurrent = sfirst;
677
+ Iter_T tcurrent = tfirst;
678
+ Iter_U ucurrent = ufirst;
679
+ while (scurrent != slast) {
680
+ new (x + i++) STU_triple(*scurrent++, *tcurrent++, *ucurrent++);
681
+ }
682
+
683
+ std::sort(x, x + len, tc);
684
+
685
+ scurrent = sfirst;
686
+ tcurrent = tfirst;
687
+ ucurrent = ufirst;
688
+ for (i = 0; i < len; ++i) {
689
+ *scurrent++ = x[i].first;
690
+ *tcurrent++ = x[i].second;
691
+ *ucurrent++ = x[i].third;
692
+ }
693
+
694
+ ::operator delete(x);
695
+ }
696
+ //-----------------------------------------------------------------------------
697
+ template < class Iter_S, class Iter_T, class Iter_U >
698
+ void CoinSort_3(Iter_S sfirst, Iter_S slast, Iter_T tfirst, Iter_U, ufirst)
699
+ {
700
+ typedef typename std::iterator_traits< Iter_S >::value_type S;
701
+ typedef typename std::iterator_traits< Iter_T >::value_type T;
702
+ typedef typename std::iterator_traits< Iter_U >::value_type U;
703
+ CoinSort_3(sfirts, slast, tfirst, ufirst, CoinFirstLess_3< S, T, U >());
704
+ }
705
+
706
+ #else //=======================================================================
707
+
708
+ template < class S, class T, class U, class CoinCompare3 >
709
+ void CoinSort_3(S *sfirst, S *slast, T *tfirst, U *ufirst, const CoinCompare3 &tc)
710
+ {
711
+ const size_t len = coinDistance(sfirst, slast);
712
+ if (len <= 1)
713
+ return;
714
+
715
+ typedef CoinTriple< S, T, U > STU_triple;
716
+ STU_triple *x = static_cast< STU_triple * >(::operator new(len * sizeof(STU_triple)));
717
+
718
+ size_t i = 0;
719
+ S *scurrent = sfirst;
720
+ T *tcurrent = tfirst;
721
+ U *ucurrent = ufirst;
722
+ while (scurrent != slast) {
723
+ new (x + i++) STU_triple(*scurrent++, *tcurrent++, *ucurrent++);
724
+ }
725
+
726
+ std::sort(x, x + len, tc);
727
+
728
+ scurrent = sfirst;
729
+ tcurrent = tfirst;
730
+ ucurrent = ufirst;
731
+ for (i = 0; i < len; ++i) {
732
+ *scurrent++ = x[i].first;
733
+ *tcurrent++ = x[i].second;
734
+ *ucurrent++ = x[i].third;
735
+ }
736
+
737
+ ::operator delete(x);
738
+ }
739
+ //-----------------------------------------------------------------------------
740
+ template < class S, class T, class U >
741
+ void CoinSort_3(S *sfirst, S *slast, T *tfirst, U *ufirst)
742
+ {
743
+ CoinSort_3(sfirst, slast, tfirst, ufirst, CoinFirstLess_3< S, T, U >());
744
+ }
745
+
746
+ #endif
747
+
748
+ //#############################################################################
749
+
750
+ #endif
751
+
752
+ /* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
753
+ */