ruby-cbc 0.1.9 → 0.2.1

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 (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,269 +0,0 @@
1
- /* $Id: CoinPackedVectorBase.hpp 1416 2011-04-17 09:57:29Z stefan $ */
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 CoinPackedVectorBase_H
7
- #define CoinPackedVectorBase_H
8
-
9
- #include <set>
10
- #include <map>
11
- #include "CoinPragma.hpp"
12
- #include "CoinError.hpp"
13
-
14
- class CoinPackedVector;
15
-
16
- /** Abstract base class for various sparse vectors.
17
-
18
- Since this class is abstract, no object of this type can be created. The
19
- sole purpose of this class is to provide access to a <em>constant</em>
20
- packed vector. All members of this class are const methods, they can't
21
- change the object. */
22
-
23
- class CoinPackedVectorBase {
24
-
25
- public:
26
- /**@name Virtual methods that the derived classes must provide */
27
- //@{
28
- /// Get length of indices and elements vectors
29
- virtual int getNumElements() const = 0;
30
- /// Get indices of elements
31
- virtual const int * getIndices() const = 0;
32
- /// Get element values
33
- virtual const double * getElements() const = 0;
34
- //@}
35
-
36
- /**@name Methods related to whether duplicate-index checking is performed.
37
-
38
- If the checking for duplicate indices is turned off, then
39
- some CoinPackedVector methods may not work correctly if there
40
- are duplicate indices.
41
- Turning off the checking for duplicate indices may result in
42
- better run time performance.
43
- */
44
- //@{
45
- /** \brief Set to the argument value whether to test for duplicate indices
46
- in the vector whenever they can occur.
47
-
48
- Calling this method with \p test set to true will trigger an immediate
49
- check for duplicate indices.
50
- */
51
- void setTestForDuplicateIndex(bool test) const;
52
- /** \brief Set to the argument value whether to test for duplicate indices
53
- in the vector whenever they can occur BUT we know that right
54
- now the vector has no duplicate indices.
55
-
56
- Calling this method with \p test set to true will <em>not</em> trigger
57
- an immediate check for duplicate indices; instead, it's assumed that
58
- the result of the test will be true.
59
- */
60
- void setTestForDuplicateIndexWhenTrue(bool test) const;
61
- /** Returns true if the vector should be tested for duplicate indices when
62
- they can occur. */
63
- bool testForDuplicateIndex() const { return testForDuplicateIndex_; }
64
- /// Just sets test stuff false without a try etc
65
- inline void setTestsOff() const
66
- { testForDuplicateIndex_=false; testedDuplicateIndex_=false;}
67
- //@}
68
-
69
- /**@name Methods for getting info on the packed vector as a full vector */
70
- //@{
71
- /** Get the vector as a dense vector. The argument specifies how long this
72
- dense vector is. <br>
73
- <strong>NOTE</strong>: The user needs to <code>delete[]</code> this
74
- pointer after it's not needed anymore.
75
- */
76
- double * denseVector(int denseSize) const;
77
- /** Access the i'th element of the full storage vector.
78
- If the i'th is not stored, then zero is returned. The initial use of
79
- this method has some computational and storage overhead associated with
80
- it.<br>
81
- <strong>NOTE</strong>: This is <em>very</em> expensive. It is probably
82
- much better to use <code>denseVector()</code>.
83
- */
84
- double operator[](int i) const;
85
- //@}
86
-
87
- /**@name Index methods */
88
- //@{
89
- /// Get value of maximum index
90
- int getMaxIndex() const;
91
- /// Get value of minimum index
92
- int getMinIndex() const;
93
-
94
- /// Throw an exception if there are duplicate indices
95
- void duplicateIndex(const char* methodName = NULL,
96
- const char * className = NULL) const;
97
-
98
- /** Return true if the i'th element of the full storage vector exists in
99
- the packed storage vector.*/
100
- bool isExistingIndex(int i) const;
101
-
102
- /** Return the position of the i'th element of the full storage vector.
103
- If index does not exist then -1 is returned */
104
- int findIndex(int i) const;
105
-
106
- //@}
107
-
108
- /**@name Comparison operators on two packed vectors */
109
- //@{
110
- /** Equal. Returns true if vectors have same length and corresponding
111
- element of each vector is equal. */
112
- bool operator==(const CoinPackedVectorBase & rhs) const;
113
- /// Not equal
114
- bool operator!=(const CoinPackedVectorBase & rhs) const;
115
-
116
- #if 0
117
- // LL: This should be implemented eventually. It is useful to have.
118
- /** Lexicographic comparisons of two packed vectors. Returns
119
- negative/0/positive depending on whether \c this is
120
- smaller/equal.greater than \c rhs */
121
- int lexCompare(const CoinPackedVectorBase& rhs);
122
- #endif
123
-
124
- /** This method establishes an ordering on packed vectors. It is complete
125
- ordering, but not the same as lexicographic ordering. However, it is
126
- quick and dirty to compute and thus it is useful to keep packed vectors
127
- in a heap when all we care is to quickly check whether a particular
128
- vector is already in the heap or not. Returns negative/0/positive
129
- depending on whether \c this is smaller/equal.greater than \c rhs. */
130
- int compare(const CoinPackedVectorBase& rhs) const;
131
-
132
- /** equivalent - If shallow packed vector A & B are equivalent, then they
133
- are still equivalent no matter how they are sorted.
134
- In this method the FloatEqual function operator can be specified. The
135
- default equivalence test is that the entries are relatively equal.<br>
136
- <strong>NOTE</strong>: This is a relatively expensive method as it
137
- sorts the two shallow packed vectors.
138
- */
139
- template <class FloatEqual> bool
140
- isEquivalent(const CoinPackedVectorBase& rhs, const FloatEqual& eq) const
141
- {
142
- if (getNumElements() != rhs.getNumElements())
143
- return false;
144
-
145
- duplicateIndex("equivalent", "CoinPackedVector");
146
- rhs.duplicateIndex("equivalent", "CoinPackedVector");
147
-
148
- std::map<int,double> mv;
149
- const int * inds = getIndices();
150
- const double * elems = getElements();
151
- int i;
152
- for ( i = getNumElements() - 1; i >= 0; --i) {
153
- mv.insert(std::make_pair(inds[i], elems[i]));
154
- }
155
-
156
- std::map<int,double> mvRhs;
157
- inds = rhs.getIndices();
158
- elems = rhs.getElements();
159
- for ( i = getNumElements() - 1; i >= 0; --i) {
160
- mvRhs.insert(std::make_pair(inds[i], elems[i]));
161
- }
162
-
163
- std::map<int,double>::const_iterator mvI = mv.begin();
164
- std::map<int,double>::const_iterator mvIlast = mv.end();
165
- std::map<int,double>::const_iterator mvIrhs = mvRhs.begin();
166
- while (mvI != mvIlast) {
167
- if (mvI->first != mvIrhs->first || ! eq(mvI->second, mvIrhs->second))
168
- return false;
169
- ++mvI;
170
- ++mvIrhs;
171
- }
172
- return true;
173
- }
174
-
175
- bool isEquivalent(const CoinPackedVectorBase& rhs) const;
176
- //@}
177
-
178
-
179
- /**@name Arithmetic operators. */
180
- //@{
181
- /// Create the dot product with a full vector
182
- double dotProduct(const double* dense) const;
183
-
184
- /// Return the 1-norm of the vector
185
- double oneNorm() const;
186
-
187
- /// Return the square of the 2-norm of the vector
188
- double normSquare() const;
189
-
190
- /// Return the 2-norm of the vector
191
- double twoNorm() const;
192
-
193
- /// Return the infinity-norm of the vector
194
- double infNorm() const;
195
-
196
- /// Sum elements of vector.
197
- double sum() const;
198
- //@}
199
-
200
- protected:
201
-
202
- /**@name Constructors, destructor
203
- <strong>NOTE</strong>: All constructors are protected. There's no need
204
- to expose them, after all, this is an abstract class. */
205
- //@{
206
- /** Default constructor. */
207
- CoinPackedVectorBase();
208
-
209
- public:
210
- /** Destructor */
211
- virtual ~CoinPackedVectorBase();
212
- //@}
213
-
214
- private:
215
- /**@name Disabled methods */
216
- //@{
217
- /** The copy constructor. <br>
218
- This must be at least protected, but we make it private. The reason is
219
- that when, say, a shallow packed vector is created, first the
220
- underlying class, it this one is constructed. However, at that point we
221
- don't know how much of the data members of this class we need to copy
222
- over. Therefore the copy constructor is not used. */
223
- CoinPackedVectorBase(const CoinPackedVectorBase&);
224
- /** This class provides <em>const</em> access to packed vectors, so there's
225
- no need to provide an assignment operator. */
226
- CoinPackedVectorBase& operator=(const CoinPackedVectorBase&);
227
- //@}
228
-
229
- protected:
230
-
231
- /**@name Protected methods */
232
- //@{
233
- /// Find Maximum and Minimum Indices
234
- void findMaxMinIndices() const;
235
-
236
- /// Return indexSetPtr_ (create it if necessary).
237
- std::set<int> * indexSet(const char* methodName = NULL,
238
- const char * className = NULL) const;
239
-
240
- /// Delete the indexSet
241
- void clearIndexSet() const;
242
- void clearBase() const;
243
- void copyMaxMinIndex(const CoinPackedVectorBase & x) const {
244
- maxIndex_ = x.maxIndex_;
245
- minIndex_ = x.minIndex_;
246
- }
247
- //@}
248
-
249
- private:
250
- /**@name Protected member data */
251
- //@{
252
- /// Contains max index value or -infinity
253
- mutable int maxIndex_;
254
- /// Contains minimum index value or infinity
255
- mutable int minIndex_;
256
- /** Store the indices in a set. This set is only created if it is needed.
257
- Its primary use is testing for duplicate indices.
258
- */
259
- mutable std::set<int> * indexSetPtr_;
260
- /** True if the vector should be tested for duplicate indices when they can
261
- occur. */
262
- mutable bool testForDuplicateIndex_;
263
- /** True if the vector has already been tested for duplicate indices. Most
264
- of the operations in CoinPackedVector preserves this flag. */
265
- mutable bool testedDuplicateIndex_;
266
- //@}
267
- };
268
-
269
- #endif
@@ -1,644 +0,0 @@
1
- /* $Id: CoinParam.hpp 1493 2011-11-01 16:56:07Z tkr $ */
2
- #ifndef CoinParam_H
3
- #define CoinParam_H
4
-
5
- /*
6
- Copyright (C) 2002, International Business Machines
7
- Corporation and others. All Rights Reserved.
8
-
9
- This code is licensed under the terms of the Eclipse Public License (EPL).
10
- */
11
-
12
- /*! \file CoinParam.hpp
13
- \brief Declaration of a class for command line parameters.
14
- */
15
-
16
- #include <vector>
17
- #include <string>
18
- #include <cstdio>
19
-
20
- /*! \class CoinParam
21
- \brief A base class for `keyword value' command line parameters.
22
-
23
- The underlying paradigm is that a parameter specifies an action to be
24
- performed on a target object. The base class provides two function
25
- pointers, a `push' function and a `pull' function. By convention, a push
26
- function will set some value in the target object or perform some action
27
- using the target object. A `pull' function will retrieve some value from
28
- the target object. This is only a convention, however; CoinParam and
29
- associated utilities make no use of these functions and have no hardcoded
30
- notion of how they should be used.
31
-
32
- The action to be performed, and the target object, will be specific to a
33
- particular application. It is expected that users will derive
34
- application-specific parameter classes from this base class. A derived
35
- class will typically add fields and methods to set/get a code for the
36
- action to be performed (often, an enum class) and the target object (often,
37
- a pointer or reference).
38
-
39
- Facilities provided by the base class and associated utility routines
40
- include:
41
- <ul>
42
- <li> Support for common parameter types with numeric, string, or
43
- keyword values.
44
- <li> Support for short and long help messages.
45
- <li> Pointers to `push' and `pull' functions as described above.
46
- <li> Command line parsing and keyword matching.
47
- </ul>
48
- All utility routines are declared in the #CoinParamUtils namespace.
49
-
50
- The base class recognises five types of parameters: actions (which require
51
- no value); numeric parameters with integer or real (double) values; keyword
52
- parameters, where the value is one of a defined set of value-keywords;
53
- and string parameters (where the value is a string).
54
- The base class supports the definition of a valid range, a default value,
55
- and short and long help messages for a parameter.
56
-
57
- As defined by the #CoinParamFunc typedef, push and pull functions
58
- should take a single parameter, a pointer to a CoinParam. Typically this
59
- object will actually be a derived class as described above, and the
60
- implementation function will have access to all capabilities of CoinParam and
61
- of the derived class.
62
-
63
- When specified as command line parameters, the expected syntax is `-keyword
64
- value' or `-keyword=value'. You can also use the Gnu double-dash style,
65
- `--keyword'. Spaces around the `=' will \e not work.
66
-
67
- The keyword (name) for a parameter can be defined with an `!' to mark the
68
- minimal match point. For example, allow!ableGap will be considered matched
69
- by the strings `allow', `allowa', `allowab', \e etc. Similarly, the
70
- value-keyword strings for keyword parameters can be defined with `!' to
71
- mark the minimal match point. Matching of keywords and value-keywords is
72
- \e not case sensitive.
73
- */
74
-
75
- class CoinParam
76
- {
77
-
78
- public:
79
-
80
- /*! \name Subtypes */
81
- //@{
82
-
83
- /*! \brief Enumeration for the types of parameters supported by CoinParam
84
-
85
- CoinParam provides support for several types of parameters:
86
- <ul>
87
- <li> Action parameters, which require no value.
88
- <li> Integer and double numeric parameters, with upper and lower bounds.
89
- <li> String parameters that take an arbitrary string value.
90
- <li> Keyword parameters that take a defined set of string (value-keyword)
91
- values. Value-keywords are associated with integers in the order in
92
- which they are added, starting from zero.
93
- </ul>
94
- */
95
- typedef enum { coinParamInvalid = 0,
96
- coinParamAct, coinParamInt, coinParamDbl,
97
- coinParamStr, coinParamKwd } CoinParamType ;
98
-
99
- /*! \brief Type declaration for push and pull functions.
100
-
101
- By convention, a return code of 0 indicates execution without error, >0
102
- indicates nonfatal error, and <0 indicates fatal error. This is only
103
- convention, however; the base class makes no use of the push and pull
104
- functions and has no hardcoded interpretation of the return code.
105
- */
106
- typedef int (*CoinParamFunc)(CoinParam *param) ;
107
-
108
- //@}
109
-
110
- /*! \name Constructors and Destructors
111
-
112
- Be careful how you specify parameters for the constructors! Some compilers
113
- are entirely too willing to convert almost anything to bool.
114
- */
115
- //@{
116
-
117
- /*! \brief Default constructor */
118
-
119
- CoinParam() ;
120
-
121
- /*! \brief Constructor for a parameter with a double value
122
-
123
- The default value is 0.0. Be careful to clearly indicate that \p lower and
124
- \p upper are real (double) values to distinguish this constructor from the
125
- constructor for an integer parameter.
126
- */
127
- CoinParam(std::string name, std::string help,
128
- double lower, double upper, double dflt = 0.0,
129
- bool display = true) ;
130
-
131
- /*! \brief Constructor for a parameter with an integer value
132
-
133
- The default value is 0.
134
- */
135
- CoinParam(std::string name, std::string help,
136
- int lower, int upper, int dflt = 0,
137
- bool display = true) ;
138
-
139
- /*! \brief Constructor for a parameter with keyword values
140
-
141
- The string supplied as \p firstValue becomes the first value-keyword.
142
- Additional value-keywords can be added using appendKwd(). It's necessary
143
- to specify both the first value-keyword (\p firstValue) and the default
144
- value-keyword index (\p dflt) in order to distinguish this constructor
145
- from the constructors for string and action parameters.
146
-
147
- Value-keywords are associated with an integer, starting with zero and
148
- increasing as each keyword is added. The value-keyword given as \p
149
- firstValue will be associated with the integer zero. The integer supplied
150
- for \p dflt can be any value, as long as it will be valid once all
151
- value-keywords have been added.
152
- */
153
- CoinParam(std::string name, std::string help,
154
- std::string firstValue, int dflt, bool display = true) ;
155
-
156
- /*! \brief Constructor for a string parameter
157
-
158
- For some compilers, the default value (\p dflt) must be specified
159
- explicitly with type std::string to distinguish the constructor for a
160
- string parameter from the constructor for an action parameter. For
161
- example, use std::string("default") instead of simply "default", or use a
162
- variable of type std::string.
163
- */
164
- CoinParam(std::string name, std::string help,
165
- std::string dflt, bool display = true) ;
166
-
167
- /*! \brief Constructor for an action parameter */
168
-
169
- CoinParam(std::string name, std::string help,
170
- bool display = true) ;
171
-
172
- /*! \brief Copy constructor */
173
-
174
- CoinParam(const CoinParam &orig) ;
175
-
176
- /*! \brief Clone */
177
-
178
- virtual CoinParam *clone() ;
179
-
180
- /*! \brief Assignment */
181
-
182
- CoinParam &operator=(const CoinParam &rhs) ;
183
-
184
- /*! \brief Destructor */
185
-
186
- virtual ~CoinParam() ;
187
-
188
- //@}
189
-
190
- /*! \name Methods to query and manipulate the value(s) of a parameter */
191
- //@{
192
-
193
- /*! \brief Add an additional value-keyword to a keyword parameter */
194
-
195
- void appendKwd(std::string kwd) ;
196
-
197
- /*! \brief Return the integer associated with the specified value-keyword
198
-
199
- Returns -1 if no value-keywords match the specified string.
200
- */
201
- int kwdIndex(std::string kwd) const ;
202
-
203
- /*! \brief Return the value-keyword that is the current value of the
204
- keyword parameter
205
- */
206
- std::string kwdVal() const ;
207
-
208
- /*! \brief Set the value of the keyword parameter using the integer
209
- associated with a value-keyword.
210
-
211
- If \p printIt is true, the corresponding value-keyword string will be
212
- echoed to std::cout.
213
- */
214
- void setKwdVal(int value, bool printIt = false) ;
215
-
216
- /*! \brief Set the value of the keyword parameter using a value-keyword
217
- string.
218
-
219
- The given string will be tested against the set of value-keywords for
220
- the parameter using the shortest match rules.
221
- */
222
- void setKwdVal(const std::string value ) ;
223
-
224
- /*! \brief Prints the set of value-keywords defined for this keyword
225
- parameter
226
- */
227
- void printKwds() const ;
228
-
229
-
230
- /*! \brief Set the value of a string parameter */
231
-
232
- void setStrVal(std::string value) ;
233
-
234
- /*! \brief Get the value of a string parameter */
235
-
236
- std::string strVal() const ;
237
-
238
-
239
- /*! \brief Set the value of a double parameter */
240
-
241
- void setDblVal(double value) ;
242
-
243
- /*! \brief Get the value of a double parameter */
244
-
245
- double dblVal() const ;
246
-
247
-
248
- /*! \brief Set the value of a integer parameter */
249
-
250
- void setIntVal(int value) ;
251
-
252
- /*! \brief Get the value of a integer parameter */
253
-
254
- int intVal() const ;
255
-
256
-
257
- /*! \brief Add a short help string to a parameter */
258
-
259
- inline void setShortHelp(const std::string help) { shortHelp_ = help ; }
260
-
261
- /*! \brief Retrieve the short help string */
262
-
263
- inline std::string shortHelp() const { return (shortHelp_) ; }
264
-
265
- /*! \brief Add a long help message to a parameter
266
-
267
- See printLongHelp() for a description of how messages are broken into
268
- lines.
269
- */
270
- inline void setLongHelp(const std::string help) { longHelp_ = help ; }
271
-
272
- /*! \brief Retrieve the long help message */
273
-
274
- inline std::string longHelp() const { return (longHelp_) ; }
275
-
276
- /*! \brief Print long help
277
-
278
- Prints the long help string, plus the valid range and/or keywords if
279
- appropriate. The routine makes a best effort to break the message into
280
- lines appropriate for an 80-character line. Explicit line breaks in the
281
- message will be observed. The short help string will be used if
282
- long help is not available.
283
- */
284
- void printLongHelp() const ;
285
-
286
- //@}
287
-
288
- /*! \name Methods to query and manipulate a parameter object */
289
- //@{
290
-
291
- /*! \brief Return the type of the parameter */
292
-
293
- inline CoinParamType type() const { return (type_) ; }
294
-
295
- /*! \brief Set the type of the parameter */
296
-
297
- inline void setType(CoinParamType type) { type_ = type ; }
298
-
299
- /*! \brief Return the parameter keyword (name) string */
300
-
301
- inline std::string name() const { return (name_) ; }
302
-
303
- /*! \brief Set the parameter keyword (name) string */
304
-
305
- inline void setName(std::string name) { name_ = name ; processName() ; }
306
-
307
- /*! \brief Check if the specified string matches the parameter keyword (name)
308
- string
309
-
310
- Returns 1 if the string matches and meets the minimum match length,
311
- 2 if the string matches but doesn't meet the minimum match length,
312
- and 0 if the string doesn't match. Matches are \e not case-sensitive.
313
- */
314
- int matches (std::string input) const ;
315
-
316
- /*! \brief Return the parameter keyword (name) string formatted to show
317
- the minimum match length
318
-
319
- For example, if the parameter name was defined as allow!ableGap, the
320
- string returned by matchName would be allow(ableGap).
321
- */
322
- std::string matchName() const ;
323
-
324
- /*! \brief Set visibility of parameter
325
-
326
- Intended to control whether the parameter is shown when a list of
327
- parameters is processed. Used by CoinParamUtils::printHelp when printing
328
- help messages for a list of parameters.
329
- */
330
- inline void setDisplay(bool display) { display_ = display ; }
331
-
332
- /*! \brief Get visibility of parameter */
333
-
334
- inline bool display() const { return (display_) ; }
335
-
336
- /*! \brief Get push function */
337
-
338
- inline CoinParamFunc pushFunc() { return (pushFunc_) ; }
339
-
340
- /*! \brief Set push function */
341
-
342
- inline void setPushFunc(CoinParamFunc func) { pushFunc_ = func ; }
343
-
344
- /*! \brief Get pull function */
345
-
346
- inline CoinParamFunc pullFunc() { return (pullFunc_) ; }
347
-
348
- /*! \brief Set pull function */
349
-
350
- inline void setPullFunc(CoinParamFunc func) { pullFunc_ = func ; }
351
-
352
- //@}
353
-
354
- private:
355
-
356
- /*! \name Private methods */
357
- //@{
358
-
359
- /*! Process a name for efficient matching */
360
- void processName() ;
361
-
362
- //@}
363
-
364
- /*! \name Private parameter data */
365
- //@{
366
- /// Parameter type (see #CoinParamType)
367
- CoinParamType type_ ;
368
-
369
- /// Parameter name
370
- std::string name_ ;
371
-
372
- /// Length of parameter name
373
- size_t lengthName_ ;
374
-
375
- /*! \brief Minimum length required to declare a match for the parameter
376
- name.
377
- */
378
- size_t lengthMatch_ ;
379
-
380
- /// Lower bound on value for a double parameter
381
- double lowerDblValue_ ;
382
-
383
- /// Upper bound on value for a double parameter
384
- double upperDblValue_ ;
385
-
386
- /// Double parameter - current value
387
- double dblValue_ ;
388
-
389
- /// Lower bound on value for an integer parameter
390
- int lowerIntValue_ ;
391
-
392
- /// Upper bound on value for an integer parameter
393
- int upperIntValue_ ;
394
-
395
- /// Integer parameter - current value
396
- int intValue_ ;
397
-
398
- /// String parameter - current value
399
- std::string strValue_ ;
400
-
401
- /// Set of valid value-keywords for a keyword parameter
402
- std::vector<std::string> definedKwds_ ;
403
-
404
- /*! \brief Current value for a keyword parameter (index into #definedKwds_)
405
- */
406
- int currentKwd_ ;
407
-
408
- /// Push function
409
- CoinParamFunc pushFunc_ ;
410
-
411
- /// Pull function
412
- CoinParamFunc pullFunc_ ;
413
-
414
- /// Short help
415
- std::string shortHelp_ ;
416
-
417
- /// Long help
418
- std::string longHelp_ ;
419
-
420
- /// Display when processing lists of parameters?
421
- bool display_ ;
422
- //@}
423
-
424
- } ;
425
-
426
- /*! \relatesalso CoinParam
427
- \brief A type for a parameter vector.
428
- */
429
- typedef std::vector<CoinParam*> CoinParamVec ;
430
-
431
- /*! \relatesalso CoinParam
432
- \brief A stream output function for a CoinParam object.
433
- */
434
- std::ostream &operator<< (std::ostream &s, const CoinParam &param) ;
435
-
436
- /*
437
- Bring in the utility functions for parameter handling (CbcParamUtils).
438
- */
439
-
440
- /*! \brief Utility functions for processing CoinParam parameters.
441
-
442
- The functions in CoinParamUtils support command line or interactive
443
- parameter processing and a help facility. Consult the `Related Functions'
444
- section of the CoinParam class documentation for individual function
445
- documentation.
446
- */
447
- namespace CoinParamUtils {
448
- /*! \relatesalso CoinParam
449
- \brief Take command input from the file specified by src.
450
-
451
- Use stdin for \p src to specify interactive prompting for commands.
452
- */
453
- void setInputSrc(FILE *src) ;
454
-
455
- /*! \relatesalso CoinParam
456
- \brief Returns true if command line parameters are being processed.
457
- */
458
- bool isCommandLine() ;
459
-
460
- /*! \relatesalso CoinParam
461
- \brief Returns true if parameters are being obtained from stdin.
462
- */
463
- bool isInteractive() ;
464
-
465
- /*! \relatesalso CoinParam
466
- \brief Attempt to read a string from the input.
467
-
468
- \p argc and \p argv are used only if isCommandLine() would return true.
469
- If \p valid is supplied, it will be set to 0 if a string is parsed
470
- without error, 2 if no field is present.
471
- */
472
- std::string getStringField(int argc, const char *argv[], int *valid) ;
473
-
474
- /*! \relatesalso CoinParam
475
- \brief Attempt to read an integer from the input.
476
-
477
- \p argc and \p argv are used only if isCommandLine() would return true.
478
- If \p valid is supplied, it will be set to 0 if an integer is parsed
479
- without error, 1 if there's a parse error, and 2 if no field is present.
480
- */
481
- int getIntField(int argc, const char *argv[], int *valid) ;
482
-
483
- /*! \relatesalso CoinParam
484
- \brief Attempt to read a real (double) from the input.
485
-
486
- \p argc and \p argv are used only if isCommandLine() would return true.
487
- If \p valid is supplied, it will be set to 0 if a real number is parsed
488
- without error, 1 if there's a parse error, and 2 if no field is present.
489
- */
490
- double getDoubleField(int argc, const char *argv[], int *valid) ;
491
-
492
- /*! \relatesalso CoinParam
493
- \brief Scan a parameter vector for parameters whose keyword (name) string
494
- matches \p name using minimal match rules.
495
-
496
- \p matchNdx is set to the index of the last parameter that meets the
497
- minimal match criteria (but note there should be at most one matching
498
- parameter if the parameter vector is properly configured). \p shortCnt
499
- is set to the number of short matches (should be zero for a properly
500
- configured parameter vector if a minimal match is found). The return
501
- value is the number of matches satisfying the minimal match requirement
502
- (should be 0 or 1 in a properly configured vector).
503
- */
504
- int matchParam(const CoinParamVec &paramVec, std::string name,
505
- int &matchNdx, int &shortCnt) ;
506
-
507
- /*! \relatesalso CoinParam
508
- \brief Get the next command keyword (name)
509
-
510
- To be precise, return the next field from the current command input
511
- source, after a bit of processing. In command line mode (isCommandLine()
512
- returns true) the next field will normally be of the form `-keyword' or
513
- `--keyword' (\e i.e., a parameter keyword), and the string returned would
514
- be `keyword'. In interactive mode (isInteractive() returns true), the
515
- user will be prompted if necessary. It is assumed that the user knows
516
- not to use the `-' or `--' prefixes unless specifying parameters on the
517
- command line.
518
-
519
- There are a number of special cases if we're in command line mode. The
520
- order of processing of the raw string goes like this:
521
- <ul>
522
- <li> A stand-alone `-' is forced to `stdin'.
523
- <li> A stand-alone '--' is returned as a word; interpretation is up to
524
- the client.
525
- <li> A prefix of '-' or '--' is stripped from the string.
526
- </ul>
527
- If the result is the string `stdin', command processing shifts to
528
- interactive mode and the user is immediately prompted for a new command.
529
-
530
- Whatever results from the above sequence is returned to the user as the
531
- return value of the function. An empty string indicates end of input.
532
-
533
- \p prompt will be used only if it's necessary to prompt the user in
534
- interactive mode.
535
- */
536
-
537
- std::string getCommand(int argc, const char *argv[],
538
- const std::string prompt, std::string *pfx = 0) ;
539
-
540
- /*! \relatesalso CoinParam
541
- \brief Look up the command keyword (name) in the parameter vector.
542
- Print help if requested.
543
-
544
- In the most straightforward use, \p name is a string without `?', and the
545
- value returned is the index in \p paramVec of the single parameter that
546
- matched \p name. One or more '?' characters at the end of \p name is a
547
- query for information. The routine prints short (one '?') or long (more
548
- than one '?') help messages for a query. Help is also printed in the case
549
- where the name is ambiguous (some of the matches did not meet the minimal
550
- match length requirement).
551
-
552
- Note that multiple matches meeting the minimal match requirement is a
553
- configuration error. The mimimal match length for the parameters
554
- involved is too short.
555
-
556
- If provided as parameters, on return
557
- <ul>
558
- <li> \p matchCnt will be set to the number of matches meeting the
559
- minimal match requirement
560
- <li> \p shortCnt will be set to the number of matches that did not
561
- meet the miminal match requirement
562
- <li> \p queryCnt will be set to the number of '?' characters at the
563
- end of the name
564
- </ul>
565
-
566
- The return values are:
567
- <ul>
568
- <li> >0: index in \p paramVec of the single unique match for \p name
569
- <li> -1: a query was detected (one or more '?' characters at the end
570
- of \p name
571
- <li> -2: one or more short matches, not a query
572
- <li> -3: no matches, not a query
573
- <li> -4: multiple matches meeting the minimal match requirement
574
- (configuration error)
575
- </ul>
576
- */
577
- int lookupParam(std::string name, CoinParamVec &paramVec,
578
- int *matchCnt = 0, int *shortCnt = 0, int *queryCnt = 0) ;
579
-
580
- /*! \relatesalso CoinParam
581
- \brief Utility to print a long message as filled lines of text
582
-
583
- The routine makes a best effort to break lines without exceeding the
584
- standard 80 character line length. Explicit newlines in \p msg will
585
- be obeyed.
586
- */
587
- void printIt(const char *msg) ;
588
-
589
- /*! \relatesalso CoinParam
590
- \brief Utility routine to print help given a short match or explicit
591
- request for help.
592
-
593
- The two really are related, in that a query (a string that ends with
594
- one or more `?' characters) will often result in a short match. The
595
- routine expects that \p name matches a single parameter, and does not
596
- look for multiple matches.
597
-
598
- If called with \p matchNdx < 0, the routine will look up \p name in \p
599
- paramVec and print the full name from the parameter. If called with \p
600
- matchNdx > 0, it just prints the name from the specified parameter. If
601
- the name is a query, short (one '?') or long (more than one '?') help
602
- is printed.
603
-
604
- */ void shortOrHelpOne(CoinParamVec &paramVec,int matchNdx, std::string
605
- name, int numQuery) ;
606
-
607
- /*! \relatesalso CoinParam
608
- \brief Utility routine to print help given multiple matches.
609
-
610
- If the name is not a query, or asks for short help (\e i.e., contains
611
- zero or one '?' characters), the list of matching names is printed. If
612
- the name asks for long help (contains two or more '?' characters),
613
- short help is printed for each matching name.
614
- */
615
- void shortOrHelpMany(CoinParamVec &paramVec,
616
- std::string name, int numQuery) ;
617
-
618
- /*! \relatesalso CoinParam
619
- \brief Print a generic `how to use the command interface' help message.
620
-
621
- The message is hard coded to match the behaviour of the parsing utilities.
622
- */
623
- void printGenericHelp() ;
624
-
625
- /*! \relatesalso CoinParam
626
- \brief Utility routine to print help messages for one or more
627
- parameters.
628
-
629
- Intended as a utility to implement explicit `help' commands. Help will be
630
- printed for all parameters in \p paramVec from \p firstParam to \p
631
- lastParam, inclusive. If \p shortHelp is true, short help messages will
632
- be printed. If \p longHelp is true, long help messages are printed. \p
633
- shortHelp overrules \p longHelp. If neither is true, only command
634
- keywords are printed. \p prefix is printed before each line; it's an
635
- imperfect attempt at indentation.
636
- */
637
- void printHelp(CoinParamVec &paramVec, int firstParam, int lastParam,
638
- std::string prefix,
639
- bool shortHelp, bool longHelp, bool hidden) ;
640
- }
641
-
642
-
643
- #endif /* CoinParam_H */
644
-