ruby-cbc 0.1.9 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (290) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +5 -5
  3. data/Rakefile +0 -2
  4. data/lib/ruby-cbc.rb +1 -1
  5. data/lib/ruby-cbc/problem.rb +6 -8
  6. data/lib/ruby-cbc/version.rb +1 -1
  7. data/ruby-cbc.gemspec +3 -2
  8. metadata +17 -287
  9. data/ext/ruby-cbc/cbc.i +0 -15
  10. data/ext/ruby-cbc/cbc_wrap.c +0 -4618
  11. data/ext/ruby-cbc/extconf.rb +0 -60
  12. data/ext/ruby-cbc/install/bin/cbc +0 -0
  13. data/ext/ruby-cbc/install/bin/clp +0 -0
  14. data/ext/ruby-cbc/install/include/coin/CbcBranchActual.hpp +0 -24
  15. data/ext/ruby-cbc/install/include/coin/CbcBranchAllDifferent.hpp +0 -62
  16. data/ext/ruby-cbc/install/include/coin/CbcBranchBase.hpp +0 -78
  17. data/ext/ruby-cbc/install/include/coin/CbcBranchCut.hpp +0 -183
  18. data/ext/ruby-cbc/install/include/coin/CbcBranchDecision.hpp +0 -129
  19. data/ext/ruby-cbc/install/include/coin/CbcBranchDefaultDecision.hpp +0 -100
  20. data/ext/ruby-cbc/install/include/coin/CbcBranchDynamic.hpp +0 -206
  21. data/ext/ruby-cbc/install/include/coin/CbcBranchLotsize.hpp +0 -242
  22. data/ext/ruby-cbc/install/include/coin/CbcBranchToFixLots.hpp +0 -94
  23. data/ext/ruby-cbc/install/include/coin/CbcBranchingObject.hpp +0 -236
  24. data/ext/ruby-cbc/install/include/coin/CbcClique.hpp +0 -303
  25. data/ext/ruby-cbc/install/include/coin/CbcCompare.hpp +0 -39
  26. data/ext/ruby-cbc/install/include/coin/CbcCompareActual.hpp +0 -14
  27. data/ext/ruby-cbc/install/include/coin/CbcCompareBase.hpp +0 -142
  28. data/ext/ruby-cbc/install/include/coin/CbcCompareDefault.hpp +0 -120
  29. data/ext/ruby-cbc/install/include/coin/CbcCompareDepth.hpp +0 -47
  30. data/ext/ruby-cbc/install/include/coin/CbcCompareEstimate.hpp +0 -48
  31. data/ext/ruby-cbc/install/include/coin/CbcCompareObjective.hpp +0 -49
  32. data/ext/ruby-cbc/install/include/coin/CbcConfig.h +0 -14
  33. data/ext/ruby-cbc/install/include/coin/CbcConsequence.hpp +0 -49
  34. data/ext/ruby-cbc/install/include/coin/CbcCountRowCut.hpp +0 -168
  35. data/ext/ruby-cbc/install/include/coin/CbcCutGenerator.hpp +0 -482
  36. data/ext/ruby-cbc/install/include/coin/CbcCutModifier.hpp +0 -57
  37. data/ext/ruby-cbc/install/include/coin/CbcCutSubsetModifier.hpp +0 -66
  38. data/ext/ruby-cbc/install/include/coin/CbcDummyBranchingObject.hpp +0 -83
  39. data/ext/ruby-cbc/install/include/coin/CbcEventHandler.hpp +0 -245
  40. data/ext/ruby-cbc/install/include/coin/CbcFathom.hpp +0 -137
  41. data/ext/ruby-cbc/install/include/coin/CbcFathomDynamicProgramming.hpp +0 -169
  42. data/ext/ruby-cbc/install/include/coin/CbcFeasibilityBase.hpp +0 -56
  43. data/ext/ruby-cbc/install/include/coin/CbcFixVariable.hpp +0 -67
  44. data/ext/ruby-cbc/install/include/coin/CbcFollowOn.hpp +0 -207
  45. data/ext/ruby-cbc/install/include/coin/CbcFullNodeInfo.hpp +0 -161
  46. data/ext/ruby-cbc/install/include/coin/CbcGeneral.hpp +0 -60
  47. data/ext/ruby-cbc/install/include/coin/CbcGeneralDepth.hpp +0 -279
  48. data/ext/ruby-cbc/install/include/coin/CbcHeuristic.hpp +0 -682
  49. data/ext/ruby-cbc/install/include/coin/CbcHeuristicDINS.hpp +0 -96
  50. data/ext/ruby-cbc/install/include/coin/CbcHeuristicDW.hpp +0 -309
  51. data/ext/ruby-cbc/install/include/coin/CbcHeuristicDive.hpp +0 -192
  52. data/ext/ruby-cbc/install/include/coin/CbcHeuristicDiveCoefficient.hpp +0 -52
  53. data/ext/ruby-cbc/install/include/coin/CbcHeuristicDiveFractional.hpp +0 -52
  54. data/ext/ruby-cbc/install/include/coin/CbcHeuristicDiveGuided.hpp +0 -55
  55. data/ext/ruby-cbc/install/include/coin/CbcHeuristicDiveLineSearch.hpp +0 -52
  56. data/ext/ruby-cbc/install/include/coin/CbcHeuristicDivePseudoCost.hpp +0 -60
  57. data/ext/ruby-cbc/install/include/coin/CbcHeuristicDiveVectorLength.hpp +0 -52
  58. data/ext/ruby-cbc/install/include/coin/CbcHeuristicFPump.hpp +0 -340
  59. data/ext/ruby-cbc/install/include/coin/CbcHeuristicGreedy.hpp +0 -280
  60. data/ext/ruby-cbc/install/include/coin/CbcHeuristicLocal.hpp +0 -271
  61. data/ext/ruby-cbc/install/include/coin/CbcHeuristicPivotAndFix.hpp +0 -58
  62. data/ext/ruby-cbc/install/include/coin/CbcHeuristicRENS.hpp +0 -77
  63. data/ext/ruby-cbc/install/include/coin/CbcHeuristicRINS.hpp +0 -102
  64. data/ext/ruby-cbc/install/include/coin/CbcHeuristicRandRound.hpp +0 -58
  65. data/ext/ruby-cbc/install/include/coin/CbcHeuristicVND.hpp +0 -94
  66. data/ext/ruby-cbc/install/include/coin/CbcLinked.hpp +0 -1406
  67. data/ext/ruby-cbc/install/include/coin/CbcMessage.hpp +0 -94
  68. data/ext/ruby-cbc/install/include/coin/CbcMipStartIO.hpp +0 -26
  69. data/ext/ruby-cbc/install/include/coin/CbcModel.hpp +0 -2952
  70. data/ext/ruby-cbc/install/include/coin/CbcNWay.hpp +0 -166
  71. data/ext/ruby-cbc/install/include/coin/CbcNode.hpp +0 -351
  72. data/ext/ruby-cbc/install/include/coin/CbcNodeInfo.hpp +0 -349
  73. data/ext/ruby-cbc/install/include/coin/CbcObject.hpp +0 -272
  74. data/ext/ruby-cbc/install/include/coin/CbcObjectUpdateData.hpp +0 -64
  75. data/ext/ruby-cbc/install/include/coin/CbcOrClpParam.cpp +0 -4134
  76. data/ext/ruby-cbc/install/include/coin/CbcOrClpParam.hpp +0 -532
  77. data/ext/ruby-cbc/install/include/coin/CbcParam.hpp +0 -324
  78. data/ext/ruby-cbc/install/include/coin/CbcPartialNodeInfo.hpp +0 -110
  79. data/ext/ruby-cbc/install/include/coin/CbcSOS.hpp +0 -279
  80. data/ext/ruby-cbc/install/include/coin/CbcSimpleInteger.hpp +0 -286
  81. data/ext/ruby-cbc/install/include/coin/CbcSimpleIntegerDynamicPseudoCost.hpp +0 -564
  82. data/ext/ruby-cbc/install/include/coin/CbcSimpleIntegerPseudoCost.hpp +0 -114
  83. data/ext/ruby-cbc/install/include/coin/CbcSolver.hpp +0 -447
  84. data/ext/ruby-cbc/install/include/coin/CbcStrategy.hpp +0 -258
  85. data/ext/ruby-cbc/install/include/coin/CbcSubProblem.hpp +0 -83
  86. data/ext/ruby-cbc/install/include/coin/CbcTree.hpp +0 -490
  87. data/ext/ruby-cbc/install/include/coin/CbcTreeLocal.hpp +0 -372
  88. data/ext/ruby-cbc/install/include/coin/Cbc_C_Interface.h +0 -381
  89. data/ext/ruby-cbc/install/include/coin/Cgl012cut.hpp +0 -464
  90. data/ext/ruby-cbc/install/include/coin/CglAllDifferent.hpp +0 -115
  91. data/ext/ruby-cbc/install/include/coin/CglClique.hpp +0 -308
  92. data/ext/ruby-cbc/install/include/coin/CglConfig.h +0 -19
  93. data/ext/ruby-cbc/install/include/coin/CglCutGenerator.hpp +0 -121
  94. data/ext/ruby-cbc/install/include/coin/CglDuplicateRow.hpp +0 -189
  95. data/ext/ruby-cbc/install/include/coin/CglFlowCover.hpp +0 -371
  96. data/ext/ruby-cbc/install/include/coin/CglGMI.hpp +0 -364
  97. data/ext/ruby-cbc/install/include/coin/CglGMIParam.hpp +0 -313
  98. data/ext/ruby-cbc/install/include/coin/CglGomory.hpp +0 -204
  99. data/ext/ruby-cbc/install/include/coin/CglKnapsackCover.hpp +0 -310
  100. data/ext/ruby-cbc/install/include/coin/CglLandP.hpp +0 -306
  101. data/ext/ruby-cbc/install/include/coin/CglLandPValidator.hpp +0 -130
  102. data/ext/ruby-cbc/install/include/coin/CglLiftAndProject.hpp +0 -104
  103. data/ext/ruby-cbc/install/include/coin/CglMessage.hpp +0 -50
  104. data/ext/ruby-cbc/install/include/coin/CglMixedIntegerRounding.hpp +0 -429
  105. data/ext/ruby-cbc/install/include/coin/CglMixedIntegerRounding2.hpp +0 -427
  106. data/ext/ruby-cbc/install/include/coin/CglOddHole.hpp +0 -160
  107. data/ext/ruby-cbc/install/include/coin/CglParam.hpp +0 -93
  108. data/ext/ruby-cbc/install/include/coin/CglPreProcess.hpp +0 -492
  109. data/ext/ruby-cbc/install/include/coin/CglProbing.hpp +0 -543
  110. data/ext/ruby-cbc/install/include/coin/CglRedSplit.hpp +0 -448
  111. data/ext/ruby-cbc/install/include/coin/CglRedSplit2.hpp +0 -494
  112. data/ext/ruby-cbc/install/include/coin/CglRedSplit2Param.hpp +0 -495
  113. data/ext/ruby-cbc/install/include/coin/CglRedSplitParam.hpp +0 -272
  114. data/ext/ruby-cbc/install/include/coin/CglResidualCapacity.hpp +0 -240
  115. data/ext/ruby-cbc/install/include/coin/CglSimpleRounding.hpp +0 -174
  116. data/ext/ruby-cbc/install/include/coin/CglStored.hpp +0 -125
  117. data/ext/ruby-cbc/install/include/coin/CglTreeInfo.hpp +0 -180
  118. data/ext/ruby-cbc/install/include/coin/CglTwomir.hpp +0 -565
  119. data/ext/ruby-cbc/install/include/coin/CglZeroHalf.hpp +0 -133
  120. data/ext/ruby-cbc/install/include/coin/ClpAmplObjective.hpp +0 -113
  121. data/ext/ruby-cbc/install/include/coin/ClpCholeskyBase.hpp +0 -294
  122. data/ext/ruby-cbc/install/include/coin/ClpCholeskyDense.hpp +0 -162
  123. data/ext/ruby-cbc/install/include/coin/ClpConfig.h +0 -17
  124. data/ext/ruby-cbc/install/include/coin/ClpConstraint.hpp +0 -125
  125. data/ext/ruby-cbc/install/include/coin/ClpConstraintAmpl.hpp +0 -108
  126. data/ext/ruby-cbc/install/include/coin/ClpConstraintLinear.hpp +0 -110
  127. data/ext/ruby-cbc/install/include/coin/ClpConstraintQuadratic.hpp +0 -119
  128. data/ext/ruby-cbc/install/include/coin/ClpDualRowDantzig.hpp +0 -71
  129. data/ext/ruby-cbc/install/include/coin/ClpDualRowPivot.hpp +0 -129
  130. data/ext/ruby-cbc/install/include/coin/ClpDualRowSteepest.hpp +0 -153
  131. data/ext/ruby-cbc/install/include/coin/ClpDummyMatrix.hpp +0 -183
  132. data/ext/ruby-cbc/install/include/coin/ClpDynamicExampleMatrix.hpp +0 -186
  133. data/ext/ruby-cbc/install/include/coin/ClpDynamicMatrix.hpp +0 -381
  134. data/ext/ruby-cbc/install/include/coin/ClpEventHandler.hpp +0 -187
  135. data/ext/ruby-cbc/install/include/coin/ClpFactorization.hpp +0 -432
  136. data/ext/ruby-cbc/install/include/coin/ClpGubDynamicMatrix.hpp +0 -247
  137. data/ext/ruby-cbc/install/include/coin/ClpGubMatrix.hpp +0 -358
  138. data/ext/ruby-cbc/install/include/coin/ClpInterior.hpp +0 -570
  139. data/ext/ruby-cbc/install/include/coin/ClpLinearObjective.hpp +0 -103
  140. data/ext/ruby-cbc/install/include/coin/ClpMatrixBase.hpp +0 -524
  141. data/ext/ruby-cbc/install/include/coin/ClpMessage.hpp +0 -131
  142. data/ext/ruby-cbc/install/include/coin/ClpModel.hpp +0 -1307
  143. data/ext/ruby-cbc/install/include/coin/ClpNetworkMatrix.hpp +0 -229
  144. data/ext/ruby-cbc/install/include/coin/ClpNode.hpp +0 -349
  145. data/ext/ruby-cbc/install/include/coin/ClpNonLinearCost.hpp +0 -401
  146. data/ext/ruby-cbc/install/include/coin/ClpObjective.hpp +0 -134
  147. data/ext/ruby-cbc/install/include/coin/ClpPackedMatrix.hpp +0 -638
  148. data/ext/ruby-cbc/install/include/coin/ClpParameters.hpp +0 -126
  149. data/ext/ruby-cbc/install/include/coin/ClpPdcoBase.hpp +0 -103
  150. data/ext/ruby-cbc/install/include/coin/ClpPlusMinusOneMatrix.hpp +0 -290
  151. data/ext/ruby-cbc/install/include/coin/ClpPresolve.hpp +0 -299
  152. data/ext/ruby-cbc/install/include/coin/ClpPrimalColumnDantzig.hpp +0 -72
  153. data/ext/ruby-cbc/install/include/coin/ClpPrimalColumnPivot.hpp +0 -155
  154. data/ext/ruby-cbc/install/include/coin/ClpPrimalColumnSteepest.hpp +0 -247
  155. data/ext/ruby-cbc/install/include/coin/ClpQuadraticObjective.hpp +0 -155
  156. data/ext/ruby-cbc/install/include/coin/ClpSimplex.hpp +0 -1797
  157. data/ext/ruby-cbc/install/include/coin/ClpSimplexDual.hpp +0 -300
  158. data/ext/ruby-cbc/install/include/coin/ClpSimplexNonlinear.hpp +0 -117
  159. data/ext/ruby-cbc/install/include/coin/ClpSimplexOther.hpp +0 -277
  160. data/ext/ruby-cbc/install/include/coin/ClpSimplexPrimal.hpp +0 -244
  161. data/ext/ruby-cbc/install/include/coin/ClpSolve.hpp +0 -446
  162. data/ext/ruby-cbc/install/include/coin/Clp_C_Interface.h +0 -525
  163. data/ext/ruby-cbc/install/include/coin/CoinAlloc.hpp +0 -176
  164. data/ext/ruby-cbc/install/include/coin/CoinBuild.hpp +0 -149
  165. data/ext/ruby-cbc/install/include/coin/CoinDenseFactorization.hpp +0 -419
  166. data/ext/ruby-cbc/install/include/coin/CoinDenseVector.hpp +0 -383
  167. data/ext/ruby-cbc/install/include/coin/CoinDistance.hpp +0 -48
  168. data/ext/ruby-cbc/install/include/coin/CoinError.hpp +0 -257
  169. data/ext/ruby-cbc/install/include/coin/CoinFactorization.hpp +0 -2044
  170. data/ext/ruby-cbc/install/include/coin/CoinFileIO.hpp +0 -166
  171. data/ext/ruby-cbc/install/include/coin/CoinFinite.hpp +0 -34
  172. data/ext/ruby-cbc/install/include/coin/CoinFloatEqual.hpp +0 -177
  173. data/ext/ruby-cbc/install/include/coin/CoinHelperFunctions.hpp +0 -1111
  174. data/ext/ruby-cbc/install/include/coin/CoinIndexedVector.hpp +0 -1164
  175. data/ext/ruby-cbc/install/include/coin/CoinLpIO.hpp +0 -805
  176. data/ext/ruby-cbc/install/include/coin/CoinMessage.hpp +0 -96
  177. data/ext/ruby-cbc/install/include/coin/CoinMessageHandler.hpp +0 -666
  178. data/ext/ruby-cbc/install/include/coin/CoinModel.hpp +0 -1054
  179. data/ext/ruby-cbc/install/include/coin/CoinModelUseful.hpp +0 -441
  180. data/ext/ruby-cbc/install/include/coin/CoinMpsIO.hpp +0 -1056
  181. data/ext/ruby-cbc/install/include/coin/CoinOslFactorization.hpp +0 -280
  182. data/ext/ruby-cbc/install/include/coin/CoinPackedMatrix.hpp +0 -947
  183. data/ext/ruby-cbc/install/include/coin/CoinPackedVector.hpp +0 -657
  184. data/ext/ruby-cbc/install/include/coin/CoinPackedVectorBase.hpp +0 -269
  185. data/ext/ruby-cbc/install/include/coin/CoinParam.hpp +0 -644
  186. data/ext/ruby-cbc/install/include/coin/CoinPragma.hpp +0 -26
  187. data/ext/ruby-cbc/install/include/coin/CoinPresolveDoubleton.hpp +0 -73
  188. data/ext/ruby-cbc/install/include/coin/CoinPresolveDual.hpp +0 -85
  189. data/ext/ruby-cbc/install/include/coin/CoinPresolveDupcol.hpp +0 -226
  190. data/ext/ruby-cbc/install/include/coin/CoinPresolveEmpty.hpp +0 -116
  191. data/ext/ruby-cbc/install/include/coin/CoinPresolveFixed.hpp +0 -181
  192. data/ext/ruby-cbc/install/include/coin/CoinPresolveForcing.hpp +0 -61
  193. data/ext/ruby-cbc/install/include/coin/CoinPresolveImpliedFree.hpp +0 -60
  194. data/ext/ruby-cbc/install/include/coin/CoinPresolveIsolated.hpp +0 -51
  195. data/ext/ruby-cbc/install/include/coin/CoinPresolveMatrix.hpp +0 -1842
  196. data/ext/ruby-cbc/install/include/coin/CoinPresolveMonitor.hpp +0 -105
  197. data/ext/ruby-cbc/install/include/coin/CoinPresolvePsdebug.hpp +0 -166
  198. data/ext/ruby-cbc/install/include/coin/CoinPresolveSingleton.hpp +0 -112
  199. data/ext/ruby-cbc/install/include/coin/CoinPresolveSubst.hpp +0 -101
  200. data/ext/ruby-cbc/install/include/coin/CoinPresolveTighten.hpp +0 -55
  201. data/ext/ruby-cbc/install/include/coin/CoinPresolveTripleton.hpp +0 -66
  202. data/ext/ruby-cbc/install/include/coin/CoinPresolveUseless.hpp +0 -63
  203. data/ext/ruby-cbc/install/include/coin/CoinPresolveZeros.hpp +0 -60
  204. data/ext/ruby-cbc/install/include/coin/CoinRational.hpp +0 -44
  205. data/ext/ruby-cbc/install/include/coin/CoinSearchTree.hpp +0 -465
  206. data/ext/ruby-cbc/install/include/coin/CoinShallowPackedVector.hpp +0 -148
  207. data/ext/ruby-cbc/install/include/coin/CoinSignal.hpp +0 -117
  208. data/ext/ruby-cbc/install/include/coin/CoinSimpFactorization.hpp +0 -431
  209. data/ext/ruby-cbc/install/include/coin/CoinSmartPtr.hpp +0 -528
  210. data/ext/ruby-cbc/install/include/coin/CoinSnapshot.hpp +0 -476
  211. data/ext/ruby-cbc/install/include/coin/CoinSort.hpp +0 -678
  212. data/ext/ruby-cbc/install/include/coin/CoinStructuredModel.hpp +0 -247
  213. data/ext/ruby-cbc/install/include/coin/CoinTime.hpp +0 -310
  214. data/ext/ruby-cbc/install/include/coin/CoinTypes.hpp +0 -64
  215. data/ext/ruby-cbc/install/include/coin/CoinUtility.hpp +0 -19
  216. data/ext/ruby-cbc/install/include/coin/CoinUtilsConfig.h +0 -34
  217. data/ext/ruby-cbc/install/include/coin/CoinWarmStart.hpp +0 -58
  218. data/ext/ruby-cbc/install/include/coin/CoinWarmStartBasis.hpp +0 -456
  219. data/ext/ruby-cbc/install/include/coin/CoinWarmStartDual.hpp +0 -166
  220. data/ext/ruby-cbc/install/include/coin/CoinWarmStartPrimalDual.hpp +0 -211
  221. data/ext/ruby-cbc/install/include/coin/CoinWarmStartVector.hpp +0 -488
  222. data/ext/ruby-cbc/install/include/coin/Coin_C_defines.h +0 -115
  223. data/ext/ruby-cbc/install/include/coin/Idiot.hpp +0 -298
  224. data/ext/ruby-cbc/install/include/coin/OsiAuxInfo.hpp +0 -206
  225. data/ext/ruby-cbc/install/include/coin/OsiBranchingObject.hpp +0 -1005
  226. data/ext/ruby-cbc/install/include/coin/OsiCbcSolverInterface.hpp +0 -764
  227. data/ext/ruby-cbc/install/include/coin/OsiChooseVariable.hpp +0 -534
  228. data/ext/ruby-cbc/install/include/coin/OsiClpSolverInterface.hpp +0 -1509
  229. data/ext/ruby-cbc/install/include/coin/OsiColCut.hpp +0 -324
  230. data/ext/ruby-cbc/install/include/coin/OsiCollections.hpp +0 -35
  231. data/ext/ruby-cbc/install/include/coin/OsiConfig.h +0 -19
  232. data/ext/ruby-cbc/install/include/coin/OsiCut.hpp +0 -245
  233. data/ext/ruby-cbc/install/include/coin/OsiCuts.hpp +0 -474
  234. data/ext/ruby-cbc/install/include/coin/OsiPresolve.hpp +0 -252
  235. data/ext/ruby-cbc/install/include/coin/OsiRowCut.hpp +0 -331
  236. data/ext/ruby-cbc/install/include/coin/OsiRowCutDebugger.hpp +0 -187
  237. data/ext/ruby-cbc/install/include/coin/OsiSolverBranch.hpp +0 -152
  238. data/ext/ruby-cbc/install/include/coin/OsiSolverInterface.hpp +0 -2143
  239. data/ext/ruby-cbc/install/include/coin/OsiSolverParameters.hpp +0 -142
  240. data/ext/ruby-cbc/install/include/coin/OsiUnitTests.hpp +0 -374
  241. data/ext/ruby-cbc/install/lib/libCbc.la +0 -35
  242. data/ext/ruby-cbc/install/lib/libCbc.so +0 -0
  243. data/ext/ruby-cbc/install/lib/libCbc.so.3 +0 -0
  244. data/ext/ruby-cbc/install/lib/libCbc.so.3.9.7 +0 -0
  245. data/ext/ruby-cbc/install/lib/libCbcSolver.la +0 -35
  246. data/ext/ruby-cbc/install/lib/libCbcSolver.so +0 -0
  247. data/ext/ruby-cbc/install/lib/libCbcSolver.so.3 +0 -0
  248. data/ext/ruby-cbc/install/lib/libCbcSolver.so.3.9.7 +0 -0
  249. data/ext/ruby-cbc/install/lib/libCgl.la +0 -35
  250. data/ext/ruby-cbc/install/lib/libCgl.so +0 -0
  251. data/ext/ruby-cbc/install/lib/libCgl.so.1 +0 -0
  252. data/ext/ruby-cbc/install/lib/libCgl.so.1.9.7 +0 -0
  253. data/ext/ruby-cbc/install/lib/libClp.la +0 -35
  254. data/ext/ruby-cbc/install/lib/libClp.so +0 -0
  255. data/ext/ruby-cbc/install/lib/libClp.so.1 +0 -0
  256. data/ext/ruby-cbc/install/lib/libClp.so.1.13.9 +0 -0
  257. data/ext/ruby-cbc/install/lib/libClpSolver.la +0 -35
  258. data/ext/ruby-cbc/install/lib/libClpSolver.so +0 -0
  259. data/ext/ruby-cbc/install/lib/libClpSolver.so.1 +0 -0
  260. data/ext/ruby-cbc/install/lib/libClpSolver.so.1.13.9 +0 -0
  261. data/ext/ruby-cbc/install/lib/libCoinUtils.la +0 -35
  262. data/ext/ruby-cbc/install/lib/libCoinUtils.so +0 -0
  263. data/ext/ruby-cbc/install/lib/libCoinUtils.so.3 +0 -0
  264. data/ext/ruby-cbc/install/lib/libCoinUtils.so.3.10.11 +0 -0
  265. data/ext/ruby-cbc/install/lib/libOsi.la +0 -35
  266. data/ext/ruby-cbc/install/lib/libOsi.so +0 -0
  267. data/ext/ruby-cbc/install/lib/libOsi.so.1 +0 -0
  268. data/ext/ruby-cbc/install/lib/libOsi.so.1.12.6 +0 -0
  269. data/ext/ruby-cbc/install/lib/libOsiCbc.la +0 -35
  270. data/ext/ruby-cbc/install/lib/libOsiCbc.so +0 -0
  271. data/ext/ruby-cbc/install/lib/libOsiCbc.so.3 +0 -0
  272. data/ext/ruby-cbc/install/lib/libOsiCbc.so.3.9.7 +0 -0
  273. data/ext/ruby-cbc/install/lib/libOsiClp.la +0 -35
  274. data/ext/ruby-cbc/install/lib/libOsiClp.so +0 -0
  275. data/ext/ruby-cbc/install/lib/libOsiClp.so.1 +0 -0
  276. data/ext/ruby-cbc/install/lib/libOsiClp.so.1.13.9 +0 -0
  277. data/ext/ruby-cbc/install/lib/libOsiCommonTests.la +0 -35
  278. data/ext/ruby-cbc/install/lib/libOsiCommonTests.so +0 -0
  279. data/ext/ruby-cbc/install/lib/libOsiCommonTests.so.1 +0 -0
  280. data/ext/ruby-cbc/install/lib/libOsiCommonTests.so.1.12.6 +0 -0
  281. data/ext/ruby-cbc/install/lib/pkgconfig/cbc.pc +0 -12
  282. data/ext/ruby-cbc/install/lib/pkgconfig/cgl.pc +0 -12
  283. data/ext/ruby-cbc/install/lib/pkgconfig/clp.pc +0 -12
  284. data/ext/ruby-cbc/install/lib/pkgconfig/coindatamiplib3.pc +0 -9
  285. data/ext/ruby-cbc/install/lib/pkgconfig/coindatasample.pc +0 -9
  286. data/ext/ruby-cbc/install/lib/pkgconfig/coinutils.pc +0 -12
  287. data/ext/ruby-cbc/install/lib/pkgconfig/osi-cbc.pc +0 -12
  288. data/ext/ruby-cbc/install/lib/pkgconfig/osi-clp.pc +0 -12
  289. data/ext/ruby-cbc/install/lib/pkgconfig/osi-unittests.pc +0 -12
  290. data/ext/ruby-cbc/install/lib/pkgconfig/osi.pc +0 -12
@@ -1,55 +0,0 @@
1
- /* $Id: CoinPresolveTighten.hpp 1498 2011-11-02 15:25:35Z mjs $ */
2
- // Copyright (C) 2002, 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 CoinPresolveTighten_H
7
- #define CoinPresolveTighten_H
8
-
9
- #include "CoinPresolveMatrix.hpp"
10
-
11
- // This action has no separate class;
12
- // instead, it decides which columns can be made fixed
13
- // and calls make_fixed_action::presolve.
14
- const CoinPresolveAction *tighten_zero_cost(CoinPresolveMatrix *prob,
15
- const CoinPresolveAction *next);
16
-
17
- #define DO_TIGHTEN 30
18
-
19
- class do_tighten_action : public CoinPresolveAction {
20
- do_tighten_action();
21
- do_tighten_action(const do_tighten_action& rhs);
22
- do_tighten_action& operator=(const do_tighten_action& rhs);
23
-
24
- struct action {
25
- int *rows;
26
- double *lbound;
27
- double *ubound;
28
- int col;
29
- int nrows;
30
- int direction; // just for assertions
31
- };
32
-
33
- const int nactions_;
34
- const action *const actions_;
35
-
36
- do_tighten_action(int nactions,
37
- const action *actions,
38
- const CoinPresolveAction *next) :
39
- CoinPresolveAction(next),
40
- nactions_(nactions), actions_(actions) {}
41
-
42
- public:
43
- const char *name() const;
44
-
45
- static const CoinPresolveAction *presolve(CoinPresolveMatrix *prob,
46
- const CoinPresolveAction *next);
47
-
48
- void postsolve(CoinPostsolveMatrix *prob) const;
49
-
50
- virtual ~do_tighten_action();
51
-
52
- };
53
- #endif
54
-
55
-
@@ -1,66 +0,0 @@
1
- /* $Id: CoinPresolveTripleton.hpp 1498 2011-11-02 15:25:35Z mjs $ */
2
- // Copyright (C) 2003, 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 CoinPresolveTripleton_H
7
- #define CoinPresolveTripleton_H
8
- #define TRIPLETON 11
9
- /** We are only going to do this if it does not increase number of elements?.
10
- It could be generalized to more than three but it seems unlikely it would
11
- help.
12
-
13
- As it is adapted from doubleton icoly is one dropped.
14
- */
15
- class tripleton_action : public CoinPresolveAction {
16
- public:
17
- struct action {
18
- int icolx;
19
- int icolz;
20
- int row;
21
-
22
- int icoly;
23
- double cloy;
24
- double cupy;
25
- double costy;
26
- double clox;
27
- double cupx;
28
- double costx;
29
-
30
- double rlo;
31
- double rup;
32
-
33
- double coeffx;
34
- double coeffy;
35
- double coeffz;
36
-
37
- double *colel;
38
-
39
- int ncolx;
40
- int ncoly;
41
- };
42
-
43
- const int nactions_;
44
- const action *const actions_;
45
-
46
- private:
47
- tripleton_action(int nactions,
48
- const action *actions,
49
- const CoinPresolveAction *next) :
50
- CoinPresolveAction(next),
51
- nactions_(nactions), actions_(actions)
52
- {}
53
-
54
- public:
55
- const char *name() const { return ("tripleton_action"); }
56
-
57
- static const CoinPresolveAction *presolve(CoinPresolveMatrix *,
58
- const CoinPresolveAction *next);
59
-
60
- void postsolve(CoinPostsolveMatrix *prob) const;
61
-
62
- virtual ~tripleton_action();
63
- };
64
- #endif
65
-
66
-
@@ -1,63 +0,0 @@
1
- /* $Id: CoinPresolveUseless.hpp 1566 2012-11-29 19:33:56Z lou $ */
2
- // Copyright (C) 2002, 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 CoinPresolveUseless_H
7
- #define CoinPresolveUseless_H
8
- #define USELESS 20
9
-
10
- class useless_constraint_action : public CoinPresolveAction {
11
- struct action {
12
- double rlo;
13
- double rup;
14
- const int *rowcols;
15
- const double *rowels;
16
- int row;
17
- int ninrow;
18
- };
19
-
20
- const int nactions_;
21
- const action *const actions_;
22
-
23
- useless_constraint_action(int nactions,
24
- const action *actions,
25
- const CoinPresolveAction *next);
26
-
27
- public:
28
- const char *name() const;
29
-
30
- // These rows are asserted to be useless,
31
- // that is, given a solution the row activity
32
- // must be in range.
33
- static const CoinPresolveAction *presolve(CoinPresolveMatrix * prob,
34
- const int *useless_rows,
35
- int nuseless_rows,
36
- const CoinPresolveAction *next);
37
-
38
- void postsolve(CoinPostsolveMatrix *prob) const;
39
-
40
- virtual ~useless_constraint_action();
41
-
42
- };
43
-
44
- /*! \relates useless_constraint_action
45
- \brief Scan constraints looking for useless constraints
46
-
47
- A front end to identify useless constraints and hand them to
48
- useless_constraint_action::presolve() for processing.
49
-
50
- In a bit more detail, the routine implements a greedy algorithm that
51
- identifies a set of necessary constraints. A constraint is necessary if it
52
- implies a tighter bound on a variable than the original column bound. These
53
- tighter column bounds are then used to calculate row activity and identify
54
- constraints that are useless given the presence of the necessary
55
- constraints.
56
- */
57
-
58
- const CoinPresolveAction *testRedundant(CoinPresolveMatrix *prob,
59
- const CoinPresolveAction *next) ;
60
-
61
-
62
-
63
- #endif
@@ -1,60 +0,0 @@
1
- /* $Id: CoinPresolveZeros.hpp 1498 2011-11-02 15:25:35Z mjs $ */
2
- // Copyright (C) 2002, 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 CoinPresolveZeros_H
7
- #define CoinPresolveZeros_H
8
-
9
- /*! \file
10
-
11
- Drop/reintroduce explicit zeros.
12
- */
13
-
14
- #define DROP_ZERO 8
15
-
16
- /*! \brief Tracking information for an explicit zero coefficient
17
-
18
- \todo Why isn't this a nested class in drop_zero_coefficients_action?
19
- That would match the structure of other presolve classes.
20
- */
21
-
22
- struct dropped_zero {
23
- int row;
24
- int col;
25
- };
26
-
27
- /*! \brief Removal of explicit zeros
28
-
29
- The presolve action for this class removes explicit zeros from the constraint
30
- matrix. The postsolve action puts them back.
31
- */
32
- class drop_zero_coefficients_action : public CoinPresolveAction {
33
-
34
- const int nzeros_;
35
- const dropped_zero *const zeros_;
36
-
37
- drop_zero_coefficients_action(int nzeros,
38
- const dropped_zero *zeros,
39
- const CoinPresolveAction *next) :
40
- CoinPresolveAction(next),
41
- nzeros_(nzeros), zeros_(zeros)
42
- {}
43
-
44
- public:
45
- const char *name() const { return ("drop_zero_coefficients_action"); }
46
-
47
- static const CoinPresolveAction *presolve(CoinPresolveMatrix *prob,
48
- int *checkcols,
49
- int ncheckcols,
50
- const CoinPresolveAction *next);
51
-
52
- void postsolve(CoinPostsolveMatrix *prob) const;
53
-
54
- virtual ~drop_zero_coefficients_action() { deleteAction(zeros_,dropped_zero*); }
55
- };
56
-
57
- const CoinPresolveAction *drop_zero_coefficients(CoinPresolveMatrix *prob,
58
- const CoinPresolveAction *next);
59
-
60
- #endif
@@ -1,44 +0,0 @@
1
- // Authors: Matthew Saltzman and Ted Ralphs
2
- // Copyright 2015, Matthew Saltzman and Ted Ralphs
3
- // Licensed under the Eclipse Public License 1.0
4
-
5
- #ifndef CoinRational_H
6
- #define CoinRational_H
7
-
8
- #include <cmath>
9
-
10
- //Small class for rational numbers
11
- class CoinRational
12
- {
13
-
14
- public :
15
- long getDenominator() { return denominator_; }
16
- long getNumerator() { return numerator_; }
17
-
18
- CoinRational():
19
- numerator_(0),
20
- denominator_(1)
21
- {};
22
-
23
- CoinRational(long n, long d):
24
- numerator_(n),
25
- denominator_(d)
26
- {};
27
-
28
- CoinRational(double val, double maxdelta, long maxdnom)
29
- {
30
- if (!nearestRational_(val, maxdelta, maxdnom)){
31
- numerator_ = 0;
32
- denominator_ = 1;
33
- }
34
- };
35
-
36
- private :
37
-
38
- long numerator_;
39
- long denominator_;
40
-
41
- bool nearestRational_(double val, double maxdelta, long maxdnom);
42
- };
43
-
44
- #endif
@@ -1,465 +0,0 @@
1
- /* $Id: CoinSearchTree.hpp 1824 2015-04-04 16:27:28Z tkr $ */
2
- // Copyright (C) 2006, 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 CoinSearchTree_H
7
- #define CoinSearchTree_H
8
-
9
- #include <vector>
10
- #include <algorithm>
11
- #include <cmath>
12
- #include <string>
13
-
14
- #include "CoinFinite.hpp"
15
- #include "CoinHelperFunctions.hpp"
16
-
17
- // #define DEBUG_PRINT
18
-
19
- //#############################################################################
20
-
21
- class BitVector128 {
22
- friend bool operator<(const BitVector128& b0, const BitVector128& b1);
23
- private:
24
- unsigned int bits_[4];
25
- public:
26
- BitVector128();
27
- BitVector128(unsigned int bits[4]);
28
- ~BitVector128() {}
29
- void set(unsigned int bits[4]);
30
- void setBit(int i);
31
- void clearBit(int i);
32
- std::string str() const;
33
- };
34
-
35
- bool operator<(const BitVector128& b0, const BitVector128& b1);
36
-
37
- //#############################################################################
38
-
39
- /** A class from which the real tree nodes should be derived from. Some of the
40
- data that undoubtedly exist in the real tree node is replicated here for
41
- fast access. This class is used in the various comparison functions. */
42
- class CoinTreeNode {
43
- protected:
44
- CoinTreeNode() :
45
- depth_(-1),
46
- fractionality_(-1),
47
- quality_(-COIN_DBL_MAX),
48
- true_lower_bound_(-COIN_DBL_MAX),
49
- preferred_() {}
50
- CoinTreeNode(int d,
51
- int f = -1,
52
- double q = -COIN_DBL_MAX,
53
- double tlb = -COIN_DBL_MAX,
54
- BitVector128 p = BitVector128()) :
55
- depth_(d),
56
- fractionality_(f),
57
- quality_(q),
58
- true_lower_bound_(tlb),
59
- preferred_(p) {}
60
- CoinTreeNode(const CoinTreeNode& x) :
61
- depth_(x.depth_),
62
- fractionality_(x.fractionality_),
63
- quality_(x.quality_),
64
- true_lower_bound_(x.true_lower_bound_),
65
- preferred_(x.preferred_) {}
66
- CoinTreeNode& operator=(const CoinTreeNode& x) {
67
- if (this != &x) {
68
- depth_ = x.depth_;
69
- fractionality_ = x.fractionality_;
70
- quality_ = x.quality_;
71
- true_lower_bound_ = x.true_lower_bound_;
72
- preferred_ = x.preferred_;
73
- }
74
- return *this;
75
- }
76
- private:
77
- /// The depth of the node in the tree
78
- int depth_;
79
- /** A measure of fractionality, e.g., the number of unsatisfied
80
- integrality requirements */
81
- int fractionality_;
82
- /** Some quality for the node. For normal branch-and-cut problems the LP
83
- relaxation value will do just fine. It is probably an OK approximation
84
- even if column generation is done. */
85
- double quality_;
86
- /** A true lower bound on the node. May be -infinity. For normal
87
- branch-and-cut problems the LP relaxation value is OK. It is different
88
- when column generation is done. */
89
- double true_lower_bound_;
90
- /** */
91
- BitVector128 preferred_;
92
- public:
93
- virtual ~CoinTreeNode() {}
94
-
95
- inline int getDepth() const { return depth_; }
96
- inline int getFractionality() const { return fractionality_; }
97
- inline double getQuality() const { return quality_; }
98
- inline double getTrueLB() const { return true_lower_bound_; }
99
- inline BitVector128 getPreferred() const { return preferred_; }
100
-
101
- inline void setDepth(int d) { depth_ = d; }
102
- inline void setFractionality(int f) { fractionality_ = f; }
103
- inline void setQuality(double q) { quality_ = q; }
104
- inline void setTrueLB(double tlb) { true_lower_bound_ = tlb; }
105
- inline void setPreferred(BitVector128 p) { preferred_ = p; }
106
- };
107
-
108
- //==============================================================================
109
-
110
- class CoinTreeSiblings {
111
- private:
112
- CoinTreeSiblings();
113
- CoinTreeSiblings& operator=(const CoinTreeSiblings&);
114
- private:
115
- int current_;
116
- int numSiblings_;
117
- CoinTreeNode** siblings_;
118
- public:
119
- CoinTreeSiblings(const int n, CoinTreeNode** nodes) :
120
- current_(0), numSiblings_(n), siblings_(new CoinTreeNode*[n])
121
- {
122
- CoinDisjointCopyN(nodes, n, siblings_);
123
- }
124
- CoinTreeSiblings(const CoinTreeSiblings& s) :
125
- current_(s.current_),
126
- numSiblings_(s.numSiblings_),
127
- siblings_(new CoinTreeNode*[s.numSiblings_])
128
- {
129
- CoinDisjointCopyN(s.siblings_, s.numSiblings_, siblings_);
130
- }
131
- ~CoinTreeSiblings() { delete[] siblings_; }
132
- inline CoinTreeNode* currentNode() const { return siblings_[current_]; }
133
- /** returns false if cannot be advanced */
134
- inline bool advanceNode() { return ++current_ != numSiblings_; }
135
- inline int toProcess() const { return numSiblings_ - current_; }
136
- inline int size() const { return numSiblings_; }
137
- inline void printPref() const {
138
- for (int i = 0; i < numSiblings_; ++i) {
139
- std::string pref = siblings_[i]->getPreferred().str();
140
- printf("prefs of sibligs: sibling[%i]: %s\n", i, pref.c_str());
141
- }
142
- }
143
- };
144
-
145
- //#############################################################################
146
-
147
- /** Function objects to compare search tree nodes. The comparison function
148
- must return true if the first argument is "better" than the second one,
149
- i.e., it should be processed first. */
150
- /*@{*/
151
- /** Depth First Search. */
152
- struct CoinSearchTreeComparePreferred {
153
- static inline const char* name() { return "CoinSearchTreeComparePreferred"; }
154
- inline bool operator()(const CoinTreeSiblings* x,
155
- const CoinTreeSiblings* y) const {
156
- register const CoinTreeNode* xNode = x->currentNode();
157
- register const CoinTreeNode* yNode = y->currentNode();
158
- const BitVector128 xPref = xNode->getPreferred();
159
- const BitVector128 yPref = yNode->getPreferred();
160
- bool retval = true;
161
- if (xPref < yPref) {
162
- retval = true;
163
- } else if (yPref < xPref) {
164
- retval = false;
165
- } else {
166
- retval = xNode->getQuality() < yNode->getQuality();
167
- }
168
- #ifdef DEBUG_PRINT
169
- printf("Comparing xpref (%s) and ypref (%s) : %s\n",
170
- xpref.str().c_str(), ypref.str().c_str(), retval ? "T" : "F");
171
- #endif
172
- return retval;
173
- }
174
- };
175
-
176
- //-----------------------------------------------------------------------------
177
- /** Depth First Search. */
178
- struct CoinSearchTreeCompareDepth {
179
- static inline const char* name() { return "CoinSearchTreeCompareDepth"; }
180
- inline bool operator()(const CoinTreeSiblings* x,
181
- const CoinTreeSiblings* y) const {
182
- #if 1
183
- return x->currentNode()->getDepth() >= y->currentNode()->getDepth();
184
- #else
185
- if(x->currentNode()->getDepth() > y->currentNode()->getDepth())
186
- return 1;
187
- if(x->currentNode()->getDepth() == y->currentNode()->getDepth() &&
188
- x->currentNode()->getQuality() <= y->currentNode()->getQuality())
189
- return 1;
190
- return 0;
191
- #endif
192
- }
193
- };
194
-
195
- //-----------------------------------------------------------------------------
196
- /* Breadth First Search */
197
- struct CoinSearchTreeCompareBreadth {
198
- static inline const char* name() { return "CoinSearchTreeCompareBreadth"; }
199
- inline bool operator()(const CoinTreeSiblings* x,
200
- const CoinTreeSiblings* y) const {
201
- return x->currentNode()->getDepth() < y->currentNode()->getDepth();
202
- }
203
- };
204
-
205
- //-----------------------------------------------------------------------------
206
- /** Best first search */
207
- struct CoinSearchTreeCompareBest {
208
- static inline const char* name() { return "CoinSearchTreeCompareBest"; }
209
- inline bool operator()(const CoinTreeSiblings* x,
210
- const CoinTreeSiblings* y) const {
211
- return x->currentNode()->getQuality() < y->currentNode()->getQuality();
212
- }
213
- };
214
-
215
- //#############################################################################
216
-
217
- class CoinSearchTreeBase
218
- {
219
- private:
220
- CoinSearchTreeBase(const CoinSearchTreeBase&);
221
- CoinSearchTreeBase& operator=(const CoinSearchTreeBase&);
222
-
223
- protected:
224
- std::vector<CoinTreeSiblings*> candidateList_;
225
- int numInserted_;
226
- int size_;
227
-
228
- protected:
229
- CoinSearchTreeBase() : candidateList_(), numInserted_(0), size_(0) {}
230
-
231
- virtual void realpop() = 0;
232
- virtual void realpush(CoinTreeSiblings* s) = 0;
233
- virtual void fixTop() = 0;
234
-
235
- public:
236
- virtual ~CoinSearchTreeBase() {}
237
- virtual const char* compName() const = 0;
238
-
239
- inline const std::vector<CoinTreeSiblings*>& getCandidates() const {
240
- return candidateList_;
241
- }
242
- inline bool empty() const { return candidateList_.empty(); }
243
- inline int size() const { return size_; }
244
- inline int numInserted() const { return numInserted_; }
245
- inline CoinTreeNode* top() const {
246
- if (size_ == 0 || candidateList_.size() == 0)
247
- return NULL;
248
- #ifdef DEBUG_PRINT
249
- char output[44];
250
- output[43] = 0;
251
- candidateList_.front()->currentNode()->getPreferred().print(output);
252
- printf("top's pref: %s\n", output);
253
- #endif
254
- return candidateList_.front()->currentNode();
255
- }
256
- /** pop will advance the \c next pointer among the siblings on the top and
257
- then moves the top to its correct position. #realpop is the method
258
- that actually removes the element from the heap */
259
- inline void pop() {
260
- CoinTreeSiblings* s = candidateList_.front();
261
- if (!s->advanceNode()) {
262
- realpop();
263
- delete s;
264
- } else {
265
- fixTop();
266
- }
267
- --size_;
268
- }
269
- inline void push(int numNodes, CoinTreeNode** nodes,
270
- const bool incrInserted = true) {
271
- CoinTreeSiblings* s = new CoinTreeSiblings(numNodes, nodes);
272
- realpush(s);
273
- if (incrInserted) {
274
- numInserted_ += numNodes;
275
- }
276
- size_ += numNodes;
277
- }
278
- inline void push(const CoinTreeSiblings& sib,
279
- const bool incrInserted = true) {
280
- CoinTreeSiblings* s = new CoinTreeSiblings(sib);
281
- #ifdef DEBUG_PRINT
282
- s->printPref();
283
- #endif
284
- realpush(s);
285
- if (incrInserted) {
286
- numInserted_ += sib.toProcess();
287
- }
288
- size_ += sib.toProcess();
289
- }
290
- };
291
-
292
- //#############################################################################
293
-
294
- // #define CAN_TRUST_STL_HEAP
295
- #ifdef CAN_TRUST_STL_HEAP
296
-
297
- template <class Comp>
298
- class CoinSearchTree : public CoinSearchTreeBase
299
- {
300
- private:
301
- Comp comp_;
302
- protected:
303
- virtual void realpop() {
304
- candidateList_.pop_back();
305
- }
306
- virtual void fixTop() {
307
- CoinTreeSiblings* s = top();
308
- realpop();
309
- push(s, false);
310
- }
311
- virtual void realpush(CoinTreeSiblings* s) {
312
- nodes_.push_back(s);
313
- std::push_heap(candidateList_.begin(), candidateList_.end(), comp_);
314
- }
315
- public:
316
- CoinSearchTree() : CoinSearchTreeBase(), comp_() {}
317
- CoinSearchTree(const CoinSearchTreeBase& t) :
318
- CoinSearchTreeBase(), comp_() {
319
- candidateList_ = t.getCandidates();
320
- std::make_heap(candidateList_.begin(), candidateList_.end(), comp_);
321
- numInserted_ = t.numInserted_;
322
- size_ = t.size_;
323
- }
324
- ~CoinSearchTree() {}
325
- const char* compName() const { return Comp::name(); }
326
- };
327
-
328
- #else
329
-
330
- template <class Comp>
331
- class CoinSearchTree : public CoinSearchTreeBase
332
- {
333
- private:
334
- Comp comp_;
335
-
336
- protected:
337
- virtual void realpop() {
338
- candidateList_[0] = candidateList_.back();
339
- candidateList_.pop_back();
340
- fixTop();
341
- }
342
- /** After changing data in the top node, fix the heap */
343
- virtual void fixTop() {
344
- const size_t size = candidateList_.size();
345
- if (size > 1) {
346
- CoinTreeSiblings** candidates = &candidateList_[0];
347
- CoinTreeSiblings* s = candidates[0];
348
- --candidates;
349
- size_t pos = 1;
350
- size_t ch;
351
- for (ch = 2; ch < size; pos = ch, ch *= 2) {
352
- if (comp_(candidates[ch+1], candidates[ch]))
353
- ++ch;
354
- if (comp_(s, candidates[ch]))
355
- break;
356
- candidates[pos] = candidates[ch];
357
- }
358
- if (ch == size) {
359
- if (comp_(candidates[ch], s)) {
360
- candidates[pos] = candidates[ch];
361
- pos = ch;
362
- }
363
- }
364
- candidates[pos] = s;
365
- }
366
- }
367
- virtual void realpush(CoinTreeSiblings* s) {
368
- candidateList_.push_back(s);
369
- CoinTreeSiblings** candidates = &candidateList_[0];
370
- --candidates;
371
- size_t pos = candidateList_.size();
372
- size_t ch;
373
- for (ch = pos/2; ch != 0; pos = ch, ch /= 2) {
374
- if (comp_(candidates[ch], s))
375
- break;
376
- candidates[pos] = candidates[ch];
377
- }
378
- candidates[pos] = s;
379
- }
380
-
381
- public:
382
- CoinSearchTree() : CoinSearchTreeBase(), comp_() {}
383
- CoinSearchTree(const CoinSearchTreeBase& t) :
384
- CoinSearchTreeBase(), comp_() {
385
- candidateList_ = t.getCandidates();
386
- std::sort(candidateList_.begin(), candidateList_.end(), comp_);
387
- numInserted_ = t.numInserted();
388
- size_ = t.size();
389
- }
390
- virtual ~CoinSearchTree() {}
391
- const char* compName() const { return Comp::name(); }
392
- };
393
-
394
- #endif
395
-
396
- //#############################################################################
397
-
398
- enum CoinNodeAction {
399
- CoinAddNodeToCandidates,
400
- CoinTestNodeForDiving,
401
- CoinDiveIntoNode
402
- };
403
-
404
- class CoinSearchTreeManager
405
- {
406
- private:
407
- CoinSearchTreeManager(const CoinSearchTreeManager&);
408
- CoinSearchTreeManager& operator=(const CoinSearchTreeManager&);
409
- private:
410
- CoinSearchTreeBase* candidates_;
411
- int numSolution;
412
- /** Whether there is an upper bound or not. The upper bound may have come
413
- as input, not necessarily from a solution */
414
- bool hasUB_;
415
-
416
- /** variable used to test whether we need to reevaluate search strategy */
417
- bool recentlyReevaluatedSearchStrategy_;
418
-
419
- public:
420
- CoinSearchTreeManager() :
421
- candidates_(NULL),
422
- numSolution(0),
423
- recentlyReevaluatedSearchStrategy_(true)
424
- {}
425
- virtual ~CoinSearchTreeManager() {
426
- delete candidates_;
427
- }
428
-
429
- inline void setTree(CoinSearchTreeBase* t) {
430
- delete candidates_;
431
- candidates_ = t;
432
- }
433
- inline CoinSearchTreeBase* getTree() const {
434
- return candidates_;
435
- }
436
-
437
- inline bool empty() const { return candidates_->empty(); }
438
- inline size_t size() const { return candidates_->size(); }
439
- inline size_t numInserted() const { return candidates_->numInserted(); }
440
- inline CoinTreeNode* top() const { return candidates_->top(); }
441
- inline void pop() { candidates_->pop(); }
442
- inline void push(CoinTreeNode* node, const bool incrInserted = true) {
443
- candidates_->push(1, &node, incrInserted);
444
- }
445
- inline void push(const CoinTreeSiblings& s, const bool incrInserted=true) {
446
- candidates_->push(s, incrInserted);
447
- }
448
- inline void push(const int n, CoinTreeNode** nodes,
449
- const bool incrInserted = true) {
450
- candidates_->push(n, nodes, incrInserted);
451
- }
452
-
453
- inline CoinTreeNode* bestQualityCandidate() const {
454
- return candidates_->top();
455
- }
456
- inline double bestQuality() const {
457
- return candidates_->top()->getQuality();
458
- }
459
- void newSolution(double solValue);
460
- void reevaluateSearchStrategy();
461
- };
462
-
463
- //#############################################################################
464
-
465
- #endif