ruby-cbc 0.1.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (303) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +9 -0
  3. data/.rspec +2 -0
  4. data/.travis.yml +4 -0
  5. data/Gemfile +4 -0
  6. data/README.md +203 -0
  7. data/Rakefile +40 -0
  8. data/bin/console +14 -0
  9. data/bin/setup +7 -0
  10. data/ext/ruby-cbc/cbc.i +15 -0
  11. data/ext/ruby-cbc/cbc_wrap.c +4618 -0
  12. data/ext/ruby-cbc/extconf.rb +60 -0
  13. data/ext/ruby-cbc/install/bin/cbc +0 -0
  14. data/ext/ruby-cbc/install/bin/clp +0 -0
  15. data/ext/ruby-cbc/install/include/coin/CbcBranchActual.hpp +24 -0
  16. data/ext/ruby-cbc/install/include/coin/CbcBranchAllDifferent.hpp +62 -0
  17. data/ext/ruby-cbc/install/include/coin/CbcBranchBase.hpp +78 -0
  18. data/ext/ruby-cbc/install/include/coin/CbcBranchCut.hpp +183 -0
  19. data/ext/ruby-cbc/install/include/coin/CbcBranchDecision.hpp +129 -0
  20. data/ext/ruby-cbc/install/include/coin/CbcBranchDefaultDecision.hpp +100 -0
  21. data/ext/ruby-cbc/install/include/coin/CbcBranchDynamic.hpp +206 -0
  22. data/ext/ruby-cbc/install/include/coin/CbcBranchLotsize.hpp +242 -0
  23. data/ext/ruby-cbc/install/include/coin/CbcBranchToFixLots.hpp +94 -0
  24. data/ext/ruby-cbc/install/include/coin/CbcBranchingObject.hpp +236 -0
  25. data/ext/ruby-cbc/install/include/coin/CbcClique.hpp +303 -0
  26. data/ext/ruby-cbc/install/include/coin/CbcCompare.hpp +39 -0
  27. data/ext/ruby-cbc/install/include/coin/CbcCompareActual.hpp +14 -0
  28. data/ext/ruby-cbc/install/include/coin/CbcCompareBase.hpp +142 -0
  29. data/ext/ruby-cbc/install/include/coin/CbcCompareDefault.hpp +120 -0
  30. data/ext/ruby-cbc/install/include/coin/CbcCompareDepth.hpp +47 -0
  31. data/ext/ruby-cbc/install/include/coin/CbcCompareEstimate.hpp +48 -0
  32. data/ext/ruby-cbc/install/include/coin/CbcCompareObjective.hpp +49 -0
  33. data/ext/ruby-cbc/install/include/coin/CbcConfig.h +14 -0
  34. data/ext/ruby-cbc/install/include/coin/CbcConsequence.hpp +49 -0
  35. data/ext/ruby-cbc/install/include/coin/CbcCountRowCut.hpp +168 -0
  36. data/ext/ruby-cbc/install/include/coin/CbcCutGenerator.hpp +482 -0
  37. data/ext/ruby-cbc/install/include/coin/CbcCutModifier.hpp +57 -0
  38. data/ext/ruby-cbc/install/include/coin/CbcCutSubsetModifier.hpp +66 -0
  39. data/ext/ruby-cbc/install/include/coin/CbcDummyBranchingObject.hpp +83 -0
  40. data/ext/ruby-cbc/install/include/coin/CbcEventHandler.hpp +245 -0
  41. data/ext/ruby-cbc/install/include/coin/CbcFathom.hpp +137 -0
  42. data/ext/ruby-cbc/install/include/coin/CbcFathomDynamicProgramming.hpp +169 -0
  43. data/ext/ruby-cbc/install/include/coin/CbcFeasibilityBase.hpp +56 -0
  44. data/ext/ruby-cbc/install/include/coin/CbcFixVariable.hpp +67 -0
  45. data/ext/ruby-cbc/install/include/coin/CbcFollowOn.hpp +207 -0
  46. data/ext/ruby-cbc/install/include/coin/CbcFullNodeInfo.hpp +161 -0
  47. data/ext/ruby-cbc/install/include/coin/CbcGeneral.hpp +60 -0
  48. data/ext/ruby-cbc/install/include/coin/CbcGeneralDepth.hpp +279 -0
  49. data/ext/ruby-cbc/install/include/coin/CbcHeuristic.hpp +682 -0
  50. data/ext/ruby-cbc/install/include/coin/CbcHeuristicDINS.hpp +96 -0
  51. data/ext/ruby-cbc/install/include/coin/CbcHeuristicDW.hpp +309 -0
  52. data/ext/ruby-cbc/install/include/coin/CbcHeuristicDive.hpp +192 -0
  53. data/ext/ruby-cbc/install/include/coin/CbcHeuristicDiveCoefficient.hpp +52 -0
  54. data/ext/ruby-cbc/install/include/coin/CbcHeuristicDiveFractional.hpp +52 -0
  55. data/ext/ruby-cbc/install/include/coin/CbcHeuristicDiveGuided.hpp +55 -0
  56. data/ext/ruby-cbc/install/include/coin/CbcHeuristicDiveLineSearch.hpp +52 -0
  57. data/ext/ruby-cbc/install/include/coin/CbcHeuristicDivePseudoCost.hpp +60 -0
  58. data/ext/ruby-cbc/install/include/coin/CbcHeuristicDiveVectorLength.hpp +52 -0
  59. data/ext/ruby-cbc/install/include/coin/CbcHeuristicFPump.hpp +340 -0
  60. data/ext/ruby-cbc/install/include/coin/CbcHeuristicGreedy.hpp +280 -0
  61. data/ext/ruby-cbc/install/include/coin/CbcHeuristicLocal.hpp +271 -0
  62. data/ext/ruby-cbc/install/include/coin/CbcHeuristicPivotAndFix.hpp +58 -0
  63. data/ext/ruby-cbc/install/include/coin/CbcHeuristicRENS.hpp +77 -0
  64. data/ext/ruby-cbc/install/include/coin/CbcHeuristicRINS.hpp +102 -0
  65. data/ext/ruby-cbc/install/include/coin/CbcHeuristicRandRound.hpp +58 -0
  66. data/ext/ruby-cbc/install/include/coin/CbcHeuristicVND.hpp +94 -0
  67. data/ext/ruby-cbc/install/include/coin/CbcLinked.hpp +1406 -0
  68. data/ext/ruby-cbc/install/include/coin/CbcMessage.hpp +94 -0
  69. data/ext/ruby-cbc/install/include/coin/CbcMipStartIO.hpp +26 -0
  70. data/ext/ruby-cbc/install/include/coin/CbcModel.hpp +2952 -0
  71. data/ext/ruby-cbc/install/include/coin/CbcNWay.hpp +166 -0
  72. data/ext/ruby-cbc/install/include/coin/CbcNode.hpp +351 -0
  73. data/ext/ruby-cbc/install/include/coin/CbcNodeInfo.hpp +349 -0
  74. data/ext/ruby-cbc/install/include/coin/CbcObject.hpp +272 -0
  75. data/ext/ruby-cbc/install/include/coin/CbcObjectUpdateData.hpp +64 -0
  76. data/ext/ruby-cbc/install/include/coin/CbcOrClpParam.cpp +4134 -0
  77. data/ext/ruby-cbc/install/include/coin/CbcOrClpParam.hpp +532 -0
  78. data/ext/ruby-cbc/install/include/coin/CbcParam.hpp +324 -0
  79. data/ext/ruby-cbc/install/include/coin/CbcPartialNodeInfo.hpp +110 -0
  80. data/ext/ruby-cbc/install/include/coin/CbcSOS.hpp +279 -0
  81. data/ext/ruby-cbc/install/include/coin/CbcSimpleInteger.hpp +286 -0
  82. data/ext/ruby-cbc/install/include/coin/CbcSimpleIntegerDynamicPseudoCost.hpp +564 -0
  83. data/ext/ruby-cbc/install/include/coin/CbcSimpleIntegerPseudoCost.hpp +114 -0
  84. data/ext/ruby-cbc/install/include/coin/CbcSolver.hpp +447 -0
  85. data/ext/ruby-cbc/install/include/coin/CbcStrategy.hpp +258 -0
  86. data/ext/ruby-cbc/install/include/coin/CbcSubProblem.hpp +83 -0
  87. data/ext/ruby-cbc/install/include/coin/CbcTree.hpp +490 -0
  88. data/ext/ruby-cbc/install/include/coin/CbcTreeLocal.hpp +372 -0
  89. data/ext/ruby-cbc/install/include/coin/Cbc_C_Interface.h +381 -0
  90. data/ext/ruby-cbc/install/include/coin/Cgl012cut.hpp +464 -0
  91. data/ext/ruby-cbc/install/include/coin/CglAllDifferent.hpp +115 -0
  92. data/ext/ruby-cbc/install/include/coin/CglClique.hpp +308 -0
  93. data/ext/ruby-cbc/install/include/coin/CglConfig.h +19 -0
  94. data/ext/ruby-cbc/install/include/coin/CglCutGenerator.hpp +121 -0
  95. data/ext/ruby-cbc/install/include/coin/CglDuplicateRow.hpp +189 -0
  96. data/ext/ruby-cbc/install/include/coin/CglFlowCover.hpp +371 -0
  97. data/ext/ruby-cbc/install/include/coin/CglGMI.hpp +364 -0
  98. data/ext/ruby-cbc/install/include/coin/CglGMIParam.hpp +313 -0
  99. data/ext/ruby-cbc/install/include/coin/CglGomory.hpp +204 -0
  100. data/ext/ruby-cbc/install/include/coin/CglKnapsackCover.hpp +310 -0
  101. data/ext/ruby-cbc/install/include/coin/CglLandP.hpp +306 -0
  102. data/ext/ruby-cbc/install/include/coin/CglLandPValidator.hpp +130 -0
  103. data/ext/ruby-cbc/install/include/coin/CglLiftAndProject.hpp +104 -0
  104. data/ext/ruby-cbc/install/include/coin/CglMessage.hpp +50 -0
  105. data/ext/ruby-cbc/install/include/coin/CglMixedIntegerRounding.hpp +429 -0
  106. data/ext/ruby-cbc/install/include/coin/CglMixedIntegerRounding2.hpp +427 -0
  107. data/ext/ruby-cbc/install/include/coin/CglOddHole.hpp +160 -0
  108. data/ext/ruby-cbc/install/include/coin/CglParam.hpp +93 -0
  109. data/ext/ruby-cbc/install/include/coin/CglPreProcess.hpp +492 -0
  110. data/ext/ruby-cbc/install/include/coin/CglProbing.hpp +543 -0
  111. data/ext/ruby-cbc/install/include/coin/CglRedSplit.hpp +448 -0
  112. data/ext/ruby-cbc/install/include/coin/CglRedSplit2.hpp +494 -0
  113. data/ext/ruby-cbc/install/include/coin/CglRedSplit2Param.hpp +495 -0
  114. data/ext/ruby-cbc/install/include/coin/CglRedSplitParam.hpp +272 -0
  115. data/ext/ruby-cbc/install/include/coin/CglResidualCapacity.hpp +240 -0
  116. data/ext/ruby-cbc/install/include/coin/CglSimpleRounding.hpp +174 -0
  117. data/ext/ruby-cbc/install/include/coin/CglStored.hpp +125 -0
  118. data/ext/ruby-cbc/install/include/coin/CglTreeInfo.hpp +180 -0
  119. data/ext/ruby-cbc/install/include/coin/CglTwomir.hpp +565 -0
  120. data/ext/ruby-cbc/install/include/coin/CglZeroHalf.hpp +133 -0
  121. data/ext/ruby-cbc/install/include/coin/ClpAmplObjective.hpp +113 -0
  122. data/ext/ruby-cbc/install/include/coin/ClpCholeskyBase.hpp +294 -0
  123. data/ext/ruby-cbc/install/include/coin/ClpCholeskyDense.hpp +162 -0
  124. data/ext/ruby-cbc/install/include/coin/ClpConfig.h +17 -0
  125. data/ext/ruby-cbc/install/include/coin/ClpConstraint.hpp +125 -0
  126. data/ext/ruby-cbc/install/include/coin/ClpConstraintAmpl.hpp +108 -0
  127. data/ext/ruby-cbc/install/include/coin/ClpConstraintLinear.hpp +110 -0
  128. data/ext/ruby-cbc/install/include/coin/ClpConstraintQuadratic.hpp +119 -0
  129. data/ext/ruby-cbc/install/include/coin/ClpDualRowDantzig.hpp +71 -0
  130. data/ext/ruby-cbc/install/include/coin/ClpDualRowPivot.hpp +129 -0
  131. data/ext/ruby-cbc/install/include/coin/ClpDualRowSteepest.hpp +153 -0
  132. data/ext/ruby-cbc/install/include/coin/ClpDummyMatrix.hpp +183 -0
  133. data/ext/ruby-cbc/install/include/coin/ClpDynamicExampleMatrix.hpp +186 -0
  134. data/ext/ruby-cbc/install/include/coin/ClpDynamicMatrix.hpp +381 -0
  135. data/ext/ruby-cbc/install/include/coin/ClpEventHandler.hpp +187 -0
  136. data/ext/ruby-cbc/install/include/coin/ClpFactorization.hpp +432 -0
  137. data/ext/ruby-cbc/install/include/coin/ClpGubDynamicMatrix.hpp +247 -0
  138. data/ext/ruby-cbc/install/include/coin/ClpGubMatrix.hpp +358 -0
  139. data/ext/ruby-cbc/install/include/coin/ClpInterior.hpp +570 -0
  140. data/ext/ruby-cbc/install/include/coin/ClpLinearObjective.hpp +103 -0
  141. data/ext/ruby-cbc/install/include/coin/ClpMatrixBase.hpp +524 -0
  142. data/ext/ruby-cbc/install/include/coin/ClpMessage.hpp +131 -0
  143. data/ext/ruby-cbc/install/include/coin/ClpModel.hpp +1307 -0
  144. data/ext/ruby-cbc/install/include/coin/ClpNetworkMatrix.hpp +229 -0
  145. data/ext/ruby-cbc/install/include/coin/ClpNode.hpp +349 -0
  146. data/ext/ruby-cbc/install/include/coin/ClpNonLinearCost.hpp +401 -0
  147. data/ext/ruby-cbc/install/include/coin/ClpObjective.hpp +134 -0
  148. data/ext/ruby-cbc/install/include/coin/ClpPackedMatrix.hpp +638 -0
  149. data/ext/ruby-cbc/install/include/coin/ClpParameters.hpp +126 -0
  150. data/ext/ruby-cbc/install/include/coin/ClpPdcoBase.hpp +103 -0
  151. data/ext/ruby-cbc/install/include/coin/ClpPlusMinusOneMatrix.hpp +290 -0
  152. data/ext/ruby-cbc/install/include/coin/ClpPresolve.hpp +299 -0
  153. data/ext/ruby-cbc/install/include/coin/ClpPrimalColumnDantzig.hpp +72 -0
  154. data/ext/ruby-cbc/install/include/coin/ClpPrimalColumnPivot.hpp +155 -0
  155. data/ext/ruby-cbc/install/include/coin/ClpPrimalColumnSteepest.hpp +247 -0
  156. data/ext/ruby-cbc/install/include/coin/ClpQuadraticObjective.hpp +155 -0
  157. data/ext/ruby-cbc/install/include/coin/ClpSimplex.hpp +1797 -0
  158. data/ext/ruby-cbc/install/include/coin/ClpSimplexDual.hpp +300 -0
  159. data/ext/ruby-cbc/install/include/coin/ClpSimplexNonlinear.hpp +117 -0
  160. data/ext/ruby-cbc/install/include/coin/ClpSimplexOther.hpp +277 -0
  161. data/ext/ruby-cbc/install/include/coin/ClpSimplexPrimal.hpp +244 -0
  162. data/ext/ruby-cbc/install/include/coin/ClpSolve.hpp +446 -0
  163. data/ext/ruby-cbc/install/include/coin/Clp_C_Interface.h +525 -0
  164. data/ext/ruby-cbc/install/include/coin/CoinAlloc.hpp +176 -0
  165. data/ext/ruby-cbc/install/include/coin/CoinBuild.hpp +149 -0
  166. data/ext/ruby-cbc/install/include/coin/CoinDenseFactorization.hpp +419 -0
  167. data/ext/ruby-cbc/install/include/coin/CoinDenseVector.hpp +383 -0
  168. data/ext/ruby-cbc/install/include/coin/CoinDistance.hpp +48 -0
  169. data/ext/ruby-cbc/install/include/coin/CoinError.hpp +257 -0
  170. data/ext/ruby-cbc/install/include/coin/CoinFactorization.hpp +2044 -0
  171. data/ext/ruby-cbc/install/include/coin/CoinFileIO.hpp +166 -0
  172. data/ext/ruby-cbc/install/include/coin/CoinFinite.hpp +34 -0
  173. data/ext/ruby-cbc/install/include/coin/CoinFloatEqual.hpp +177 -0
  174. data/ext/ruby-cbc/install/include/coin/CoinHelperFunctions.hpp +1111 -0
  175. data/ext/ruby-cbc/install/include/coin/CoinIndexedVector.hpp +1164 -0
  176. data/ext/ruby-cbc/install/include/coin/CoinLpIO.hpp +805 -0
  177. data/ext/ruby-cbc/install/include/coin/CoinMessage.hpp +96 -0
  178. data/ext/ruby-cbc/install/include/coin/CoinMessageHandler.hpp +666 -0
  179. data/ext/ruby-cbc/install/include/coin/CoinModel.hpp +1054 -0
  180. data/ext/ruby-cbc/install/include/coin/CoinModelUseful.hpp +441 -0
  181. data/ext/ruby-cbc/install/include/coin/CoinMpsIO.hpp +1056 -0
  182. data/ext/ruby-cbc/install/include/coin/CoinOslFactorization.hpp +280 -0
  183. data/ext/ruby-cbc/install/include/coin/CoinPackedMatrix.hpp +947 -0
  184. data/ext/ruby-cbc/install/include/coin/CoinPackedVector.hpp +657 -0
  185. data/ext/ruby-cbc/install/include/coin/CoinPackedVectorBase.hpp +269 -0
  186. data/ext/ruby-cbc/install/include/coin/CoinParam.hpp +644 -0
  187. data/ext/ruby-cbc/install/include/coin/CoinPragma.hpp +26 -0
  188. data/ext/ruby-cbc/install/include/coin/CoinPresolveDoubleton.hpp +73 -0
  189. data/ext/ruby-cbc/install/include/coin/CoinPresolveDual.hpp +85 -0
  190. data/ext/ruby-cbc/install/include/coin/CoinPresolveDupcol.hpp +226 -0
  191. data/ext/ruby-cbc/install/include/coin/CoinPresolveEmpty.hpp +116 -0
  192. data/ext/ruby-cbc/install/include/coin/CoinPresolveFixed.hpp +181 -0
  193. data/ext/ruby-cbc/install/include/coin/CoinPresolveForcing.hpp +61 -0
  194. data/ext/ruby-cbc/install/include/coin/CoinPresolveImpliedFree.hpp +60 -0
  195. data/ext/ruby-cbc/install/include/coin/CoinPresolveIsolated.hpp +51 -0
  196. data/ext/ruby-cbc/install/include/coin/CoinPresolveMatrix.hpp +1842 -0
  197. data/ext/ruby-cbc/install/include/coin/CoinPresolveMonitor.hpp +105 -0
  198. data/ext/ruby-cbc/install/include/coin/CoinPresolvePsdebug.hpp +166 -0
  199. data/ext/ruby-cbc/install/include/coin/CoinPresolveSingleton.hpp +112 -0
  200. data/ext/ruby-cbc/install/include/coin/CoinPresolveSubst.hpp +101 -0
  201. data/ext/ruby-cbc/install/include/coin/CoinPresolveTighten.hpp +55 -0
  202. data/ext/ruby-cbc/install/include/coin/CoinPresolveTripleton.hpp +66 -0
  203. data/ext/ruby-cbc/install/include/coin/CoinPresolveUseless.hpp +63 -0
  204. data/ext/ruby-cbc/install/include/coin/CoinPresolveZeros.hpp +60 -0
  205. data/ext/ruby-cbc/install/include/coin/CoinRational.hpp +44 -0
  206. data/ext/ruby-cbc/install/include/coin/CoinSearchTree.hpp +465 -0
  207. data/ext/ruby-cbc/install/include/coin/CoinShallowPackedVector.hpp +148 -0
  208. data/ext/ruby-cbc/install/include/coin/CoinSignal.hpp +117 -0
  209. data/ext/ruby-cbc/install/include/coin/CoinSimpFactorization.hpp +431 -0
  210. data/ext/ruby-cbc/install/include/coin/CoinSmartPtr.hpp +528 -0
  211. data/ext/ruby-cbc/install/include/coin/CoinSnapshot.hpp +476 -0
  212. data/ext/ruby-cbc/install/include/coin/CoinSort.hpp +678 -0
  213. data/ext/ruby-cbc/install/include/coin/CoinStructuredModel.hpp +247 -0
  214. data/ext/ruby-cbc/install/include/coin/CoinTime.hpp +310 -0
  215. data/ext/ruby-cbc/install/include/coin/CoinTypes.hpp +64 -0
  216. data/ext/ruby-cbc/install/include/coin/CoinUtility.hpp +19 -0
  217. data/ext/ruby-cbc/install/include/coin/CoinUtilsConfig.h +34 -0
  218. data/ext/ruby-cbc/install/include/coin/CoinWarmStart.hpp +58 -0
  219. data/ext/ruby-cbc/install/include/coin/CoinWarmStartBasis.hpp +456 -0
  220. data/ext/ruby-cbc/install/include/coin/CoinWarmStartDual.hpp +166 -0
  221. data/ext/ruby-cbc/install/include/coin/CoinWarmStartPrimalDual.hpp +211 -0
  222. data/ext/ruby-cbc/install/include/coin/CoinWarmStartVector.hpp +488 -0
  223. data/ext/ruby-cbc/install/include/coin/Coin_C_defines.h +115 -0
  224. data/ext/ruby-cbc/install/include/coin/Idiot.hpp +298 -0
  225. data/ext/ruby-cbc/install/include/coin/OsiAuxInfo.hpp +206 -0
  226. data/ext/ruby-cbc/install/include/coin/OsiBranchingObject.hpp +1005 -0
  227. data/ext/ruby-cbc/install/include/coin/OsiCbcSolverInterface.hpp +764 -0
  228. data/ext/ruby-cbc/install/include/coin/OsiChooseVariable.hpp +534 -0
  229. data/ext/ruby-cbc/install/include/coin/OsiClpSolverInterface.hpp +1509 -0
  230. data/ext/ruby-cbc/install/include/coin/OsiColCut.hpp +324 -0
  231. data/ext/ruby-cbc/install/include/coin/OsiCollections.hpp +35 -0
  232. data/ext/ruby-cbc/install/include/coin/OsiConfig.h +19 -0
  233. data/ext/ruby-cbc/install/include/coin/OsiCut.hpp +245 -0
  234. data/ext/ruby-cbc/install/include/coin/OsiCuts.hpp +474 -0
  235. data/ext/ruby-cbc/install/include/coin/OsiPresolve.hpp +252 -0
  236. data/ext/ruby-cbc/install/include/coin/OsiRowCut.hpp +331 -0
  237. data/ext/ruby-cbc/install/include/coin/OsiRowCutDebugger.hpp +187 -0
  238. data/ext/ruby-cbc/install/include/coin/OsiSolverBranch.hpp +152 -0
  239. data/ext/ruby-cbc/install/include/coin/OsiSolverInterface.hpp +2143 -0
  240. data/ext/ruby-cbc/install/include/coin/OsiSolverParameters.hpp +142 -0
  241. data/ext/ruby-cbc/install/include/coin/OsiUnitTests.hpp +374 -0
  242. data/ext/ruby-cbc/install/lib/libCbc.la +35 -0
  243. data/ext/ruby-cbc/install/lib/libCbc.so +0 -0
  244. data/ext/ruby-cbc/install/lib/libCbc.so.3 +0 -0
  245. data/ext/ruby-cbc/install/lib/libCbc.so.3.9.7 +0 -0
  246. data/ext/ruby-cbc/install/lib/libCbcSolver.la +35 -0
  247. data/ext/ruby-cbc/install/lib/libCbcSolver.so +0 -0
  248. data/ext/ruby-cbc/install/lib/libCbcSolver.so.3 +0 -0
  249. data/ext/ruby-cbc/install/lib/libCbcSolver.so.3.9.7 +0 -0
  250. data/ext/ruby-cbc/install/lib/libCgl.la +35 -0
  251. data/ext/ruby-cbc/install/lib/libCgl.so +0 -0
  252. data/ext/ruby-cbc/install/lib/libCgl.so.1 +0 -0
  253. data/ext/ruby-cbc/install/lib/libCgl.so.1.9.7 +0 -0
  254. data/ext/ruby-cbc/install/lib/libClp.la +35 -0
  255. data/ext/ruby-cbc/install/lib/libClp.so +0 -0
  256. data/ext/ruby-cbc/install/lib/libClp.so.1 +0 -0
  257. data/ext/ruby-cbc/install/lib/libClp.so.1.13.9 +0 -0
  258. data/ext/ruby-cbc/install/lib/libClpSolver.la +35 -0
  259. data/ext/ruby-cbc/install/lib/libClpSolver.so +0 -0
  260. data/ext/ruby-cbc/install/lib/libClpSolver.so.1 +0 -0
  261. data/ext/ruby-cbc/install/lib/libClpSolver.so.1.13.9 +0 -0
  262. data/ext/ruby-cbc/install/lib/libCoinUtils.la +35 -0
  263. data/ext/ruby-cbc/install/lib/libCoinUtils.so +0 -0
  264. data/ext/ruby-cbc/install/lib/libCoinUtils.so.3 +0 -0
  265. data/ext/ruby-cbc/install/lib/libCoinUtils.so.3.10.11 +0 -0
  266. data/ext/ruby-cbc/install/lib/libOsi.la +35 -0
  267. data/ext/ruby-cbc/install/lib/libOsi.so +0 -0
  268. data/ext/ruby-cbc/install/lib/libOsi.so.1 +0 -0
  269. data/ext/ruby-cbc/install/lib/libOsi.so.1.12.6 +0 -0
  270. data/ext/ruby-cbc/install/lib/libOsiCbc.la +35 -0
  271. data/ext/ruby-cbc/install/lib/libOsiCbc.so +0 -0
  272. data/ext/ruby-cbc/install/lib/libOsiCbc.so.3 +0 -0
  273. data/ext/ruby-cbc/install/lib/libOsiCbc.so.3.9.7 +0 -0
  274. data/ext/ruby-cbc/install/lib/libOsiClp.la +35 -0
  275. data/ext/ruby-cbc/install/lib/libOsiClp.so +0 -0
  276. data/ext/ruby-cbc/install/lib/libOsiClp.so.1 +0 -0
  277. data/ext/ruby-cbc/install/lib/libOsiClp.so.1.13.9 +0 -0
  278. data/ext/ruby-cbc/install/lib/libOsiCommonTests.la +35 -0
  279. data/ext/ruby-cbc/install/lib/libOsiCommonTests.so +0 -0
  280. data/ext/ruby-cbc/install/lib/libOsiCommonTests.so.1 +0 -0
  281. data/ext/ruby-cbc/install/lib/libOsiCommonTests.so.1.12.6 +0 -0
  282. data/ext/ruby-cbc/install/lib/pkgconfig/cbc.pc +12 -0
  283. data/ext/ruby-cbc/install/lib/pkgconfig/cgl.pc +12 -0
  284. data/ext/ruby-cbc/install/lib/pkgconfig/clp.pc +12 -0
  285. data/ext/ruby-cbc/install/lib/pkgconfig/coindatamiplib3.pc +9 -0
  286. data/ext/ruby-cbc/install/lib/pkgconfig/coindatasample.pc +9 -0
  287. data/ext/ruby-cbc/install/lib/pkgconfig/coinutils.pc +12 -0
  288. data/ext/ruby-cbc/install/lib/pkgconfig/osi-cbc.pc +12 -0
  289. data/ext/ruby-cbc/install/lib/pkgconfig/osi-clp.pc +12 -0
  290. data/ext/ruby-cbc/install/lib/pkgconfig/osi-unittests.pc +12 -0
  291. data/ext/ruby-cbc/install/lib/pkgconfig/osi.pc +12 -0
  292. data/lib/ruby-cbc/ilp/constant.rb +44 -0
  293. data/lib/ruby-cbc/ilp/constraint.rb +32 -0
  294. data/lib/ruby-cbc/ilp/objective.rb +26 -0
  295. data/lib/ruby-cbc/ilp/term.rb +47 -0
  296. data/lib/ruby-cbc/ilp/term_array.rb +80 -0
  297. data/lib/ruby-cbc/ilp/var.rb +62 -0
  298. data/lib/ruby-cbc/model.rb +125 -0
  299. data/lib/ruby-cbc/problem.rb +170 -0
  300. data/lib/ruby-cbc/version.rb +3 -0
  301. data/lib/ruby-cbc.rb +21 -0
  302. data/ruby-cbc.gemspec +36 -0
  303. metadata +431 -0
@@ -0,0 +1,4618 @@
1
+ /* ----------------------------------------------------------------------------
2
+ * This file was automatically generated by SWIG (http://www.swig.org).
3
+ * Version 2.0.11
4
+ *
5
+ * This file is not intended to be easily readable and contains a number of
6
+ * coding conventions designed to improve portability and efficiency. Do not make
7
+ * changes to this file unless you know what you are doing--modify the SWIG
8
+ * interface file instead.
9
+ * ----------------------------------------------------------------------------- */
10
+
11
+ #define SWIGRUBY
12
+
13
+ /* -----------------------------------------------------------------------------
14
+ * This section contains generic SWIG labels for method/variable
15
+ * declarations/attributes, and other compiler dependent labels.
16
+ * ----------------------------------------------------------------------------- */
17
+
18
+ /* template workaround for compilers that cannot correctly implement the C++ standard */
19
+ #ifndef SWIGTEMPLATEDISAMBIGUATOR
20
+ # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
21
+ # define SWIGTEMPLATEDISAMBIGUATOR template
22
+ # elif defined(__HP_aCC)
23
+ /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
24
+ /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
25
+ # define SWIGTEMPLATEDISAMBIGUATOR template
26
+ # else
27
+ # define SWIGTEMPLATEDISAMBIGUATOR
28
+ # endif
29
+ #endif
30
+
31
+ /* inline attribute */
32
+ #ifndef SWIGINLINE
33
+ # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
34
+ # define SWIGINLINE inline
35
+ # else
36
+ # define SWIGINLINE
37
+ # endif
38
+ #endif
39
+
40
+ /* attribute recognised by some compilers to avoid 'unused' warnings */
41
+ #ifndef SWIGUNUSED
42
+ # if defined(__GNUC__)
43
+ # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
44
+ # define SWIGUNUSED __attribute__ ((__unused__))
45
+ # else
46
+ # define SWIGUNUSED
47
+ # endif
48
+ # elif defined(__ICC)
49
+ # define SWIGUNUSED __attribute__ ((__unused__))
50
+ # else
51
+ # define SWIGUNUSED
52
+ # endif
53
+ #endif
54
+
55
+ #ifndef SWIG_MSC_UNSUPPRESS_4505
56
+ # if defined(_MSC_VER)
57
+ # pragma warning(disable : 4505) /* unreferenced local function has been removed */
58
+ # endif
59
+ #endif
60
+
61
+ #ifndef SWIGUNUSEDPARM
62
+ # ifdef __cplusplus
63
+ # define SWIGUNUSEDPARM(p)
64
+ # else
65
+ # define SWIGUNUSEDPARM(p) p SWIGUNUSED
66
+ # endif
67
+ #endif
68
+
69
+ /* internal SWIG method */
70
+ #ifndef SWIGINTERN
71
+ # define SWIGINTERN static SWIGUNUSED
72
+ #endif
73
+
74
+ /* internal inline SWIG method */
75
+ #ifndef SWIGINTERNINLINE
76
+ # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
77
+ #endif
78
+
79
+ /* exporting methods */
80
+ #if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
81
+ # ifndef GCC_HASCLASSVISIBILITY
82
+ # define GCC_HASCLASSVISIBILITY
83
+ # endif
84
+ #endif
85
+
86
+ #ifndef SWIGEXPORT
87
+ # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
88
+ # if defined(STATIC_LINKED)
89
+ # define SWIGEXPORT
90
+ # else
91
+ # define SWIGEXPORT __declspec(dllexport)
92
+ # endif
93
+ # else
94
+ # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
95
+ # define SWIGEXPORT __attribute__ ((visibility("default")))
96
+ # else
97
+ # define SWIGEXPORT
98
+ # endif
99
+ # endif
100
+ #endif
101
+
102
+ /* calling conventions for Windows */
103
+ #ifndef SWIGSTDCALL
104
+ # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
105
+ # define SWIGSTDCALL __stdcall
106
+ # else
107
+ # define SWIGSTDCALL
108
+ # endif
109
+ #endif
110
+
111
+ /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
112
+ #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
113
+ # define _CRT_SECURE_NO_DEPRECATE
114
+ #endif
115
+
116
+ /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
117
+ #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
118
+ # define _SCL_SECURE_NO_DEPRECATE
119
+ #endif
120
+
121
+
122
+ /* -----------------------------------------------------------------------------
123
+ * This section contains generic SWIG labels for method/variable
124
+ * declarations/attributes, and other compiler dependent labels.
125
+ * ----------------------------------------------------------------------------- */
126
+
127
+ /* template workaround for compilers that cannot correctly implement the C++ standard */
128
+ #ifndef SWIGTEMPLATEDISAMBIGUATOR
129
+ # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
130
+ # define SWIGTEMPLATEDISAMBIGUATOR template
131
+ # elif defined(__HP_aCC)
132
+ /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
133
+ /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
134
+ # define SWIGTEMPLATEDISAMBIGUATOR template
135
+ # else
136
+ # define SWIGTEMPLATEDISAMBIGUATOR
137
+ # endif
138
+ #endif
139
+
140
+ /* inline attribute */
141
+ #ifndef SWIGINLINE
142
+ # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
143
+ # define SWIGINLINE inline
144
+ # else
145
+ # define SWIGINLINE
146
+ # endif
147
+ #endif
148
+
149
+ /* attribute recognised by some compilers to avoid 'unused' warnings */
150
+ #ifndef SWIGUNUSED
151
+ # if defined(__GNUC__)
152
+ # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
153
+ # define SWIGUNUSED __attribute__ ((__unused__))
154
+ # else
155
+ # define SWIGUNUSED
156
+ # endif
157
+ # elif defined(__ICC)
158
+ # define SWIGUNUSED __attribute__ ((__unused__))
159
+ # else
160
+ # define SWIGUNUSED
161
+ # endif
162
+ #endif
163
+
164
+ #ifndef SWIG_MSC_UNSUPPRESS_4505
165
+ # if defined(_MSC_VER)
166
+ # pragma warning(disable : 4505) /* unreferenced local function has been removed */
167
+ # endif
168
+ #endif
169
+
170
+ #ifndef SWIGUNUSEDPARM
171
+ # ifdef __cplusplus
172
+ # define SWIGUNUSEDPARM(p)
173
+ # else
174
+ # define SWIGUNUSEDPARM(p) p SWIGUNUSED
175
+ # endif
176
+ #endif
177
+
178
+ /* internal SWIG method */
179
+ #ifndef SWIGINTERN
180
+ # define SWIGINTERN static SWIGUNUSED
181
+ #endif
182
+
183
+ /* internal inline SWIG method */
184
+ #ifndef SWIGINTERNINLINE
185
+ # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
186
+ #endif
187
+
188
+ /* exporting methods */
189
+ #if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
190
+ # ifndef GCC_HASCLASSVISIBILITY
191
+ # define GCC_HASCLASSVISIBILITY
192
+ # endif
193
+ #endif
194
+
195
+ #ifndef SWIGEXPORT
196
+ # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
197
+ # if defined(STATIC_LINKED)
198
+ # define SWIGEXPORT
199
+ # else
200
+ # define SWIGEXPORT __declspec(dllexport)
201
+ # endif
202
+ # else
203
+ # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
204
+ # define SWIGEXPORT __attribute__ ((visibility("default")))
205
+ # else
206
+ # define SWIGEXPORT
207
+ # endif
208
+ # endif
209
+ #endif
210
+
211
+ /* calling conventions for Windows */
212
+ #ifndef SWIGSTDCALL
213
+ # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
214
+ # define SWIGSTDCALL __stdcall
215
+ # else
216
+ # define SWIGSTDCALL
217
+ # endif
218
+ #endif
219
+
220
+ /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
221
+ #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
222
+ # define _CRT_SECURE_NO_DEPRECATE
223
+ #endif
224
+
225
+ /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
226
+ #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
227
+ # define _SCL_SECURE_NO_DEPRECATE
228
+ #endif
229
+
230
+
231
+ /* -----------------------------------------------------------------------------
232
+ * swigrun.swg
233
+ *
234
+ * This file contains generic C API SWIG runtime support for pointer
235
+ * type checking.
236
+ * ----------------------------------------------------------------------------- */
237
+
238
+ /* This should only be incremented when either the layout of swig_type_info changes,
239
+ or for whatever reason, the runtime changes incompatibly */
240
+ #define SWIG_RUNTIME_VERSION "4"
241
+
242
+ /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
243
+ #ifdef SWIG_TYPE_TABLE
244
+ # define SWIG_QUOTE_STRING(x) #x
245
+ # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
246
+ # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
247
+ #else
248
+ # define SWIG_TYPE_TABLE_NAME
249
+ #endif
250
+
251
+ /*
252
+ You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
253
+ creating a static or dynamic library from the SWIG runtime code.
254
+ In 99.9% of the cases, SWIG just needs to declare them as 'static'.
255
+
256
+ But only do this if strictly necessary, ie, if you have problems
257
+ with your compiler or suchlike.
258
+ */
259
+
260
+ #ifndef SWIGRUNTIME
261
+ # define SWIGRUNTIME SWIGINTERN
262
+ #endif
263
+
264
+ #ifndef SWIGRUNTIMEINLINE
265
+ # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
266
+ #endif
267
+
268
+ /* Generic buffer size */
269
+ #ifndef SWIG_BUFFER_SIZE
270
+ # define SWIG_BUFFER_SIZE 1024
271
+ #endif
272
+
273
+ /* Flags for pointer conversions */
274
+ #define SWIG_POINTER_DISOWN 0x1
275
+ #define SWIG_CAST_NEW_MEMORY 0x2
276
+
277
+ /* Flags for new pointer objects */
278
+ #define SWIG_POINTER_OWN 0x1
279
+
280
+
281
+ /*
282
+ Flags/methods for returning states.
283
+
284
+ The SWIG conversion methods, as ConvertPtr, return an integer
285
+ that tells if the conversion was successful or not. And if not,
286
+ an error code can be returned (see swigerrors.swg for the codes).
287
+
288
+ Use the following macros/flags to set or process the returning
289
+ states.
290
+
291
+ In old versions of SWIG, code such as the following was usually written:
292
+
293
+ if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
294
+ // success code
295
+ } else {
296
+ //fail code
297
+ }
298
+
299
+ Now you can be more explicit:
300
+
301
+ int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
302
+ if (SWIG_IsOK(res)) {
303
+ // success code
304
+ } else {
305
+ // fail code
306
+ }
307
+
308
+ which is the same really, but now you can also do
309
+
310
+ Type *ptr;
311
+ int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
312
+ if (SWIG_IsOK(res)) {
313
+ // success code
314
+ if (SWIG_IsNewObj(res) {
315
+ ...
316
+ delete *ptr;
317
+ } else {
318
+ ...
319
+ }
320
+ } else {
321
+ // fail code
322
+ }
323
+
324
+ I.e., now SWIG_ConvertPtr can return new objects and you can
325
+ identify the case and take care of the deallocation. Of course that
326
+ also requires SWIG_ConvertPtr to return new result values, such as
327
+
328
+ int SWIG_ConvertPtr(obj, ptr,...) {
329
+ if (<obj is ok>) {
330
+ if (<need new object>) {
331
+ *ptr = <ptr to new allocated object>;
332
+ return SWIG_NEWOBJ;
333
+ } else {
334
+ *ptr = <ptr to old object>;
335
+ return SWIG_OLDOBJ;
336
+ }
337
+ } else {
338
+ return SWIG_BADOBJ;
339
+ }
340
+ }
341
+
342
+ Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
343
+ more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
344
+ SWIG errors code.
345
+
346
+ Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
347
+ allows to return the 'cast rank', for example, if you have this
348
+
349
+ int food(double)
350
+ int fooi(int);
351
+
352
+ and you call
353
+
354
+ food(1) // cast rank '1' (1 -> 1.0)
355
+ fooi(1) // cast rank '0'
356
+
357
+ just use the SWIG_AddCast()/SWIG_CheckState()
358
+ */
359
+
360
+ #define SWIG_OK (0)
361
+ #define SWIG_ERROR (-1)
362
+ #define SWIG_IsOK(r) (r >= 0)
363
+ #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
364
+
365
+ /* The CastRankLimit says how many bits are used for the cast rank */
366
+ #define SWIG_CASTRANKLIMIT (1 << 8)
367
+ /* The NewMask denotes the object was created (using new/malloc) */
368
+ #define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1)
369
+ /* The TmpMask is for in/out typemaps that use temporal objects */
370
+ #define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1)
371
+ /* Simple returning values */
372
+ #define SWIG_BADOBJ (SWIG_ERROR)
373
+ #define SWIG_OLDOBJ (SWIG_OK)
374
+ #define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK)
375
+ #define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK)
376
+ /* Check, add and del mask methods */
377
+ #define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
378
+ #define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
379
+ #define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
380
+ #define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
381
+ #define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
382
+ #define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
383
+
384
+ /* Cast-Rank Mode */
385
+ #if defined(SWIG_CASTRANK_MODE)
386
+ # ifndef SWIG_TypeRank
387
+ # define SWIG_TypeRank unsigned long
388
+ # endif
389
+ # ifndef SWIG_MAXCASTRANK /* Default cast allowed */
390
+ # define SWIG_MAXCASTRANK (2)
391
+ # endif
392
+ # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
393
+ # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
394
+ SWIGINTERNINLINE int SWIG_AddCast(int r) {
395
+ return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
396
+ }
397
+ SWIGINTERNINLINE int SWIG_CheckState(int r) {
398
+ return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
399
+ }
400
+ #else /* no cast-rank mode */
401
+ # define SWIG_AddCast(r) (r)
402
+ # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
403
+ #endif
404
+
405
+
406
+ #include <string.h>
407
+
408
+ #ifdef __cplusplus
409
+ extern "C" {
410
+ #endif
411
+
412
+ typedef void *(*swig_converter_func)(void *, int *);
413
+ typedef struct swig_type_info *(*swig_dycast_func)(void **);
414
+
415
+ /* Structure to store information on one type */
416
+ typedef struct swig_type_info {
417
+ const char *name; /* mangled name of this type */
418
+ const char *str; /* human readable name of this type */
419
+ swig_dycast_func dcast; /* dynamic cast function down a hierarchy */
420
+ struct swig_cast_info *cast; /* linked list of types that can cast into this type */
421
+ void *clientdata; /* language specific type data */
422
+ int owndata; /* flag if the structure owns the clientdata */
423
+ } swig_type_info;
424
+
425
+ /* Structure to store a type and conversion function used for casting */
426
+ typedef struct swig_cast_info {
427
+ swig_type_info *type; /* pointer to type that is equivalent to this type */
428
+ swig_converter_func converter; /* function to cast the void pointers */
429
+ struct swig_cast_info *next; /* pointer to next cast in linked list */
430
+ struct swig_cast_info *prev; /* pointer to the previous cast */
431
+ } swig_cast_info;
432
+
433
+ /* Structure used to store module information
434
+ * Each module generates one structure like this, and the runtime collects
435
+ * all of these structures and stores them in a circularly linked list.*/
436
+ typedef struct swig_module_info {
437
+ swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */
438
+ size_t size; /* Number of types in this module */
439
+ struct swig_module_info *next; /* Pointer to next element in circularly linked list */
440
+ swig_type_info **type_initial; /* Array of initially generated type structures */
441
+ swig_cast_info **cast_initial; /* Array of initially generated casting structures */
442
+ void *clientdata; /* Language specific module data */
443
+ } swig_module_info;
444
+
445
+ /*
446
+ Compare two type names skipping the space characters, therefore
447
+ "char*" == "char *" and "Class<int>" == "Class<int >", etc.
448
+
449
+ Return 0 when the two name types are equivalent, as in
450
+ strncmp, but skipping ' '.
451
+ */
452
+ SWIGRUNTIME int
453
+ SWIG_TypeNameComp(const char *f1, const char *l1,
454
+ const char *f2, const char *l2) {
455
+ for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
456
+ while ((*f1 == ' ') && (f1 != l1)) ++f1;
457
+ while ((*f2 == ' ') && (f2 != l2)) ++f2;
458
+ if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
459
+ }
460
+ return (int)((l1 - f1) - (l2 - f2));
461
+ }
462
+
463
+ /*
464
+ Check type equivalence in a name list like <name1>|<name2>|...
465
+ Return 0 if equal, -1 if nb < tb, 1 if nb > tb
466
+ */
467
+ SWIGRUNTIME int
468
+ SWIG_TypeCmp(const char *nb, const char *tb) {
469
+ int equiv = 1;
470
+ const char* te = tb + strlen(tb);
471
+ const char* ne = nb;
472
+ while (equiv != 0 && *ne) {
473
+ for (nb = ne; *ne; ++ne) {
474
+ if (*ne == '|') break;
475
+ }
476
+ equiv = SWIG_TypeNameComp(nb, ne, tb, te);
477
+ if (*ne) ++ne;
478
+ }
479
+ return equiv;
480
+ }
481
+
482
+ /*
483
+ Check type equivalence in a name list like <name1>|<name2>|...
484
+ Return 0 if not equal, 1 if equal
485
+ */
486
+ SWIGRUNTIME int
487
+ SWIG_TypeEquiv(const char *nb, const char *tb) {
488
+ return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
489
+ }
490
+
491
+ /*
492
+ Check the typename
493
+ */
494
+ SWIGRUNTIME swig_cast_info *
495
+ SWIG_TypeCheck(const char *c, swig_type_info *ty) {
496
+ if (ty) {
497
+ swig_cast_info *iter = ty->cast;
498
+ while (iter) {
499
+ if (strcmp(iter->type->name, c) == 0) {
500
+ if (iter == ty->cast)
501
+ return iter;
502
+ /* Move iter to the top of the linked list */
503
+ iter->prev->next = iter->next;
504
+ if (iter->next)
505
+ iter->next->prev = iter->prev;
506
+ iter->next = ty->cast;
507
+ iter->prev = 0;
508
+ if (ty->cast) ty->cast->prev = iter;
509
+ ty->cast = iter;
510
+ return iter;
511
+ }
512
+ iter = iter->next;
513
+ }
514
+ }
515
+ return 0;
516
+ }
517
+
518
+ /*
519
+ Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
520
+ */
521
+ SWIGRUNTIME swig_cast_info *
522
+ SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) {
523
+ if (ty) {
524
+ swig_cast_info *iter = ty->cast;
525
+ while (iter) {
526
+ if (iter->type == from) {
527
+ if (iter == ty->cast)
528
+ return iter;
529
+ /* Move iter to the top of the linked list */
530
+ iter->prev->next = iter->next;
531
+ if (iter->next)
532
+ iter->next->prev = iter->prev;
533
+ iter->next = ty->cast;
534
+ iter->prev = 0;
535
+ if (ty->cast) ty->cast->prev = iter;
536
+ ty->cast = iter;
537
+ return iter;
538
+ }
539
+ iter = iter->next;
540
+ }
541
+ }
542
+ return 0;
543
+ }
544
+
545
+ /*
546
+ Cast a pointer up an inheritance hierarchy
547
+ */
548
+ SWIGRUNTIMEINLINE void *
549
+ SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
550
+ return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
551
+ }
552
+
553
+ /*
554
+ Dynamic pointer casting. Down an inheritance hierarchy
555
+ */
556
+ SWIGRUNTIME swig_type_info *
557
+ SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
558
+ swig_type_info *lastty = ty;
559
+ if (!ty || !ty->dcast) return ty;
560
+ while (ty && (ty->dcast)) {
561
+ ty = (*ty->dcast)(ptr);
562
+ if (ty) lastty = ty;
563
+ }
564
+ return lastty;
565
+ }
566
+
567
+ /*
568
+ Return the name associated with this type
569
+ */
570
+ SWIGRUNTIMEINLINE const char *
571
+ SWIG_TypeName(const swig_type_info *ty) {
572
+ return ty->name;
573
+ }
574
+
575
+ /*
576
+ Return the pretty name associated with this type,
577
+ that is an unmangled type name in a form presentable to the user.
578
+ */
579
+ SWIGRUNTIME const char *
580
+ SWIG_TypePrettyName(const swig_type_info *type) {
581
+ /* The "str" field contains the equivalent pretty names of the
582
+ type, separated by vertical-bar characters. We choose
583
+ to print the last name, as it is often (?) the most
584
+ specific. */
585
+ if (!type) return NULL;
586
+ if (type->str != NULL) {
587
+ const char *last_name = type->str;
588
+ const char *s;
589
+ for (s = type->str; *s; s++)
590
+ if (*s == '|') last_name = s+1;
591
+ return last_name;
592
+ }
593
+ else
594
+ return type->name;
595
+ }
596
+
597
+ /*
598
+ Set the clientdata field for a type
599
+ */
600
+ SWIGRUNTIME void
601
+ SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
602
+ swig_cast_info *cast = ti->cast;
603
+ /* if (ti->clientdata == clientdata) return; */
604
+ ti->clientdata = clientdata;
605
+
606
+ while (cast) {
607
+ if (!cast->converter) {
608
+ swig_type_info *tc = cast->type;
609
+ if (!tc->clientdata) {
610
+ SWIG_TypeClientData(tc, clientdata);
611
+ }
612
+ }
613
+ cast = cast->next;
614
+ }
615
+ }
616
+ SWIGRUNTIME void
617
+ SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
618
+ SWIG_TypeClientData(ti, clientdata);
619
+ ti->owndata = 1;
620
+ }
621
+
622
+ /*
623
+ Search for a swig_type_info structure only by mangled name
624
+ Search is a O(log #types)
625
+
626
+ We start searching at module start, and finish searching when start == end.
627
+ Note: if start == end at the beginning of the function, we go all the way around
628
+ the circular list.
629
+ */
630
+ SWIGRUNTIME swig_type_info *
631
+ SWIG_MangledTypeQueryModule(swig_module_info *start,
632
+ swig_module_info *end,
633
+ const char *name) {
634
+ swig_module_info *iter = start;
635
+ do {
636
+ if (iter->size) {
637
+ register size_t l = 0;
638
+ register size_t r = iter->size - 1;
639
+ do {
640
+ /* since l+r >= 0, we can (>> 1) instead (/ 2) */
641
+ register size_t i = (l + r) >> 1;
642
+ const char *iname = iter->types[i]->name;
643
+ if (iname) {
644
+ register int compare = strcmp(name, iname);
645
+ if (compare == 0) {
646
+ return iter->types[i];
647
+ } else if (compare < 0) {
648
+ if (i) {
649
+ r = i - 1;
650
+ } else {
651
+ break;
652
+ }
653
+ } else if (compare > 0) {
654
+ l = i + 1;
655
+ }
656
+ } else {
657
+ break; /* should never happen */
658
+ }
659
+ } while (l <= r);
660
+ }
661
+ iter = iter->next;
662
+ } while (iter != end);
663
+ return 0;
664
+ }
665
+
666
+ /*
667
+ Search for a swig_type_info structure for either a mangled name or a human readable name.
668
+ It first searches the mangled names of the types, which is a O(log #types)
669
+ If a type is not found it then searches the human readable names, which is O(#types).
670
+
671
+ We start searching at module start, and finish searching when start == end.
672
+ Note: if start == end at the beginning of the function, we go all the way around
673
+ the circular list.
674
+ */
675
+ SWIGRUNTIME swig_type_info *
676
+ SWIG_TypeQueryModule(swig_module_info *start,
677
+ swig_module_info *end,
678
+ const char *name) {
679
+ /* STEP 1: Search the name field using binary search */
680
+ swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
681
+ if (ret) {
682
+ return ret;
683
+ } else {
684
+ /* STEP 2: If the type hasn't been found, do a complete search
685
+ of the str field (the human readable name) */
686
+ swig_module_info *iter = start;
687
+ do {
688
+ register size_t i = 0;
689
+ for (; i < iter->size; ++i) {
690
+ if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
691
+ return iter->types[i];
692
+ }
693
+ iter = iter->next;
694
+ } while (iter != end);
695
+ }
696
+
697
+ /* neither found a match */
698
+ return 0;
699
+ }
700
+
701
+ /*
702
+ Pack binary data into a string
703
+ */
704
+ SWIGRUNTIME char *
705
+ SWIG_PackData(char *c, void *ptr, size_t sz) {
706
+ static const char hex[17] = "0123456789abcdef";
707
+ register const unsigned char *u = (unsigned char *) ptr;
708
+ register const unsigned char *eu = u + sz;
709
+ for (; u != eu; ++u) {
710
+ register unsigned char uu = *u;
711
+ *(c++) = hex[(uu & 0xf0) >> 4];
712
+ *(c++) = hex[uu & 0xf];
713
+ }
714
+ return c;
715
+ }
716
+
717
+ /*
718
+ Unpack binary data from a string
719
+ */
720
+ SWIGRUNTIME const char *
721
+ SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
722
+ register unsigned char *u = (unsigned char *) ptr;
723
+ register const unsigned char *eu = u + sz;
724
+ for (; u != eu; ++u) {
725
+ register char d = *(c++);
726
+ register unsigned char uu;
727
+ if ((d >= '0') && (d <= '9'))
728
+ uu = ((d - '0') << 4);
729
+ else if ((d >= 'a') && (d <= 'f'))
730
+ uu = ((d - ('a'-10)) << 4);
731
+ else
732
+ return (char *) 0;
733
+ d = *(c++);
734
+ if ((d >= '0') && (d <= '9'))
735
+ uu |= (d - '0');
736
+ else if ((d >= 'a') && (d <= 'f'))
737
+ uu |= (d - ('a'-10));
738
+ else
739
+ return (char *) 0;
740
+ *u = uu;
741
+ }
742
+ return c;
743
+ }
744
+
745
+ /*
746
+ Pack 'void *' into a string buffer.
747
+ */
748
+ SWIGRUNTIME char *
749
+ SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
750
+ char *r = buff;
751
+ if ((2*sizeof(void *) + 2) > bsz) return 0;
752
+ *(r++) = '_';
753
+ r = SWIG_PackData(r,&ptr,sizeof(void *));
754
+ if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
755
+ strcpy(r,name);
756
+ return buff;
757
+ }
758
+
759
+ SWIGRUNTIME const char *
760
+ SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
761
+ if (*c != '_') {
762
+ if (strcmp(c,"NULL") == 0) {
763
+ *ptr = (void *) 0;
764
+ return name;
765
+ } else {
766
+ return 0;
767
+ }
768
+ }
769
+ return SWIG_UnpackData(++c,ptr,sizeof(void *));
770
+ }
771
+
772
+ SWIGRUNTIME char *
773
+ SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
774
+ char *r = buff;
775
+ size_t lname = (name ? strlen(name) : 0);
776
+ if ((2*sz + 2 + lname) > bsz) return 0;
777
+ *(r++) = '_';
778
+ r = SWIG_PackData(r,ptr,sz);
779
+ if (lname) {
780
+ strncpy(r,name,lname+1);
781
+ } else {
782
+ *r = 0;
783
+ }
784
+ return buff;
785
+ }
786
+
787
+ SWIGRUNTIME const char *
788
+ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
789
+ if (*c != '_') {
790
+ if (strcmp(c,"NULL") == 0) {
791
+ memset(ptr,0,sz);
792
+ return name;
793
+ } else {
794
+ return 0;
795
+ }
796
+ }
797
+ return SWIG_UnpackData(++c,ptr,sz);
798
+ }
799
+
800
+ #ifdef __cplusplus
801
+ }
802
+ #endif
803
+
804
+ /* Errors in SWIG */
805
+ #define SWIG_UnknownError -1
806
+ #define SWIG_IOError -2
807
+ #define SWIG_RuntimeError -3
808
+ #define SWIG_IndexError -4
809
+ #define SWIG_TypeError -5
810
+ #define SWIG_DivisionByZero -6
811
+ #define SWIG_OverflowError -7
812
+ #define SWIG_SyntaxError -8
813
+ #define SWIG_ValueError -9
814
+ #define SWIG_SystemError -10
815
+ #define SWIG_AttributeError -11
816
+ #define SWIG_MemoryError -12
817
+ #define SWIG_NullReferenceError -13
818
+
819
+
820
+
821
+ #include <ruby.h>
822
+
823
+ /* Ruby 1.9.1 has a "memoisation optimisation" when compiling with GCC which
824
+ * breaks using rb_intern as an lvalue, as SWIG does. We work around this
825
+ * issue for now by disabling this.
826
+ * https://sourceforge.net/tracker/?func=detail&aid=2859614&group_id=1645&atid=101645
827
+ */
828
+ #ifdef rb_intern
829
+ # undef rb_intern
830
+ #endif
831
+
832
+ /* Remove global macros defined in Ruby's win32.h */
833
+ #ifdef write
834
+ # undef write
835
+ #endif
836
+ #ifdef read
837
+ # undef read
838
+ #endif
839
+ #ifdef bind
840
+ # undef bind
841
+ #endif
842
+ #ifdef close
843
+ # undef close
844
+ #endif
845
+ #ifdef connect
846
+ # undef connect
847
+ #endif
848
+
849
+
850
+ /* Ruby 1.7 defines NUM2LL(), LL2NUM() and ULL2NUM() macros */
851
+ #ifndef NUM2LL
852
+ #define NUM2LL(x) NUM2LONG((x))
853
+ #endif
854
+ #ifndef LL2NUM
855
+ #define LL2NUM(x) INT2NUM((long) (x))
856
+ #endif
857
+ #ifndef ULL2NUM
858
+ #define ULL2NUM(x) UINT2NUM((unsigned long) (x))
859
+ #endif
860
+
861
+ /* Ruby 1.7 doesn't (yet) define NUM2ULL() */
862
+ #ifndef NUM2ULL
863
+ #ifdef HAVE_LONG_LONG
864
+ #define NUM2ULL(x) rb_num2ull((x))
865
+ #else
866
+ #define NUM2ULL(x) NUM2ULONG(x)
867
+ #endif
868
+ #endif
869
+
870
+ /* RSTRING_LEN, etc are new in Ruby 1.9, but ->ptr and ->len no longer work */
871
+ /* Define these for older versions so we can just write code the new way */
872
+ #ifndef RSTRING_LEN
873
+ # define RSTRING_LEN(x) RSTRING(x)->len
874
+ #endif
875
+ #ifndef RSTRING_PTR
876
+ # define RSTRING_PTR(x) RSTRING(x)->ptr
877
+ #endif
878
+ #ifndef RSTRING_END
879
+ # define RSTRING_END(x) (RSTRING_PTR(x) + RSTRING_LEN(x))
880
+ #endif
881
+ #ifndef RARRAY_LEN
882
+ # define RARRAY_LEN(x) RARRAY(x)->len
883
+ #endif
884
+ #ifndef RARRAY_PTR
885
+ # define RARRAY_PTR(x) RARRAY(x)->ptr
886
+ #endif
887
+ #ifndef RFLOAT_VALUE
888
+ # define RFLOAT_VALUE(x) RFLOAT(x)->value
889
+ #endif
890
+ #ifndef DOUBLE2NUM
891
+ # define DOUBLE2NUM(x) rb_float_new(x)
892
+ #endif
893
+ #ifndef RHASH_TBL
894
+ # define RHASH_TBL(x) (RHASH(x)->tbl)
895
+ #endif
896
+ #ifndef RHASH_ITER_LEV
897
+ # define RHASH_ITER_LEV(x) (RHASH(x)->iter_lev)
898
+ #endif
899
+ #ifndef RHASH_IFNONE
900
+ # define RHASH_IFNONE(x) (RHASH(x)->ifnone)
901
+ #endif
902
+ #ifndef RHASH_SIZE
903
+ # define RHASH_SIZE(x) (RHASH(x)->tbl->num_entries)
904
+ #endif
905
+ #ifndef RHASH_EMPTY_P
906
+ # define RHASH_EMPTY_P(x) (RHASH_SIZE(x) == 0)
907
+ #endif
908
+ #ifndef RSTRUCT_LEN
909
+ # define RSTRUCT_LEN(x) RSTRUCT(x)->len
910
+ #endif
911
+ #ifndef RSTRUCT_PTR
912
+ # define RSTRUCT_PTR(x) RSTRUCT(x)->ptr
913
+ #endif
914
+
915
+
916
+
917
+ /*
918
+ * Need to be very careful about how these macros are defined, especially
919
+ * when compiling C++ code or C code with an ANSI C compiler.
920
+ *
921
+ * VALUEFUNC(f) is a macro used to typecast a C function that implements
922
+ * a Ruby method so that it can be passed as an argument to API functions
923
+ * like rb_define_method() and rb_define_singleton_method().
924
+ *
925
+ * VOIDFUNC(f) is a macro used to typecast a C function that implements
926
+ * either the "mark" or "free" stuff for a Ruby Data object, so that it
927
+ * can be passed as an argument to API functions like Data_Wrap_Struct()
928
+ * and Data_Make_Struct().
929
+ */
930
+
931
+ #ifdef __cplusplus
932
+ # ifndef RUBY_METHOD_FUNC /* These definitions should work for Ruby 1.4.6 */
933
+ # define PROTECTFUNC(f) ((VALUE (*)()) f)
934
+ # define VALUEFUNC(f) ((VALUE (*)()) f)
935
+ # define VOIDFUNC(f) ((void (*)()) f)
936
+ # else
937
+ # ifndef ANYARGS /* These definitions should work for Ruby 1.6 */
938
+ # define PROTECTFUNC(f) ((VALUE (*)()) f)
939
+ # define VALUEFUNC(f) ((VALUE (*)()) f)
940
+ # define VOIDFUNC(f) ((RUBY_DATA_FUNC) f)
941
+ # else /* These definitions should work for Ruby 1.7+ */
942
+ # define PROTECTFUNC(f) ((VALUE (*)(VALUE)) f)
943
+ # define VALUEFUNC(f) ((VALUE (*)(ANYARGS)) f)
944
+ # define VOIDFUNC(f) ((RUBY_DATA_FUNC) f)
945
+ # endif
946
+ # endif
947
+ #else
948
+ # define VALUEFUNC(f) (f)
949
+ # define VOIDFUNC(f) (f)
950
+ #endif
951
+
952
+ /* Don't use for expressions have side effect */
953
+ #ifndef RB_STRING_VALUE
954
+ #define RB_STRING_VALUE(s) (TYPE(s) == T_STRING ? (s) : (*(volatile VALUE *)&(s) = rb_str_to_str(s)))
955
+ #endif
956
+ #ifndef StringValue
957
+ #define StringValue(s) RB_STRING_VALUE(s)
958
+ #endif
959
+ #ifndef StringValuePtr
960
+ #define StringValuePtr(s) RSTRING_PTR(RB_STRING_VALUE(s))
961
+ #endif
962
+ #ifndef StringValueLen
963
+ #define StringValueLen(s) RSTRING_LEN(RB_STRING_VALUE(s))
964
+ #endif
965
+ #ifndef SafeStringValue
966
+ #define SafeStringValue(v) do {\
967
+ StringValue(v);\
968
+ rb_check_safe_str(v);\
969
+ } while (0)
970
+ #endif
971
+
972
+ #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
973
+ #define rb_define_alloc_func(klass, func) rb_define_singleton_method((klass), "new", VALUEFUNC((func)), -1)
974
+ #define rb_undef_alloc_func(klass) rb_undef_method(CLASS_OF((klass)), "new")
975
+ #endif
976
+
977
+ static VALUE _mSWIG = Qnil;
978
+
979
+ /* -----------------------------------------------------------------------------
980
+ * error manipulation
981
+ * ----------------------------------------------------------------------------- */
982
+
983
+
984
+ /* Define some additional error types */
985
+ #define SWIG_ObjectPreviouslyDeletedError -100
986
+
987
+
988
+ /* Define custom exceptions for errors that do not map to existing Ruby
989
+ exceptions. Note this only works for C++ since a global cannot be
990
+ initialized by a function in C. For C, fallback to rb_eRuntimeError.*/
991
+
992
+ SWIGINTERN VALUE
993
+ getNullReferenceError(void) {
994
+ static int init = 0;
995
+ static VALUE rb_eNullReferenceError ;
996
+ if (!init) {
997
+ init = 1;
998
+ rb_eNullReferenceError = rb_define_class("NullReferenceError", rb_eRuntimeError);
999
+ }
1000
+ return rb_eNullReferenceError;
1001
+ }
1002
+
1003
+ SWIGINTERN VALUE
1004
+ getObjectPreviouslyDeletedError(void) {
1005
+ static int init = 0;
1006
+ static VALUE rb_eObjectPreviouslyDeleted ;
1007
+ if (!init) {
1008
+ init = 1;
1009
+ rb_eObjectPreviouslyDeleted = rb_define_class("ObjectPreviouslyDeleted", rb_eRuntimeError);
1010
+ }
1011
+ return rb_eObjectPreviouslyDeleted;
1012
+ }
1013
+
1014
+
1015
+ SWIGINTERN VALUE
1016
+ SWIG_Ruby_ErrorType(int SWIG_code) {
1017
+ VALUE type;
1018
+ switch (SWIG_code) {
1019
+ case SWIG_MemoryError:
1020
+ type = rb_eNoMemError;
1021
+ break;
1022
+ case SWIG_IOError:
1023
+ type = rb_eIOError;
1024
+ break;
1025
+ case SWIG_RuntimeError:
1026
+ type = rb_eRuntimeError;
1027
+ break;
1028
+ case SWIG_IndexError:
1029
+ type = rb_eIndexError;
1030
+ break;
1031
+ case SWIG_TypeError:
1032
+ type = rb_eTypeError;
1033
+ break;
1034
+ case SWIG_DivisionByZero:
1035
+ type = rb_eZeroDivError;
1036
+ break;
1037
+ case SWIG_OverflowError:
1038
+ type = rb_eRangeError;
1039
+ break;
1040
+ case SWIG_SyntaxError:
1041
+ type = rb_eSyntaxError;
1042
+ break;
1043
+ case SWIG_ValueError:
1044
+ type = rb_eArgError;
1045
+ break;
1046
+ case SWIG_SystemError:
1047
+ type = rb_eFatal;
1048
+ break;
1049
+ case SWIG_AttributeError:
1050
+ type = rb_eRuntimeError;
1051
+ break;
1052
+ case SWIG_NullReferenceError:
1053
+ type = getNullReferenceError();
1054
+ break;
1055
+ case SWIG_ObjectPreviouslyDeletedError:
1056
+ type = getObjectPreviouslyDeletedError();
1057
+ break;
1058
+ case SWIG_UnknownError:
1059
+ type = rb_eRuntimeError;
1060
+ break;
1061
+ default:
1062
+ type = rb_eRuntimeError;
1063
+ }
1064
+ return type;
1065
+ }
1066
+
1067
+
1068
+ /* This function is called when a user inputs a wrong argument to
1069
+ a method.
1070
+ */
1071
+ SWIGINTERN
1072
+ const char* Ruby_Format_TypeError( const char* msg,
1073
+ const char* type,
1074
+ const char* name,
1075
+ const int argn,
1076
+ VALUE input )
1077
+ {
1078
+ char buf[128];
1079
+ VALUE str;
1080
+ VALUE asStr;
1081
+ if ( msg && *msg )
1082
+ {
1083
+ str = rb_str_new2(msg);
1084
+ }
1085
+ else
1086
+ {
1087
+ str = rb_str_new(NULL, 0);
1088
+ }
1089
+
1090
+ str = rb_str_cat2( str, "Expected argument " );
1091
+ sprintf( buf, "%d of type ", argn-1 );
1092
+ str = rb_str_cat2( str, buf );
1093
+ str = rb_str_cat2( str, type );
1094
+ str = rb_str_cat2( str, ", but got " );
1095
+ str = rb_str_cat2( str, rb_obj_classname(input) );
1096
+ str = rb_str_cat2( str, " " );
1097
+ asStr = rb_inspect(input);
1098
+ if ( RSTRING_LEN(asStr) > 30 )
1099
+ {
1100
+ str = rb_str_cat( str, StringValuePtr(asStr), 30 );
1101
+ str = rb_str_cat2( str, "..." );
1102
+ }
1103
+ else
1104
+ {
1105
+ str = rb_str_append( str, asStr );
1106
+ }
1107
+
1108
+ if ( name )
1109
+ {
1110
+ str = rb_str_cat2( str, "\n\tin SWIG method '" );
1111
+ str = rb_str_cat2( str, name );
1112
+ str = rb_str_cat2( str, "'" );
1113
+ }
1114
+
1115
+ return StringValuePtr( str );
1116
+ }
1117
+
1118
+ /* This function is called when an overloaded method fails */
1119
+ SWIGINTERN
1120
+ void Ruby_Format_OverloadedError(
1121
+ const int argc,
1122
+ const int maxargs,
1123
+ const char* method,
1124
+ const char* prototypes
1125
+ )
1126
+ {
1127
+ const char* msg = "Wrong # of arguments";
1128
+ if ( argc <= maxargs ) msg = "Wrong arguments";
1129
+ rb_raise(rb_eArgError,"%s for overloaded method '%s'.\n"
1130
+ "Possible C/C++ prototypes are:\n%s",
1131
+ msg, method, prototypes);
1132
+ }
1133
+
1134
+ /* -----------------------------------------------------------------------------
1135
+ * rubytracking.swg
1136
+ *
1137
+ * This file contains support for tracking mappings from
1138
+ * Ruby objects to C++ objects. This functionality is needed
1139
+ * to implement mark functions for Ruby's mark and sweep
1140
+ * garbage collector.
1141
+ * ----------------------------------------------------------------------------- */
1142
+
1143
+ #ifdef __cplusplus
1144
+ extern "C" {
1145
+ #endif
1146
+
1147
+ /* Ruby 1.8 actually assumes the first case. */
1148
+ #if SIZEOF_VOIDP == SIZEOF_LONG
1149
+ # define SWIG2NUM(v) LONG2NUM((unsigned long)v)
1150
+ # define NUM2SWIG(x) (unsigned long)NUM2LONG(x)
1151
+ #elif SIZEOF_VOIDP == SIZEOF_LONG_LONG
1152
+ # define SWIG2NUM(v) LL2NUM((unsigned long long)v)
1153
+ # define NUM2SWIG(x) (unsigned long long)NUM2LL(x)
1154
+ #else
1155
+ # error sizeof(void*) is not the same as long or long long
1156
+ #endif
1157
+
1158
+
1159
+ /* Global Ruby hash table to store Trackings from C/C++
1160
+ structs to Ruby Objects.
1161
+ */
1162
+ static VALUE swig_ruby_trackings = Qnil;
1163
+
1164
+ /* Global variable that stores a reference to the ruby
1165
+ hash table delete function. */
1166
+ static ID swig_ruby_hash_delete;
1167
+
1168
+ /* Setup a Ruby hash table to store Trackings */
1169
+ SWIGRUNTIME void SWIG_RubyInitializeTrackings(void) {
1170
+ /* Create a ruby hash table to store Trackings from C++
1171
+ objects to Ruby objects. */
1172
+
1173
+ /* Try to see if some other .so has already created a
1174
+ tracking hash table, which we keep hidden in an instance var
1175
+ in the SWIG module.
1176
+ This is done to allow multiple DSOs to share the same
1177
+ tracking table.
1178
+ */
1179
+ ID trackings_id = rb_intern( "@__trackings__" );
1180
+ VALUE verbose = rb_gv_get("VERBOSE");
1181
+ rb_gv_set("VERBOSE", Qfalse);
1182
+ swig_ruby_trackings = rb_ivar_get( _mSWIG, trackings_id );
1183
+ rb_gv_set("VERBOSE", verbose);
1184
+
1185
+ /* No, it hasn't. Create one ourselves */
1186
+ if ( swig_ruby_trackings == Qnil )
1187
+ {
1188
+ swig_ruby_trackings = rb_hash_new();
1189
+ rb_ivar_set( _mSWIG, trackings_id, swig_ruby_trackings );
1190
+ }
1191
+
1192
+ /* Now store a reference to the hash table delete function
1193
+ so that we only have to look it up once.*/
1194
+ swig_ruby_hash_delete = rb_intern("delete");
1195
+ }
1196
+
1197
+ /* Get a Ruby number to reference a pointer */
1198
+ SWIGRUNTIME VALUE SWIG_RubyPtrToReference(void* ptr) {
1199
+ /* We cast the pointer to an unsigned long
1200
+ and then store a reference to it using
1201
+ a Ruby number object. */
1202
+
1203
+ /* Convert the pointer to a Ruby number */
1204
+ return SWIG2NUM(ptr);
1205
+ }
1206
+
1207
+ /* Get a Ruby number to reference an object */
1208
+ SWIGRUNTIME VALUE SWIG_RubyObjectToReference(VALUE object) {
1209
+ /* We cast the object to an unsigned long
1210
+ and then store a reference to it using
1211
+ a Ruby number object. */
1212
+
1213
+ /* Convert the Object to a Ruby number */
1214
+ return SWIG2NUM(object);
1215
+ }
1216
+
1217
+ /* Get a Ruby object from a previously stored reference */
1218
+ SWIGRUNTIME VALUE SWIG_RubyReferenceToObject(VALUE reference) {
1219
+ /* The provided Ruby number object is a reference
1220
+ to the Ruby object we want.*/
1221
+
1222
+ /* Convert the Ruby number to a Ruby object */
1223
+ return NUM2SWIG(reference);
1224
+ }
1225
+
1226
+ /* Add a Tracking from a C/C++ struct to a Ruby object */
1227
+ SWIGRUNTIME void SWIG_RubyAddTracking(void* ptr, VALUE object) {
1228
+ /* In a Ruby hash table we store the pointer and
1229
+ the associated Ruby object. The trick here is
1230
+ that we cannot store the Ruby object directly - if
1231
+ we do then it cannot be garbage collected. So
1232
+ instead we typecast it as a unsigned long and
1233
+ convert it to a Ruby number object.*/
1234
+
1235
+ /* Get a reference to the pointer as a Ruby number */
1236
+ VALUE key = SWIG_RubyPtrToReference(ptr);
1237
+
1238
+ /* Get a reference to the Ruby object as a Ruby number */
1239
+ VALUE value = SWIG_RubyObjectToReference(object);
1240
+
1241
+ /* Store the mapping to the global hash table. */
1242
+ rb_hash_aset(swig_ruby_trackings, key, value);
1243
+ }
1244
+
1245
+ /* Get the Ruby object that owns the specified C/C++ struct */
1246
+ SWIGRUNTIME VALUE SWIG_RubyInstanceFor(void* ptr) {
1247
+ /* Get a reference to the pointer as a Ruby number */
1248
+ VALUE key = SWIG_RubyPtrToReference(ptr);
1249
+
1250
+ /* Now lookup the value stored in the global hash table */
1251
+ VALUE value = rb_hash_aref(swig_ruby_trackings, key);
1252
+
1253
+ if (value == Qnil) {
1254
+ /* No object exists - return nil. */
1255
+ return Qnil;
1256
+ }
1257
+ else {
1258
+ /* Convert this value to Ruby object */
1259
+ return SWIG_RubyReferenceToObject(value);
1260
+ }
1261
+ }
1262
+
1263
+ /* Remove a Tracking from a C/C++ struct to a Ruby object. It
1264
+ is very important to remove objects once they are destroyed
1265
+ since the same memory address may be reused later to create
1266
+ a new object. */
1267
+ SWIGRUNTIME void SWIG_RubyRemoveTracking(void* ptr) {
1268
+ /* Get a reference to the pointer as a Ruby number */
1269
+ VALUE key = SWIG_RubyPtrToReference(ptr);
1270
+
1271
+ /* Delete the object from the hash table by calling Ruby's
1272
+ do this we need to call the Hash.delete method.*/
1273
+ rb_funcall(swig_ruby_trackings, swig_ruby_hash_delete, 1, key);
1274
+ }
1275
+
1276
+ /* This is a helper method that unlinks a Ruby object from its
1277
+ underlying C++ object. This is needed if the lifetime of the
1278
+ Ruby object is longer than the C++ object */
1279
+ SWIGRUNTIME void SWIG_RubyUnlinkObjects(void* ptr) {
1280
+ VALUE object = SWIG_RubyInstanceFor(ptr);
1281
+
1282
+ if (object != Qnil) {
1283
+ DATA_PTR(object) = 0;
1284
+ }
1285
+ }
1286
+
1287
+
1288
+ #ifdef __cplusplus
1289
+ }
1290
+ #endif
1291
+
1292
+ /* -----------------------------------------------------------------------------
1293
+ * Ruby API portion that goes into the runtime
1294
+ * ----------------------------------------------------------------------------- */
1295
+
1296
+ #ifdef __cplusplus
1297
+ extern "C" {
1298
+ #endif
1299
+
1300
+ SWIGINTERN VALUE
1301
+ SWIG_Ruby_AppendOutput(VALUE target, VALUE o) {
1302
+ if (NIL_P(target)) {
1303
+ target = o;
1304
+ } else {
1305
+ if (TYPE(target) != T_ARRAY) {
1306
+ VALUE o2 = target;
1307
+ target = rb_ary_new();
1308
+ rb_ary_push(target, o2);
1309
+ }
1310
+ rb_ary_push(target, o);
1311
+ }
1312
+ return target;
1313
+ }
1314
+
1315
+ /* For ruby1.8.4 and earlier. */
1316
+ #ifndef RUBY_INIT_STACK
1317
+ RUBY_EXTERN void Init_stack(VALUE* addr);
1318
+ # define RUBY_INIT_STACK \
1319
+ VALUE variable_in_this_stack_frame; \
1320
+ Init_stack(&variable_in_this_stack_frame);
1321
+ #endif
1322
+
1323
+
1324
+ #ifdef __cplusplus
1325
+ }
1326
+ #endif
1327
+
1328
+
1329
+ /* -----------------------------------------------------------------------------
1330
+ * rubyrun.swg
1331
+ *
1332
+ * This file contains the runtime support for Ruby modules
1333
+ * and includes code for managing global variables and pointer
1334
+ * type checking.
1335
+ * ----------------------------------------------------------------------------- */
1336
+
1337
+ /* For backward compatibility only */
1338
+ #define SWIG_POINTER_EXCEPTION 0
1339
+
1340
+ /* for raw pointers */
1341
+ #define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Ruby_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
1342
+ #define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Ruby_ConvertPtrAndOwn(obj, pptr, type, flags, own)
1343
+ #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Ruby_NewPointerObj(ptr, type, flags)
1344
+ #define SWIG_AcquirePtr(ptr, own) SWIG_Ruby_AcquirePtr(ptr, own)
1345
+ #define swig_owntype ruby_owntype
1346
+
1347
+ /* for raw packed data */
1348
+ #define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Ruby_ConvertPacked(obj, ptr, sz, ty, flags)
1349
+ #define SWIG_NewPackedObj(ptr, sz, type) SWIG_Ruby_NewPackedObj(ptr, sz, type)
1350
+
1351
+ /* for class or struct pointers */
1352
+ #define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags)
1353
+ #define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags)
1354
+
1355
+ /* for C or C++ function pointers */
1356
+ #define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_ConvertPtr(obj, pptr, type, 0)
1357
+ #define SWIG_NewFunctionPtrObj(ptr, type) SWIG_NewPointerObj(ptr, type, 0)
1358
+
1359
+ /* for C++ member pointers, ie, member methods */
1360
+ #define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Ruby_ConvertPacked(obj, ptr, sz, ty)
1361
+ #define SWIG_NewMemberObj(ptr, sz, type) SWIG_Ruby_NewPackedObj(ptr, sz, type)
1362
+
1363
+
1364
+ /* Runtime API */
1365
+
1366
+ #define SWIG_GetModule(clientdata) SWIG_Ruby_GetModule(clientdata)
1367
+ #define SWIG_SetModule(clientdata, pointer) SWIG_Ruby_SetModule(pointer)
1368
+
1369
+
1370
+ /* Error manipulation */
1371
+
1372
+ #define SWIG_ErrorType(code) SWIG_Ruby_ErrorType(code)
1373
+ #define SWIG_Error(code, msg) rb_raise(SWIG_Ruby_ErrorType(code), "%s", msg)
1374
+ #define SWIG_fail goto fail
1375
+
1376
+
1377
+ /* Ruby-specific SWIG API */
1378
+
1379
+ #define SWIG_InitRuntime() SWIG_Ruby_InitRuntime()
1380
+ #define SWIG_define_class(ty) SWIG_Ruby_define_class(ty)
1381
+ #define SWIG_NewClassInstance(value, ty) SWIG_Ruby_NewClassInstance(value, ty)
1382
+ #define SWIG_MangleStr(value) SWIG_Ruby_MangleStr(value)
1383
+ #define SWIG_CheckConvert(value, ty) SWIG_Ruby_CheckConvert(value, ty)
1384
+
1385
+ #include "assert.h"
1386
+
1387
+ /* -----------------------------------------------------------------------------
1388
+ * pointers/data manipulation
1389
+ * ----------------------------------------------------------------------------- */
1390
+
1391
+ #ifdef __cplusplus
1392
+ extern "C" {
1393
+ #endif
1394
+
1395
+ typedef struct {
1396
+ VALUE klass;
1397
+ VALUE mImpl;
1398
+ void (*mark)(void *);
1399
+ void (*destroy)(void *);
1400
+ int trackObjects;
1401
+ } swig_class;
1402
+
1403
+
1404
+ /* Global pointer used to keep some internal SWIG stuff */
1405
+ static VALUE _cSWIG_Pointer = Qnil;
1406
+ static VALUE swig_runtime_data_type_pointer = Qnil;
1407
+
1408
+ /* Global IDs used to keep some internal SWIG stuff */
1409
+ static ID swig_arity_id = 0;
1410
+ static ID swig_call_id = 0;
1411
+
1412
+ /*
1413
+ If your swig extension is to be run within an embedded ruby and has
1414
+ director callbacks, you should set -DRUBY_EMBEDDED during compilation.
1415
+ This will reset ruby's stack frame on each entry point from the main
1416
+ program the first time a virtual director function is invoked (in a
1417
+ non-recursive way).
1418
+ If this is not done, you run the risk of Ruby trashing the stack.
1419
+ */
1420
+
1421
+ #ifdef RUBY_EMBEDDED
1422
+
1423
+ # define SWIG_INIT_STACK \
1424
+ if ( !swig_virtual_calls ) { RUBY_INIT_STACK } \
1425
+ ++swig_virtual_calls;
1426
+ # define SWIG_RELEASE_STACK --swig_virtual_calls;
1427
+ # define Ruby_DirectorTypeMismatchException(x) \
1428
+ rb_raise( rb_eTypeError, "%s", x ); return c_result;
1429
+
1430
+ static unsigned int swig_virtual_calls = 0;
1431
+
1432
+ #else /* normal non-embedded extension */
1433
+
1434
+ # define SWIG_INIT_STACK
1435
+ # define SWIG_RELEASE_STACK
1436
+ # define Ruby_DirectorTypeMismatchException(x) \
1437
+ throw Swig::DirectorTypeMismatchException( x );
1438
+
1439
+ #endif /* RUBY_EMBEDDED */
1440
+
1441
+
1442
+ SWIGRUNTIME VALUE
1443
+ getExceptionClass(void) {
1444
+ static int init = 0;
1445
+ static VALUE rubyExceptionClass ;
1446
+ if (!init) {
1447
+ init = 1;
1448
+ rubyExceptionClass = rb_const_get(_mSWIG, rb_intern("Exception"));
1449
+ }
1450
+ return rubyExceptionClass;
1451
+ }
1452
+
1453
+ /* This code checks to see if the Ruby object being raised as part
1454
+ of an exception inherits from the Ruby class Exception. If so,
1455
+ the object is simply returned. If not, then a new Ruby exception
1456
+ object is created and that will be returned to Ruby.*/
1457
+ SWIGRUNTIME VALUE
1458
+ SWIG_Ruby_ExceptionType(swig_type_info *desc, VALUE obj) {
1459
+ VALUE exceptionClass = getExceptionClass();
1460
+ if (rb_obj_is_kind_of(obj, exceptionClass)) {
1461
+ return obj;
1462
+ } else {
1463
+ return rb_exc_new3(rb_eRuntimeError, rb_obj_as_string(obj));
1464
+ }
1465
+ }
1466
+
1467
+ /* Initialize Ruby runtime support */
1468
+ SWIGRUNTIME void
1469
+ SWIG_Ruby_InitRuntime(void)
1470
+ {
1471
+ if (_mSWIG == Qnil) {
1472
+ _mSWIG = rb_define_module("SWIG");
1473
+ swig_call_id = rb_intern("call");
1474
+ swig_arity_id = rb_intern("arity");
1475
+ }
1476
+ }
1477
+
1478
+ /* Define Ruby class for C type */
1479
+ SWIGRUNTIME void
1480
+ SWIG_Ruby_define_class(swig_type_info *type)
1481
+ {
1482
+ VALUE klass;
1483
+ char *klass_name = (char *) malloc(4 + strlen(type->name) + 1);
1484
+ sprintf(klass_name, "TYPE%s", type->name);
1485
+ if (NIL_P(_cSWIG_Pointer)) {
1486
+ _cSWIG_Pointer = rb_define_class_under(_mSWIG, "Pointer", rb_cObject);
1487
+ rb_undef_method(CLASS_OF(_cSWIG_Pointer), "new");
1488
+ }
1489
+ klass = rb_define_class_under(_mSWIG, klass_name, _cSWIG_Pointer);
1490
+ free((void *) klass_name);
1491
+ }
1492
+
1493
+ /* Create a new pointer object */
1494
+ SWIGRUNTIME VALUE
1495
+ SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int flags)
1496
+ {
1497
+ int own = flags & SWIG_POINTER_OWN;
1498
+ int track;
1499
+ char *klass_name;
1500
+ swig_class *sklass;
1501
+ VALUE klass;
1502
+ VALUE obj;
1503
+
1504
+ if (!ptr)
1505
+ return Qnil;
1506
+
1507
+ if (type->clientdata) {
1508
+ sklass = (swig_class *) type->clientdata;
1509
+
1510
+ /* Are we tracking this class and have we already returned this Ruby object? */
1511
+ track = sklass->trackObjects;
1512
+ if (track) {
1513
+ obj = SWIG_RubyInstanceFor(ptr);
1514
+
1515
+ /* Check the object's type and make sure it has the correct type.
1516
+ It might not in cases where methods do things like
1517
+ downcast methods. */
1518
+ if (obj != Qnil) {
1519
+ VALUE value = rb_iv_get(obj, "@__swigtype__");
1520
+ const char* type_name = RSTRING_PTR(value);
1521
+
1522
+ if (strcmp(type->name, type_name) == 0) {
1523
+ return obj;
1524
+ }
1525
+ }
1526
+ }
1527
+
1528
+ /* Create a new Ruby object */
1529
+ obj = Data_Wrap_Struct(sklass->klass, VOIDFUNC(sklass->mark),
1530
+ ( own ? VOIDFUNC(sklass->destroy) :
1531
+ (track ? VOIDFUNC(SWIG_RubyRemoveTracking) : 0 )
1532
+ ), ptr);
1533
+
1534
+ /* If tracking is on for this class then track this object. */
1535
+ if (track) {
1536
+ SWIG_RubyAddTracking(ptr, obj);
1537
+ }
1538
+ } else {
1539
+ klass_name = (char *) malloc(4 + strlen(type->name) + 1);
1540
+ sprintf(klass_name, "TYPE%s", type->name);
1541
+ klass = rb_const_get(_mSWIG, rb_intern(klass_name));
1542
+ free((void *) klass_name);
1543
+ obj = Data_Wrap_Struct(klass, 0, 0, ptr);
1544
+ }
1545
+ rb_iv_set(obj, "@__swigtype__", rb_str_new2(type->name));
1546
+
1547
+ return obj;
1548
+ }
1549
+
1550
+ /* Create a new class instance (always owned) */
1551
+ SWIGRUNTIME VALUE
1552
+ SWIG_Ruby_NewClassInstance(VALUE klass, swig_type_info *type)
1553
+ {
1554
+ VALUE obj;
1555
+ swig_class *sklass = (swig_class *) type->clientdata;
1556
+ obj = Data_Wrap_Struct(klass, VOIDFUNC(sklass->mark), VOIDFUNC(sklass->destroy), 0);
1557
+ rb_iv_set(obj, "@__swigtype__", rb_str_new2(type->name));
1558
+ return obj;
1559
+ }
1560
+
1561
+ /* Get type mangle from class name */
1562
+ SWIGRUNTIMEINLINE char *
1563
+ SWIG_Ruby_MangleStr(VALUE obj)
1564
+ {
1565
+ VALUE stype = rb_iv_get(obj, "@__swigtype__");
1566
+ return StringValuePtr(stype);
1567
+ }
1568
+
1569
+ /* Acquire a pointer value */
1570
+ typedef void (*ruby_owntype)(void*);
1571
+
1572
+ SWIGRUNTIME ruby_owntype
1573
+ SWIG_Ruby_AcquirePtr(VALUE obj, ruby_owntype own) {
1574
+ if (obj) {
1575
+ ruby_owntype oldown = RDATA(obj)->dfree;
1576
+ RDATA(obj)->dfree = own;
1577
+ return oldown;
1578
+ } else {
1579
+ return 0;
1580
+ }
1581
+ }
1582
+
1583
+ /* Convert a pointer value */
1584
+ SWIGRUNTIME int
1585
+ SWIG_Ruby_ConvertPtrAndOwn(VALUE obj, void **ptr, swig_type_info *ty, int flags, ruby_owntype *own)
1586
+ {
1587
+ char *c;
1588
+ swig_cast_info *tc;
1589
+ void *vptr = 0;
1590
+
1591
+ /* Grab the pointer */
1592
+ if (NIL_P(obj)) {
1593
+ *ptr = 0;
1594
+ return SWIG_OK;
1595
+ } else {
1596
+ if (TYPE(obj) != T_DATA) {
1597
+ return SWIG_ERROR;
1598
+ }
1599
+ Data_Get_Struct(obj, void, vptr);
1600
+ }
1601
+
1602
+ if (own) *own = RDATA(obj)->dfree;
1603
+
1604
+ /* Check to see if the input object is giving up ownership
1605
+ of the underlying C struct or C++ object. If so then we
1606
+ need to reset the destructor since the Ruby object no
1607
+ longer owns the underlying C++ object.*/
1608
+ if (flags & SWIG_POINTER_DISOWN) {
1609
+ /* Is tracking on for this class? */
1610
+ int track = 0;
1611
+ if (ty && ty->clientdata) {
1612
+ swig_class *sklass = (swig_class *) ty->clientdata;
1613
+ track = sklass->trackObjects;
1614
+ }
1615
+
1616
+ if (track) {
1617
+ /* We are tracking objects for this class. Thus we change the destructor
1618
+ * to SWIG_RubyRemoveTracking. This allows us to
1619
+ * remove the mapping from the C++ to Ruby object
1620
+ * when the Ruby object is garbage collected. If we don't
1621
+ * do this, then it is possible we will return a reference
1622
+ * to a Ruby object that no longer exists thereby crashing Ruby. */
1623
+ RDATA(obj)->dfree = SWIG_RubyRemoveTracking;
1624
+ } else {
1625
+ RDATA(obj)->dfree = 0;
1626
+ }
1627
+ }
1628
+
1629
+ /* Do type-checking if type info was provided */
1630
+ if (ty) {
1631
+ if (ty->clientdata) {
1632
+ if (rb_obj_is_kind_of(obj, ((swig_class *) (ty->clientdata))->klass)) {
1633
+ if (vptr == 0) {
1634
+ /* The object has already been deleted */
1635
+ return SWIG_ObjectPreviouslyDeletedError;
1636
+ }
1637
+ *ptr = vptr;
1638
+ return SWIG_OK;
1639
+ }
1640
+ }
1641
+ if ((c = SWIG_MangleStr(obj)) == NULL) {
1642
+ return SWIG_ERROR;
1643
+ }
1644
+ tc = SWIG_TypeCheck(c, ty);
1645
+ if (!tc) {
1646
+ return SWIG_ERROR;
1647
+ } else {
1648
+ int newmemory = 0;
1649
+ *ptr = SWIG_TypeCast(tc, vptr, &newmemory);
1650
+ assert(!newmemory); /* newmemory handling not yet implemented */
1651
+ }
1652
+ } else {
1653
+ *ptr = vptr;
1654
+ }
1655
+
1656
+ return SWIG_OK;
1657
+ }
1658
+
1659
+ /* Check convert */
1660
+ SWIGRUNTIMEINLINE int
1661
+ SWIG_Ruby_CheckConvert(VALUE obj, swig_type_info *ty)
1662
+ {
1663
+ char *c = SWIG_MangleStr(obj);
1664
+ if (!c) return 0;
1665
+ return SWIG_TypeCheck(c,ty) != 0;
1666
+ }
1667
+
1668
+ SWIGRUNTIME VALUE
1669
+ SWIG_Ruby_NewPackedObj(void *ptr, int sz, swig_type_info *type) {
1670
+ char result[1024];
1671
+ char *r = result;
1672
+ if ((2*sz + 1 + strlen(type->name)) > 1000) return 0;
1673
+ *(r++) = '_';
1674
+ r = SWIG_PackData(r, ptr, sz);
1675
+ strcpy(r, type->name);
1676
+ return rb_str_new2(result);
1677
+ }
1678
+
1679
+ /* Convert a packed value value */
1680
+ SWIGRUNTIME int
1681
+ SWIG_Ruby_ConvertPacked(VALUE obj, void *ptr, int sz, swig_type_info *ty) {
1682
+ swig_cast_info *tc;
1683
+ const char *c;
1684
+
1685
+ if (TYPE(obj) != T_STRING) goto type_error;
1686
+ c = StringValuePtr(obj);
1687
+ /* Pointer values must start with leading underscore */
1688
+ if (*c != '_') goto type_error;
1689
+ c++;
1690
+ c = SWIG_UnpackData(c, ptr, sz);
1691
+ if (ty) {
1692
+ tc = SWIG_TypeCheck(c, ty);
1693
+ if (!tc) goto type_error;
1694
+ }
1695
+ return SWIG_OK;
1696
+
1697
+ type_error:
1698
+ return SWIG_ERROR;
1699
+ }
1700
+
1701
+ SWIGRUNTIME swig_module_info *
1702
+ SWIG_Ruby_GetModule(void *SWIGUNUSEDPARM(clientdata))
1703
+ {
1704
+ VALUE pointer;
1705
+ swig_module_info *ret = 0;
1706
+ VALUE verbose = rb_gv_get("VERBOSE");
1707
+
1708
+ /* temporarily disable warnings, since the pointer check causes warnings with 'ruby -w' */
1709
+ rb_gv_set("VERBOSE", Qfalse);
1710
+
1711
+ /* first check if pointer already created */
1712
+ pointer = rb_gv_get("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME);
1713
+ if (pointer != Qnil) {
1714
+ Data_Get_Struct(pointer, swig_module_info, ret);
1715
+ }
1716
+
1717
+ /* reinstate warnings */
1718
+ rb_gv_set("VERBOSE", verbose);
1719
+ return ret;
1720
+ }
1721
+
1722
+ SWIGRUNTIME void
1723
+ SWIG_Ruby_SetModule(swig_module_info *pointer)
1724
+ {
1725
+ /* register a new class */
1726
+ VALUE cl = rb_define_class("swig_runtime_data", rb_cObject);
1727
+ /* create and store the structure pointer to a global variable */
1728
+ swig_runtime_data_type_pointer = Data_Wrap_Struct(cl, 0, 0, pointer);
1729
+ rb_define_readonly_variable("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, &swig_runtime_data_type_pointer);
1730
+ }
1731
+
1732
+ /* This function can be used to check whether a proc or method or similarly
1733
+ callable function has been passed. Usually used in a %typecheck, like:
1734
+
1735
+ %typecheck(c_callback_t, precedence=SWIG_TYPECHECK_POINTER) {
1736
+ $result = SWIG_Ruby_isCallable( $input );
1737
+ }
1738
+ */
1739
+ SWIGINTERN
1740
+ int SWIG_Ruby_isCallable( VALUE proc )
1741
+ {
1742
+ if ( rb_respond_to( proc, swig_call_id ) )
1743
+ return 1;
1744
+ return 0;
1745
+ }
1746
+
1747
+ /* This function can be used to check the arity (number of arguments)
1748
+ a proc or method can take. Usually used in a %typecheck.
1749
+ Valid arities will be that equal to minimal or those < 0
1750
+ which indicate a variable number of parameters at the end.
1751
+ */
1752
+ SWIGINTERN
1753
+ int SWIG_Ruby_arity( VALUE proc, int minimal )
1754
+ {
1755
+ if ( rb_respond_to( proc, swig_arity_id ) )
1756
+ {
1757
+ VALUE num = rb_funcall( proc, swig_arity_id, 0 );
1758
+ int arity = NUM2INT(num);
1759
+ if ( arity < 0 && (arity+1) < -minimal ) return 1;
1760
+ if ( arity == minimal ) return 1;
1761
+ return 1;
1762
+ }
1763
+ return 0;
1764
+ }
1765
+
1766
+
1767
+ #ifdef __cplusplus
1768
+ }
1769
+ #endif
1770
+
1771
+
1772
+
1773
+ #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0)
1774
+
1775
+ #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else
1776
+
1777
+
1778
+
1779
+ /* -------- TYPES TABLE (BEGIN) -------- */
1780
+
1781
+ #define SWIGTYPE_p_DoubleArray swig_types[0]
1782
+ #define SWIGTYPE_p_IntArray swig_types[1]
1783
+ #define SWIGTYPE_p_char swig_types[2]
1784
+ #define SWIGTYPE_p_double swig_types[3]
1785
+ #define SWIGTYPE_p_f_p_void_int_int_p_q_const__double_int_p_q_const__int_int_p_p_char__void swig_types[4]
1786
+ #define SWIGTYPE_p_int swig_types[5]
1787
+ #define SWIGTYPE_p_void swig_types[6]
1788
+ static swig_type_info *swig_types[8];
1789
+ static swig_module_info swig_module = {swig_types, 7, 0, 0, 0, 0};
1790
+ #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
1791
+ #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
1792
+
1793
+ /* -------- TYPES TABLE (END) -------- */
1794
+
1795
+ #define SWIG_init Init_cbc_wrapper
1796
+ #define SWIG_name "Cbc_wrapper"
1797
+
1798
+ static VALUE mCbc_wrapper;
1799
+
1800
+ #define SWIG_RUBY_THREAD_BEGIN_BLOCK
1801
+ #define SWIG_RUBY_THREAD_END_BLOCK
1802
+
1803
+
1804
+ #define SWIGVERSION 0x020011
1805
+ #define SWIG_VERSION SWIGVERSION
1806
+
1807
+
1808
+ #define SWIG_as_voidptr(a) (void *)((const void *)(a))
1809
+ #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),(void**)(a))
1810
+
1811
+
1812
+ #ifdef __cplusplus
1813
+ extern "C" {
1814
+ #endif
1815
+
1816
+ // Ruby 1.9 changed the file name of this header
1817
+ #ifdef HAVE_RUBY_IO_H
1818
+ #include "ruby/io.h"
1819
+ #else
1820
+ #include "rubyio.h"
1821
+ #endif
1822
+
1823
+ #ifdef __cplusplus
1824
+ }
1825
+ #endif
1826
+
1827
+
1828
+ #ifdef __cplusplus
1829
+ extern "C" {
1830
+ #endif
1831
+ #ifdef HAVE_SYS_TIME_H
1832
+ # include <sys/time.h>
1833
+ struct timeval rb_time_timeval(VALUE);
1834
+ #endif
1835
+ #ifdef __cplusplus
1836
+ }
1837
+ #endif
1838
+
1839
+
1840
+ #include "Coin_C_defines.h"
1841
+ #include "Cbc_C_Interface.h"
1842
+
1843
+
1844
+ typedef int IntArray;
1845
+
1846
+
1847
+ SWIGINTERN VALUE
1848
+ SWIG_ruby_failed(void)
1849
+ {
1850
+ return Qnil;
1851
+ }
1852
+
1853
+
1854
+ /*@SWIG:/usr/share/swig2.0/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
1855
+ SWIGINTERN VALUE SWIG_AUX_NUM2ULONG(VALUE *args)
1856
+ {
1857
+ VALUE obj = args[0];
1858
+ VALUE type = TYPE(obj);
1859
+ unsigned long *res = (unsigned long *)(args[1]);
1860
+ *res = type == T_FIXNUM ? NUM2ULONG(obj) : rb_big2ulong(obj);
1861
+ return obj;
1862
+ }
1863
+ /*@SWIG@*/
1864
+
1865
+ SWIGINTERN int
1866
+ SWIG_AsVal_unsigned_SS_long (VALUE obj, unsigned long *val)
1867
+ {
1868
+ VALUE type = TYPE(obj);
1869
+ if ((type == T_FIXNUM) || (type == T_BIGNUM)) {
1870
+ unsigned long v;
1871
+ VALUE a[2];
1872
+ a[0] = obj;
1873
+ a[1] = (VALUE)(&v);
1874
+ if (rb_rescue(RUBY_METHOD_FUNC(SWIG_AUX_NUM2ULONG), (VALUE)a, RUBY_METHOD_FUNC(SWIG_ruby_failed), 0) != Qnil) {
1875
+ if (val) *val = v;
1876
+ return SWIG_OK;
1877
+ }
1878
+ }
1879
+ return SWIG_TypeError;
1880
+ }
1881
+
1882
+
1883
+ SWIGINTERNINLINE int
1884
+ SWIG_AsVal_size_t (VALUE obj, size_t *val)
1885
+ {
1886
+ unsigned long v;
1887
+ int res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0);
1888
+ if (SWIG_IsOK(res) && val) *val = (size_t)(v);
1889
+ return res;
1890
+ }
1891
+
1892
+ SWIGINTERN IntArray *new_IntArray(size_t nelements){
1893
+ return (int *)malloc((nelements)*sizeof(int));
1894
+ }
1895
+ SWIGINTERN int IntArray___getitem__(IntArray *self,size_t index){
1896
+ return self[index];
1897
+ }
1898
+
1899
+ #include <limits.h>
1900
+ #if !defined(SWIG_NO_LLONG_MAX)
1901
+ # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
1902
+ # define LLONG_MAX __LONG_LONG_MAX__
1903
+ # define LLONG_MIN (-LLONG_MAX - 1LL)
1904
+ # define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
1905
+ # endif
1906
+ #endif
1907
+
1908
+
1909
+ #define SWIG_From_long LONG2NUM
1910
+
1911
+
1912
+ SWIGINTERNINLINE VALUE
1913
+ SWIG_From_int (int value)
1914
+ {
1915
+ return SWIG_From_long (value);
1916
+ }
1917
+
1918
+
1919
+ /*@SWIG:/usr/share/swig2.0/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
1920
+ SWIGINTERN VALUE SWIG_AUX_NUM2LONG(VALUE *args)
1921
+ {
1922
+ VALUE obj = args[0];
1923
+ VALUE type = TYPE(obj);
1924
+ long *res = (long *)(args[1]);
1925
+ *res = type == T_FIXNUM ? NUM2LONG(obj) : rb_big2long(obj);
1926
+ return obj;
1927
+ }
1928
+ /*@SWIG@*/
1929
+
1930
+ SWIGINTERN int
1931
+ SWIG_AsVal_long (VALUE obj, long* val)
1932
+ {
1933
+ VALUE type = TYPE(obj);
1934
+ if ((type == T_FIXNUM) || (type == T_BIGNUM)) {
1935
+ long v;
1936
+ VALUE a[2];
1937
+ a[0] = obj;
1938
+ a[1] = (VALUE)(&v);
1939
+ if (rb_rescue(RUBY_METHOD_FUNC(SWIG_AUX_NUM2LONG), (VALUE)a, RUBY_METHOD_FUNC(SWIG_ruby_failed), 0) != Qnil) {
1940
+ if (val) *val = v;
1941
+ return SWIG_OK;
1942
+ }
1943
+ }
1944
+ return SWIG_TypeError;
1945
+ }
1946
+
1947
+
1948
+ SWIGINTERN int
1949
+ SWIG_AsVal_int (VALUE obj, int *val)
1950
+ {
1951
+ long v;
1952
+ int res = SWIG_AsVal_long (obj, &v);
1953
+ if (SWIG_IsOK(res)) {
1954
+ if ((v < INT_MIN || v > INT_MAX)) {
1955
+ return SWIG_OverflowError;
1956
+ } else {
1957
+ if (val) *val = (int)(v);
1958
+ }
1959
+ }
1960
+ return res;
1961
+ }
1962
+
1963
+ SWIGINTERN void IntArray___setitem__(IntArray *self,size_t index,int value){
1964
+ self[index] = value;
1965
+ }
1966
+ SWIGINTERN int *IntArray_cast(IntArray *self){
1967
+ return self;
1968
+ }
1969
+ SWIGINTERN IntArray *IntArray_frompointer(int *t){
1970
+ return (IntArray *)(t);
1971
+ }
1972
+
1973
+ typedef double DoubleArray;
1974
+
1975
+ SWIGINTERN DoubleArray *new_DoubleArray(size_t nelements){
1976
+ return (double *)malloc((nelements)*sizeof(double));
1977
+ }
1978
+ SWIGINTERN double DoubleArray___getitem__(DoubleArray *self,size_t index){
1979
+ return self[index];
1980
+ }
1981
+
1982
+ #define SWIG_From_double rb_float_new
1983
+
1984
+
1985
+ /*@SWIG:/usr/share/swig2.0/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
1986
+ SWIGINTERN VALUE SWIG_AUX_NUM2DBL(VALUE *args)
1987
+ {
1988
+ VALUE obj = args[0];
1989
+ VALUE type = TYPE(obj);
1990
+ double *res = (double *)(args[1]);
1991
+ *res = NUM2DBL(obj);
1992
+ return obj;
1993
+ }
1994
+ /*@SWIG@*/
1995
+
1996
+ SWIGINTERN int
1997
+ SWIG_AsVal_double (VALUE obj, double *val)
1998
+ {
1999
+ VALUE type = TYPE(obj);
2000
+ if ((type == T_FLOAT) || (type == T_FIXNUM) || (type == T_BIGNUM)) {
2001
+ double v;
2002
+ VALUE a[2];
2003
+ a[0] = obj;
2004
+ a[1] = (VALUE)(&v);
2005
+ if (rb_rescue(RUBY_METHOD_FUNC(SWIG_AUX_NUM2DBL), (VALUE)a, RUBY_METHOD_FUNC(SWIG_ruby_failed), 0) != Qnil) {
2006
+ if (val) *val = v;
2007
+ return SWIG_OK;
2008
+ }
2009
+ }
2010
+ return SWIG_TypeError;
2011
+ }
2012
+
2013
+ SWIGINTERN void DoubleArray___setitem__(DoubleArray *self,size_t index,double value){
2014
+ self[index] = value;
2015
+ }
2016
+ SWIGINTERN double *DoubleArray_cast(DoubleArray *self){
2017
+ return self;
2018
+ }
2019
+ SWIGINTERN DoubleArray *DoubleArray_frompointer(double *t){
2020
+ return (DoubleArray *)(t);
2021
+ }
2022
+
2023
+ SWIGINTERN swig_type_info*
2024
+ SWIG_pchar_descriptor(void)
2025
+ {
2026
+ static int init = 0;
2027
+ static swig_type_info* info = 0;
2028
+ if (!init) {
2029
+ info = SWIG_TypeQuery("_p_char");
2030
+ init = 1;
2031
+ }
2032
+ return info;
2033
+ }
2034
+
2035
+
2036
+ SWIGINTERNINLINE VALUE
2037
+ SWIG_FromCharPtrAndSize(const char* carray, size_t size)
2038
+ {
2039
+ if (carray) {
2040
+ if (size > LONG_MAX) {
2041
+ swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
2042
+ return pchar_descriptor ?
2043
+ SWIG_NewPointerObj((char *)(carray), pchar_descriptor, 0) : Qnil;
2044
+ } else {
2045
+ return rb_str_new(carray, (long)(size));
2046
+ }
2047
+ } else {
2048
+ return Qnil;
2049
+ }
2050
+ }
2051
+
2052
+
2053
+ SWIGINTERNINLINE VALUE
2054
+ SWIG_FromCharPtr(const char *cptr)
2055
+ {
2056
+ return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
2057
+ }
2058
+
2059
+
2060
+ SWIGINTERN int
2061
+ SWIG_AsCharPtrAndSize(VALUE obj, char** cptr, size_t* psize, int *alloc)
2062
+ {
2063
+ if (TYPE(obj) == T_STRING) {
2064
+ char *cstr = StringValuePtr(obj);
2065
+ size_t size = RSTRING_LEN(obj) + 1;
2066
+ if (cptr) {
2067
+ if (alloc) {
2068
+ if (*alloc == SWIG_NEWOBJ) {
2069
+ *cptr = (char *)memcpy((char *)malloc((size)*sizeof(char)), cstr, sizeof(char)*(size));
2070
+ } else {
2071
+ *cptr = cstr;
2072
+ *alloc = SWIG_OLDOBJ;
2073
+ }
2074
+ }
2075
+ }
2076
+ if (psize) *psize = size;
2077
+ return SWIG_OK;
2078
+ } else {
2079
+ swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
2080
+ if (pchar_descriptor) {
2081
+ void* vptr = 0;
2082
+ if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
2083
+ if (cptr) *cptr = (char *)vptr;
2084
+ if (psize) *psize = vptr ? (strlen((char*)vptr) + 1) : 0;
2085
+ if (alloc) *alloc = SWIG_OLDOBJ;
2086
+ return SWIG_OK;
2087
+ }
2088
+ }
2089
+ }
2090
+ return SWIG_TypeError;
2091
+ }
2092
+
2093
+
2094
+
2095
+
2096
+
2097
+ SWIGINTERNINLINE VALUE
2098
+ SWIG_From_unsigned_SS_long (unsigned long value)
2099
+ {
2100
+ return ULONG2NUM(value);
2101
+ }
2102
+
2103
+
2104
+ SWIGINTERNINLINE VALUE
2105
+ SWIG_From_size_t (size_t value)
2106
+ {
2107
+ return SWIG_From_unsigned_SS_long ((unsigned long)(value));
2108
+ }
2109
+
2110
+ static swig_class SwigClassIntArray;
2111
+
2112
+ #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
2113
+ SWIGINTERN VALUE
2114
+ _wrap_IntArray_allocate(VALUE self) {
2115
+ #else
2116
+ SWIGINTERN VALUE
2117
+ _wrap_IntArray_allocate(int argc, VALUE *argv, VALUE self) {
2118
+ #endif
2119
+
2120
+
2121
+ VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_IntArray);
2122
+ #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
2123
+ rb_obj_call_init(vresult, argc, argv);
2124
+ #endif
2125
+ return vresult;
2126
+ }
2127
+
2128
+
2129
+ SWIGINTERN VALUE
2130
+ _wrap_new_IntArray(int argc, VALUE *argv, VALUE self) {
2131
+ size_t arg1 ;
2132
+ size_t val1 ;
2133
+ int ecode1 = 0 ;
2134
+ IntArray *result = 0 ;
2135
+
2136
+ if ((argc < 1) || (argc > 1)) {
2137
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2138
+ }
2139
+ ecode1 = SWIG_AsVal_size_t(argv[0], &val1);
2140
+ if (!SWIG_IsOK(ecode1)) {
2141
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "size_t","IntArray", 1, argv[0] ));
2142
+ }
2143
+ arg1 = (size_t)(val1);
2144
+ result = (IntArray *)new_IntArray(arg1);
2145
+ DATA_PTR(self) = result;
2146
+ return self;
2147
+ fail:
2148
+ return Qnil;
2149
+ }
2150
+
2151
+
2152
+ SWIGINTERN void delete_IntArray(IntArray *self){
2153
+ free((char*)self);
2154
+ }
2155
+ SWIGINTERN void
2156
+ free_IntArray(IntArray *arg1) {
2157
+ delete_IntArray(arg1);
2158
+ }
2159
+
2160
+
2161
+ /*
2162
+ Document-method: Cbc_wrapper::IntArray.[]
2163
+
2164
+ call-seq:
2165
+ [](index) -> int
2166
+
2167
+ Element accessor/slicing.
2168
+ */
2169
+ SWIGINTERN VALUE
2170
+ _wrap_IntArray___getitem__(int argc, VALUE *argv, VALUE self) {
2171
+ IntArray *arg1 = (IntArray *) 0 ;
2172
+ size_t arg2 ;
2173
+ void *argp1 = 0 ;
2174
+ int res1 = 0 ;
2175
+ size_t val2 ;
2176
+ int ecode2 = 0 ;
2177
+ int result;
2178
+ VALUE vresult = Qnil;
2179
+
2180
+ if ((argc < 1) || (argc > 1)) {
2181
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2182
+ }
2183
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_IntArray, 0 | 0 );
2184
+ if (!SWIG_IsOK(res1)) {
2185
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "IntArray *","__getitem__", 1, self ));
2186
+ }
2187
+ arg1 = (IntArray *)(argp1);
2188
+ ecode2 = SWIG_AsVal_size_t(argv[0], &val2);
2189
+ if (!SWIG_IsOK(ecode2)) {
2190
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","__getitem__", 2, argv[0] ));
2191
+ }
2192
+ arg2 = (size_t)(val2);
2193
+ result = (int)IntArray___getitem__(arg1,arg2);
2194
+ vresult = SWIG_From_int((int)(result));
2195
+ return vresult;
2196
+ fail:
2197
+ return Qnil;
2198
+ }
2199
+
2200
+
2201
+
2202
+ /*
2203
+ Document-method: Cbc_wrapper::IntArray.[]=
2204
+
2205
+ call-seq:
2206
+ []=(index, value)
2207
+
2208
+ Element setter/slicing.
2209
+ */
2210
+ SWIGINTERN VALUE
2211
+ _wrap_IntArray___setitem__(int argc, VALUE *argv, VALUE self) {
2212
+ IntArray *arg1 = (IntArray *) 0 ;
2213
+ size_t arg2 ;
2214
+ int arg3 ;
2215
+ void *argp1 = 0 ;
2216
+ int res1 = 0 ;
2217
+ size_t val2 ;
2218
+ int ecode2 = 0 ;
2219
+ int val3 ;
2220
+ int ecode3 = 0 ;
2221
+
2222
+ if ((argc < 2) || (argc > 2)) {
2223
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
2224
+ }
2225
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_IntArray, 0 | 0 );
2226
+ if (!SWIG_IsOK(res1)) {
2227
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "IntArray *","__setitem__", 1, self ));
2228
+ }
2229
+ arg1 = (IntArray *)(argp1);
2230
+ ecode2 = SWIG_AsVal_size_t(argv[0], &val2);
2231
+ if (!SWIG_IsOK(ecode2)) {
2232
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","__setitem__", 2, argv[0] ));
2233
+ }
2234
+ arg2 = (size_t)(val2);
2235
+ ecode3 = SWIG_AsVal_int(argv[1], &val3);
2236
+ if (!SWIG_IsOK(ecode3)) {
2237
+ SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int","__setitem__", 3, argv[1] ));
2238
+ }
2239
+ arg3 = (int)(val3);
2240
+ IntArray___setitem__(arg1,arg2,arg3);
2241
+ return Qnil;
2242
+ fail:
2243
+ return Qnil;
2244
+ }
2245
+
2246
+
2247
+ SWIGINTERN VALUE
2248
+ _wrap_IntArray_cast(int argc, VALUE *argv, VALUE self) {
2249
+ IntArray *arg1 = (IntArray *) 0 ;
2250
+ void *argp1 = 0 ;
2251
+ int res1 = 0 ;
2252
+ int *result = 0 ;
2253
+ VALUE vresult = Qnil;
2254
+
2255
+ if ((argc < 0) || (argc > 0)) {
2256
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2257
+ }
2258
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_IntArray, 0 | 0 );
2259
+ if (!SWIG_IsOK(res1)) {
2260
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "IntArray *","cast", 1, self ));
2261
+ }
2262
+ arg1 = (IntArray *)(argp1);
2263
+ result = (int *)IntArray_cast(arg1);
2264
+ vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_int, 0 | 0 );
2265
+ return vresult;
2266
+ fail:
2267
+ return Qnil;
2268
+ }
2269
+
2270
+
2271
+ SWIGINTERN VALUE
2272
+ _wrap_IntArray_frompointer(int argc, VALUE *argv, VALUE self) {
2273
+ int *arg1 = (int *) 0 ;
2274
+ void *argp1 = 0 ;
2275
+ int res1 = 0 ;
2276
+ IntArray *result = 0 ;
2277
+ VALUE vresult = Qnil;
2278
+
2279
+ if ((argc < 1) || (argc > 1)) {
2280
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2281
+ }
2282
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_int, 0 | 0 );
2283
+ if (!SWIG_IsOK(res1)) {
2284
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "int *","IntArray_frompointer", 1, argv[0] ));
2285
+ }
2286
+ arg1 = (int *)(argp1);
2287
+ result = (IntArray *)IntArray_frompointer(arg1);
2288
+ vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IntArray, 0 | 0 );
2289
+ return vresult;
2290
+ fail:
2291
+ return Qnil;
2292
+ }
2293
+
2294
+
2295
+ static swig_class SwigClassDoubleArray;
2296
+
2297
+ #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
2298
+ SWIGINTERN VALUE
2299
+ _wrap_DoubleArray_allocate(VALUE self) {
2300
+ #else
2301
+ SWIGINTERN VALUE
2302
+ _wrap_DoubleArray_allocate(int argc, VALUE *argv, VALUE self) {
2303
+ #endif
2304
+
2305
+
2306
+ VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_DoubleArray);
2307
+ #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
2308
+ rb_obj_call_init(vresult, argc, argv);
2309
+ #endif
2310
+ return vresult;
2311
+ }
2312
+
2313
+
2314
+ SWIGINTERN VALUE
2315
+ _wrap_new_DoubleArray(int argc, VALUE *argv, VALUE self) {
2316
+ size_t arg1 ;
2317
+ size_t val1 ;
2318
+ int ecode1 = 0 ;
2319
+ DoubleArray *result = 0 ;
2320
+
2321
+ if ((argc < 1) || (argc > 1)) {
2322
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2323
+ }
2324
+ ecode1 = SWIG_AsVal_size_t(argv[0], &val1);
2325
+ if (!SWIG_IsOK(ecode1)) {
2326
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "size_t","DoubleArray", 1, argv[0] ));
2327
+ }
2328
+ arg1 = (size_t)(val1);
2329
+ result = (DoubleArray *)new_DoubleArray(arg1);
2330
+ DATA_PTR(self) = result;
2331
+ return self;
2332
+ fail:
2333
+ return Qnil;
2334
+ }
2335
+
2336
+
2337
+ SWIGINTERN void delete_DoubleArray(DoubleArray *self){
2338
+ free((char*)self);
2339
+ }
2340
+ SWIGINTERN void
2341
+ free_DoubleArray(DoubleArray *arg1) {
2342
+ delete_DoubleArray(arg1);
2343
+ }
2344
+
2345
+
2346
+ /*
2347
+ Document-method: Cbc_wrapper::DoubleArray.[]
2348
+
2349
+ call-seq:
2350
+ [](index) -> double
2351
+
2352
+ Element accessor/slicing.
2353
+ */
2354
+ SWIGINTERN VALUE
2355
+ _wrap_DoubleArray___getitem__(int argc, VALUE *argv, VALUE self) {
2356
+ DoubleArray *arg1 = (DoubleArray *) 0 ;
2357
+ size_t arg2 ;
2358
+ void *argp1 = 0 ;
2359
+ int res1 = 0 ;
2360
+ size_t val2 ;
2361
+ int ecode2 = 0 ;
2362
+ double result;
2363
+ VALUE vresult = Qnil;
2364
+
2365
+ if ((argc < 1) || (argc > 1)) {
2366
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2367
+ }
2368
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_DoubleArray, 0 | 0 );
2369
+ if (!SWIG_IsOK(res1)) {
2370
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "DoubleArray *","__getitem__", 1, self ));
2371
+ }
2372
+ arg1 = (DoubleArray *)(argp1);
2373
+ ecode2 = SWIG_AsVal_size_t(argv[0], &val2);
2374
+ if (!SWIG_IsOK(ecode2)) {
2375
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","__getitem__", 2, argv[0] ));
2376
+ }
2377
+ arg2 = (size_t)(val2);
2378
+ result = (double)DoubleArray___getitem__(arg1,arg2);
2379
+ vresult = SWIG_From_double((double)(result));
2380
+ return vresult;
2381
+ fail:
2382
+ return Qnil;
2383
+ }
2384
+
2385
+
2386
+
2387
+ /*
2388
+ Document-method: Cbc_wrapper::DoubleArray.[]=
2389
+
2390
+ call-seq:
2391
+ []=(index, value)
2392
+
2393
+ Element setter/slicing.
2394
+ */
2395
+ SWIGINTERN VALUE
2396
+ _wrap_DoubleArray___setitem__(int argc, VALUE *argv, VALUE self) {
2397
+ DoubleArray *arg1 = (DoubleArray *) 0 ;
2398
+ size_t arg2 ;
2399
+ double arg3 ;
2400
+ void *argp1 = 0 ;
2401
+ int res1 = 0 ;
2402
+ size_t val2 ;
2403
+ int ecode2 = 0 ;
2404
+ double val3 ;
2405
+ int ecode3 = 0 ;
2406
+
2407
+ if ((argc < 2) || (argc > 2)) {
2408
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
2409
+ }
2410
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_DoubleArray, 0 | 0 );
2411
+ if (!SWIG_IsOK(res1)) {
2412
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "DoubleArray *","__setitem__", 1, self ));
2413
+ }
2414
+ arg1 = (DoubleArray *)(argp1);
2415
+ ecode2 = SWIG_AsVal_size_t(argv[0], &val2);
2416
+ if (!SWIG_IsOK(ecode2)) {
2417
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","__setitem__", 2, argv[0] ));
2418
+ }
2419
+ arg2 = (size_t)(val2);
2420
+ ecode3 = SWIG_AsVal_double(argv[1], &val3);
2421
+ if (!SWIG_IsOK(ecode3)) {
2422
+ SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","__setitem__", 3, argv[1] ));
2423
+ }
2424
+ arg3 = (double)(val3);
2425
+ DoubleArray___setitem__(arg1,arg2,arg3);
2426
+ return Qnil;
2427
+ fail:
2428
+ return Qnil;
2429
+ }
2430
+
2431
+
2432
+ SWIGINTERN VALUE
2433
+ _wrap_DoubleArray_cast(int argc, VALUE *argv, VALUE self) {
2434
+ DoubleArray *arg1 = (DoubleArray *) 0 ;
2435
+ void *argp1 = 0 ;
2436
+ int res1 = 0 ;
2437
+ double *result = 0 ;
2438
+ VALUE vresult = Qnil;
2439
+
2440
+ if ((argc < 0) || (argc > 0)) {
2441
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2442
+ }
2443
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_DoubleArray, 0 | 0 );
2444
+ if (!SWIG_IsOK(res1)) {
2445
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "DoubleArray *","cast", 1, self ));
2446
+ }
2447
+ arg1 = (DoubleArray *)(argp1);
2448
+ result = (double *)DoubleArray_cast(arg1);
2449
+ vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 | 0 );
2450
+ return vresult;
2451
+ fail:
2452
+ return Qnil;
2453
+ }
2454
+
2455
+
2456
+ SWIGINTERN VALUE
2457
+ _wrap_DoubleArray_frompointer(int argc, VALUE *argv, VALUE self) {
2458
+ double *arg1 = (double *) 0 ;
2459
+ void *argp1 = 0 ;
2460
+ int res1 = 0 ;
2461
+ DoubleArray *result = 0 ;
2462
+ VALUE vresult = Qnil;
2463
+
2464
+ if ((argc < 1) || (argc > 1)) {
2465
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2466
+ }
2467
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_double, 0 | 0 );
2468
+ if (!SWIG_IsOK(res1)) {
2469
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "double *","DoubleArray_frompointer", 1, argv[0] ));
2470
+ }
2471
+ arg1 = (double *)(argp1);
2472
+ result = (DoubleArray *)DoubleArray_frompointer(arg1);
2473
+ vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DoubleArray, 0 | 0 );
2474
+ return vresult;
2475
+ fail:
2476
+ return Qnil;
2477
+ }
2478
+
2479
+
2480
+ SWIGINTERN VALUE
2481
+ _wrap_Cbc_newModel(int argc, VALUE *argv, VALUE self) {
2482
+ Cbc_Model *result = 0 ;
2483
+ VALUE vresult = Qnil;
2484
+
2485
+ if ((argc < 0) || (argc > 0)) {
2486
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2487
+ }
2488
+ result = (Cbc_Model *)Cbc_newModel();
2489
+ vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 );
2490
+ return vresult;
2491
+ fail:
2492
+ return Qnil;
2493
+ }
2494
+
2495
+
2496
+ SWIGINTERN VALUE
2497
+ _wrap_Cbc_deleteModel(int argc, VALUE *argv, VALUE self) {
2498
+ Cbc_Model *arg1 = (Cbc_Model *) 0 ;
2499
+ int res1 ;
2500
+
2501
+ if ((argc < 1) || (argc > 1)) {
2502
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2503
+ }
2504
+ res1 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg1), 0, 0);
2505
+ if (!SWIG_IsOK(res1)) {
2506
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cbc_Model *","Cbc_deleteModel", 1, argv[0] ));
2507
+ }
2508
+ Cbc_deleteModel(arg1);
2509
+ return Qnil;
2510
+ fail:
2511
+ return Qnil;
2512
+ }
2513
+
2514
+
2515
+ SWIGINTERN VALUE
2516
+ _wrap_Cbc_getVersion(int argc, VALUE *argv, VALUE self) {
2517
+ char *result = 0 ;
2518
+ VALUE vresult = Qnil;
2519
+
2520
+ if ((argc < 0) || (argc > 0)) {
2521
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2522
+ }
2523
+ result = (char *)Cbc_getVersion();
2524
+ vresult = SWIG_FromCharPtr((const char *)result);
2525
+ return vresult;
2526
+ fail:
2527
+ return Qnil;
2528
+ }
2529
+
2530
+
2531
+ SWIGINTERN VALUE
2532
+ _wrap_Cbc_loadProblem(int argc, VALUE *argv, VALUE self) {
2533
+ Cbc_Model *arg1 = (Cbc_Model *) 0 ;
2534
+ int arg2 ;
2535
+ int arg3 ;
2536
+ CoinBigIndex *arg4 = (CoinBigIndex *) 0 ;
2537
+ int *arg5 = (int *) 0 ;
2538
+ double *arg6 = (double *) 0 ;
2539
+ double *arg7 = (double *) 0 ;
2540
+ double *arg8 = (double *) 0 ;
2541
+ double *arg9 = (double *) 0 ;
2542
+ double *arg10 = (double *) 0 ;
2543
+ double *arg11 = (double *) 0 ;
2544
+ int res1 ;
2545
+ int val2 ;
2546
+ int ecode2 = 0 ;
2547
+ int val3 ;
2548
+ int ecode3 = 0 ;
2549
+ void *argp4 = 0 ;
2550
+ int res4 = 0 ;
2551
+ void *argp5 = 0 ;
2552
+ int res5 = 0 ;
2553
+ void *argp6 = 0 ;
2554
+ int res6 = 0 ;
2555
+ void *argp7 = 0 ;
2556
+ int res7 = 0 ;
2557
+ void *argp8 = 0 ;
2558
+ int res8 = 0 ;
2559
+ void *argp9 = 0 ;
2560
+ int res9 = 0 ;
2561
+ void *argp10 = 0 ;
2562
+ int res10 = 0 ;
2563
+ void *argp11 = 0 ;
2564
+ int res11 = 0 ;
2565
+
2566
+ if ((argc < 11) || (argc > 11)) {
2567
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 11)",argc); SWIG_fail;
2568
+ }
2569
+ res1 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg1), 0, 0);
2570
+ if (!SWIG_IsOK(res1)) {
2571
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cbc_Model *","Cbc_loadProblem", 1, argv[0] ));
2572
+ }
2573
+ ecode2 = SWIG_AsVal_int(argv[1], &val2);
2574
+ if (!SWIG_IsOK(ecode2)) {
2575
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","Cbc_loadProblem", 2, argv[1] ));
2576
+ }
2577
+ arg2 = (int)(val2);
2578
+ ecode3 = SWIG_AsVal_int(argv[2], &val3);
2579
+ if (!SWIG_IsOK(ecode3)) {
2580
+ SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int","Cbc_loadProblem", 3, argv[2] ));
2581
+ }
2582
+ arg3 = (int)(val3);
2583
+ res4 = SWIG_ConvertPtr(argv[3], &argp4,SWIGTYPE_p_int, 0 | 0 );
2584
+ if (!SWIG_IsOK(res4)) {
2585
+ SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "CoinBigIndex const *","Cbc_loadProblem", 4, argv[3] ));
2586
+ }
2587
+ arg4 = (CoinBigIndex *)(argp4);
2588
+ res5 = SWIG_ConvertPtr(argv[4], &argp5,SWIGTYPE_p_int, 0 | 0 );
2589
+ if (!SWIG_IsOK(res5)) {
2590
+ SWIG_exception_fail(SWIG_ArgError(res5), Ruby_Format_TypeError( "", "int const *","Cbc_loadProblem", 5, argv[4] ));
2591
+ }
2592
+ arg5 = (int *)(argp5);
2593
+ res6 = SWIG_ConvertPtr(argv[5], &argp6,SWIGTYPE_p_double, 0 | 0 );
2594
+ if (!SWIG_IsOK(res6)) {
2595
+ SWIG_exception_fail(SWIG_ArgError(res6), Ruby_Format_TypeError( "", "double const *","Cbc_loadProblem", 6, argv[5] ));
2596
+ }
2597
+ arg6 = (double *)(argp6);
2598
+ res7 = SWIG_ConvertPtr(argv[6], &argp7,SWIGTYPE_p_double, 0 | 0 );
2599
+ if (!SWIG_IsOK(res7)) {
2600
+ SWIG_exception_fail(SWIG_ArgError(res7), Ruby_Format_TypeError( "", "double const *","Cbc_loadProblem", 7, argv[6] ));
2601
+ }
2602
+ arg7 = (double *)(argp7);
2603
+ res8 = SWIG_ConvertPtr(argv[7], &argp8,SWIGTYPE_p_double, 0 | 0 );
2604
+ if (!SWIG_IsOK(res8)) {
2605
+ SWIG_exception_fail(SWIG_ArgError(res8), Ruby_Format_TypeError( "", "double const *","Cbc_loadProblem", 8, argv[7] ));
2606
+ }
2607
+ arg8 = (double *)(argp8);
2608
+ res9 = SWIG_ConvertPtr(argv[8], &argp9,SWIGTYPE_p_double, 0 | 0 );
2609
+ if (!SWIG_IsOK(res9)) {
2610
+ SWIG_exception_fail(SWIG_ArgError(res9), Ruby_Format_TypeError( "", "double const *","Cbc_loadProblem", 9, argv[8] ));
2611
+ }
2612
+ arg9 = (double *)(argp9);
2613
+ res10 = SWIG_ConvertPtr(argv[9], &argp10,SWIGTYPE_p_double, 0 | 0 );
2614
+ if (!SWIG_IsOK(res10)) {
2615
+ SWIG_exception_fail(SWIG_ArgError(res10), Ruby_Format_TypeError( "", "double const *","Cbc_loadProblem", 10, argv[9] ));
2616
+ }
2617
+ arg10 = (double *)(argp10);
2618
+ res11 = SWIG_ConvertPtr(argv[10], &argp11,SWIGTYPE_p_double, 0 | 0 );
2619
+ if (!SWIG_IsOK(res11)) {
2620
+ SWIG_exception_fail(SWIG_ArgError(res11), Ruby_Format_TypeError( "", "double const *","Cbc_loadProblem", 11, argv[10] ));
2621
+ }
2622
+ arg11 = (double *)(argp11);
2623
+ Cbc_loadProblem(arg1,arg2,arg3,(int const *)arg4,(int const *)arg5,(double const *)arg6,(double const *)arg7,(double const *)arg8,(double const *)arg9,(double const *)arg10,(double const *)arg11);
2624
+ return Qnil;
2625
+ fail:
2626
+ return Qnil;
2627
+ }
2628
+
2629
+
2630
+ SWIGINTERN VALUE
2631
+ _wrap_Cbc_readMps(int argc, VALUE *argv, VALUE self) {
2632
+ Cbc_Model *arg1 = (Cbc_Model *) 0 ;
2633
+ char *arg2 = (char *) 0 ;
2634
+ int res1 ;
2635
+ int res2 ;
2636
+ char *buf2 = 0 ;
2637
+ int alloc2 = 0 ;
2638
+ int result;
2639
+ VALUE vresult = Qnil;
2640
+
2641
+ if ((argc < 2) || (argc > 2)) {
2642
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
2643
+ }
2644
+ res1 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg1), 0, 0);
2645
+ if (!SWIG_IsOK(res1)) {
2646
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cbc_Model *","Cbc_readMps", 1, argv[0] ));
2647
+ }
2648
+ res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2);
2649
+ if (!SWIG_IsOK(res2)) {
2650
+ SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","Cbc_readMps", 2, argv[1] ));
2651
+ }
2652
+ arg2 = (char *)(buf2);
2653
+ result = (int)Cbc_readMps(arg1,(char const *)arg2);
2654
+ vresult = SWIG_From_int((int)(result));
2655
+ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2656
+ return vresult;
2657
+ fail:
2658
+ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2659
+ return Qnil;
2660
+ }
2661
+
2662
+
2663
+ SWIGINTERN VALUE
2664
+ _wrap_Cbc_writeMps(int argc, VALUE *argv, VALUE self) {
2665
+ Cbc_Model *arg1 = (Cbc_Model *) 0 ;
2666
+ char *arg2 = (char *) 0 ;
2667
+ int res1 ;
2668
+ int res2 ;
2669
+ char *buf2 = 0 ;
2670
+ int alloc2 = 0 ;
2671
+
2672
+ if ((argc < 2) || (argc > 2)) {
2673
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
2674
+ }
2675
+ res1 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg1), 0, 0);
2676
+ if (!SWIG_IsOK(res1)) {
2677
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cbc_Model *","Cbc_writeMps", 1, argv[0] ));
2678
+ }
2679
+ res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2);
2680
+ if (!SWIG_IsOK(res2)) {
2681
+ SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","Cbc_writeMps", 2, argv[1] ));
2682
+ }
2683
+ arg2 = (char *)(buf2);
2684
+ Cbc_writeMps(arg1,(char const *)arg2);
2685
+ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2686
+ return Qnil;
2687
+ fail:
2688
+ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2689
+ return Qnil;
2690
+ }
2691
+
2692
+
2693
+ SWIGINTERN VALUE
2694
+ _wrap_Cbc_setInitialSolution(int argc, VALUE *argv, VALUE self) {
2695
+ Cbc_Model *arg1 = (Cbc_Model *) 0 ;
2696
+ double *arg2 = (double *) 0 ;
2697
+ int res1 ;
2698
+ void *argp2 = 0 ;
2699
+ int res2 = 0 ;
2700
+
2701
+ if ((argc < 2) || (argc > 2)) {
2702
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
2703
+ }
2704
+ res1 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg1), 0, 0);
2705
+ if (!SWIG_IsOK(res1)) {
2706
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cbc_Model *","Cbc_setInitialSolution", 1, argv[0] ));
2707
+ }
2708
+ res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_double, 0 | 0 );
2709
+ if (!SWIG_IsOK(res2)) {
2710
+ SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "double const *","Cbc_setInitialSolution", 2, argv[1] ));
2711
+ }
2712
+ arg2 = (double *)(argp2);
2713
+ Cbc_setInitialSolution(arg1,(double const *)arg2);
2714
+ return Qnil;
2715
+ fail:
2716
+ return Qnil;
2717
+ }
2718
+
2719
+
2720
+ SWIGINTERN VALUE
2721
+ _wrap_Cbc_problemName(int argc, VALUE *argv, VALUE self) {
2722
+ Cbc_Model *arg1 = (Cbc_Model *) 0 ;
2723
+ int arg2 ;
2724
+ char *arg3 = (char *) 0 ;
2725
+ int res1 ;
2726
+ int val2 ;
2727
+ int ecode2 = 0 ;
2728
+ int res3 ;
2729
+ char *buf3 = 0 ;
2730
+ int alloc3 = 0 ;
2731
+
2732
+ if ((argc < 3) || (argc > 3)) {
2733
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
2734
+ }
2735
+ res1 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg1), 0, 0);
2736
+ if (!SWIG_IsOK(res1)) {
2737
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cbc_Model *","Cbc_problemName", 1, argv[0] ));
2738
+ }
2739
+ ecode2 = SWIG_AsVal_int(argv[1], &val2);
2740
+ if (!SWIG_IsOK(ecode2)) {
2741
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","Cbc_problemName", 2, argv[1] ));
2742
+ }
2743
+ arg2 = (int)(val2);
2744
+ res3 = SWIG_AsCharPtrAndSize(argv[2], &buf3, NULL, &alloc3);
2745
+ if (!SWIG_IsOK(res3)) {
2746
+ SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char *","Cbc_problemName", 3, argv[2] ));
2747
+ }
2748
+ arg3 = (char *)(buf3);
2749
+ Cbc_problemName(arg1,arg2,arg3);
2750
+ if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
2751
+ return Qnil;
2752
+ fail:
2753
+ if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
2754
+ return Qnil;
2755
+ }
2756
+
2757
+
2758
+ SWIGINTERN VALUE
2759
+ _wrap_Cbc_setProblemName(int argc, VALUE *argv, VALUE self) {
2760
+ Cbc_Model *arg1 = (Cbc_Model *) 0 ;
2761
+ char *arg2 = (char *) 0 ;
2762
+ int res1 ;
2763
+ int res2 ;
2764
+ char *buf2 = 0 ;
2765
+ int alloc2 = 0 ;
2766
+ int result;
2767
+ VALUE vresult = Qnil;
2768
+
2769
+ if ((argc < 2) || (argc > 2)) {
2770
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
2771
+ }
2772
+ res1 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg1), 0, 0);
2773
+ if (!SWIG_IsOK(res1)) {
2774
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cbc_Model *","Cbc_setProblemName", 1, argv[0] ));
2775
+ }
2776
+ res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2);
2777
+ if (!SWIG_IsOK(res2)) {
2778
+ SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","Cbc_setProblemName", 2, argv[1] ));
2779
+ }
2780
+ arg2 = (char *)(buf2);
2781
+ result = (int)Cbc_setProblemName(arg1,(char const *)arg2);
2782
+ vresult = SWIG_From_int((int)(result));
2783
+ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2784
+ return vresult;
2785
+ fail:
2786
+ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2787
+ return Qnil;
2788
+ }
2789
+
2790
+
2791
+ SWIGINTERN VALUE
2792
+ _wrap_Cbc_getNumElements(int argc, VALUE *argv, VALUE self) {
2793
+ Cbc_Model *arg1 = (Cbc_Model *) 0 ;
2794
+ int res1 ;
2795
+ int result;
2796
+ VALUE vresult = Qnil;
2797
+
2798
+ if ((argc < 1) || (argc > 1)) {
2799
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2800
+ }
2801
+ res1 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg1), 0, 0);
2802
+ if (!SWIG_IsOK(res1)) {
2803
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cbc_Model *","Cbc_getNumElements", 1, argv[0] ));
2804
+ }
2805
+ result = (int)Cbc_getNumElements(arg1);
2806
+ vresult = SWIG_From_int((int)(result));
2807
+ return vresult;
2808
+ fail:
2809
+ return Qnil;
2810
+ }
2811
+
2812
+
2813
+ SWIGINTERN VALUE
2814
+ _wrap_Cbc_getVectorStarts(int argc, VALUE *argv, VALUE self) {
2815
+ Cbc_Model *arg1 = (Cbc_Model *) 0 ;
2816
+ int res1 ;
2817
+ CoinBigIndex *result = 0 ;
2818
+ VALUE vresult = Qnil;
2819
+
2820
+ if ((argc < 1) || (argc > 1)) {
2821
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2822
+ }
2823
+ res1 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg1), 0, 0);
2824
+ if (!SWIG_IsOK(res1)) {
2825
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cbc_Model *","Cbc_getVectorStarts", 1, argv[0] ));
2826
+ }
2827
+ result = (CoinBigIndex *)Cbc_getVectorStarts(arg1);
2828
+ vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_int, 0 | 0 );
2829
+ return vresult;
2830
+ fail:
2831
+ return Qnil;
2832
+ }
2833
+
2834
+
2835
+ SWIGINTERN VALUE
2836
+ _wrap_Cbc_getIndices(int argc, VALUE *argv, VALUE self) {
2837
+ Cbc_Model *arg1 = (Cbc_Model *) 0 ;
2838
+ int res1 ;
2839
+ int *result = 0 ;
2840
+ VALUE vresult = Qnil;
2841
+
2842
+ if ((argc < 1) || (argc > 1)) {
2843
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2844
+ }
2845
+ res1 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg1), 0, 0);
2846
+ if (!SWIG_IsOK(res1)) {
2847
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cbc_Model *","Cbc_getIndices", 1, argv[0] ));
2848
+ }
2849
+ result = (int *)Cbc_getIndices(arg1);
2850
+ vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_int, 0 | 0 );
2851
+ return vresult;
2852
+ fail:
2853
+ return Qnil;
2854
+ }
2855
+
2856
+
2857
+ SWIGINTERN VALUE
2858
+ _wrap_Cbc_getElements(int argc, VALUE *argv, VALUE self) {
2859
+ Cbc_Model *arg1 = (Cbc_Model *) 0 ;
2860
+ int res1 ;
2861
+ double *result = 0 ;
2862
+ VALUE vresult = Qnil;
2863
+
2864
+ if ((argc < 1) || (argc > 1)) {
2865
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2866
+ }
2867
+ res1 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg1), 0, 0);
2868
+ if (!SWIG_IsOK(res1)) {
2869
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cbc_Model *","Cbc_getElements", 1, argv[0] ));
2870
+ }
2871
+ result = (double *)Cbc_getElements(arg1);
2872
+ vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 | 0 );
2873
+ return vresult;
2874
+ fail:
2875
+ return Qnil;
2876
+ }
2877
+
2878
+
2879
+ SWIGINTERN VALUE
2880
+ _wrap_Cbc_maxNameLength(int argc, VALUE *argv, VALUE self) {
2881
+ Cbc_Model *arg1 = (Cbc_Model *) 0 ;
2882
+ int res1 ;
2883
+ size_t result;
2884
+ VALUE vresult = Qnil;
2885
+
2886
+ if ((argc < 1) || (argc > 1)) {
2887
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2888
+ }
2889
+ res1 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg1), 0, 0);
2890
+ if (!SWIG_IsOK(res1)) {
2891
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cbc_Model *","Cbc_maxNameLength", 1, argv[0] ));
2892
+ }
2893
+ result = Cbc_maxNameLength(arg1);
2894
+ vresult = SWIG_From_size_t((size_t)(result));
2895
+ return vresult;
2896
+ fail:
2897
+ return Qnil;
2898
+ }
2899
+
2900
+
2901
+ SWIGINTERN VALUE
2902
+ _wrap_Cbc_getRowName(int argc, VALUE *argv, VALUE self) {
2903
+ Cbc_Model *arg1 = (Cbc_Model *) 0 ;
2904
+ int arg2 ;
2905
+ char *arg3 = (char *) 0 ;
2906
+ size_t arg4 ;
2907
+ int res1 ;
2908
+ int val2 ;
2909
+ int ecode2 = 0 ;
2910
+ int res3 ;
2911
+ char *buf3 = 0 ;
2912
+ int alloc3 = 0 ;
2913
+ size_t val4 ;
2914
+ int ecode4 = 0 ;
2915
+
2916
+ if ((argc < 4) || (argc > 4)) {
2917
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
2918
+ }
2919
+ res1 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg1), 0, 0);
2920
+ if (!SWIG_IsOK(res1)) {
2921
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cbc_Model *","Cbc_getRowName", 1, argv[0] ));
2922
+ }
2923
+ ecode2 = SWIG_AsVal_int(argv[1], &val2);
2924
+ if (!SWIG_IsOK(ecode2)) {
2925
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","Cbc_getRowName", 2, argv[1] ));
2926
+ }
2927
+ arg2 = (int)(val2);
2928
+ res3 = SWIG_AsCharPtrAndSize(argv[2], &buf3, NULL, &alloc3);
2929
+ if (!SWIG_IsOK(res3)) {
2930
+ SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char *","Cbc_getRowName", 3, argv[2] ));
2931
+ }
2932
+ arg3 = (char *)(buf3);
2933
+ ecode4 = SWIG_AsVal_size_t(argv[3], &val4);
2934
+ if (!SWIG_IsOK(ecode4)) {
2935
+ SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "size_t","Cbc_getRowName", 4, argv[3] ));
2936
+ }
2937
+ arg4 = (size_t)(val4);
2938
+ Cbc_getRowName(arg1,arg2,arg3,arg4);
2939
+ if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
2940
+ return Qnil;
2941
+ fail:
2942
+ if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
2943
+ return Qnil;
2944
+ }
2945
+
2946
+
2947
+ SWIGINTERN VALUE
2948
+ _wrap_Cbc_getColName(int argc, VALUE *argv, VALUE self) {
2949
+ Cbc_Model *arg1 = (Cbc_Model *) 0 ;
2950
+ int arg2 ;
2951
+ char *arg3 = (char *) 0 ;
2952
+ size_t arg4 ;
2953
+ int res1 ;
2954
+ int val2 ;
2955
+ int ecode2 = 0 ;
2956
+ int res3 ;
2957
+ char *buf3 = 0 ;
2958
+ int alloc3 = 0 ;
2959
+ size_t val4 ;
2960
+ int ecode4 = 0 ;
2961
+
2962
+ if ((argc < 4) || (argc > 4)) {
2963
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
2964
+ }
2965
+ res1 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg1), 0, 0);
2966
+ if (!SWIG_IsOK(res1)) {
2967
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cbc_Model *","Cbc_getColName", 1, argv[0] ));
2968
+ }
2969
+ ecode2 = SWIG_AsVal_int(argv[1], &val2);
2970
+ if (!SWIG_IsOK(ecode2)) {
2971
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","Cbc_getColName", 2, argv[1] ));
2972
+ }
2973
+ arg2 = (int)(val2);
2974
+ res3 = SWIG_AsCharPtrAndSize(argv[2], &buf3, NULL, &alloc3);
2975
+ if (!SWIG_IsOK(res3)) {
2976
+ SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char *","Cbc_getColName", 3, argv[2] ));
2977
+ }
2978
+ arg3 = (char *)(buf3);
2979
+ ecode4 = SWIG_AsVal_size_t(argv[3], &val4);
2980
+ if (!SWIG_IsOK(ecode4)) {
2981
+ SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "size_t","Cbc_getColName", 4, argv[3] ));
2982
+ }
2983
+ arg4 = (size_t)(val4);
2984
+ Cbc_getColName(arg1,arg2,arg3,arg4);
2985
+ if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
2986
+ return Qnil;
2987
+ fail:
2988
+ if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
2989
+ return Qnil;
2990
+ }
2991
+
2992
+
2993
+ SWIGINTERN VALUE
2994
+ _wrap_Cbc_setColName(int argc, VALUE *argv, VALUE self) {
2995
+ Cbc_Model *arg1 = (Cbc_Model *) 0 ;
2996
+ int arg2 ;
2997
+ char *arg3 = (char *) 0 ;
2998
+ int res1 ;
2999
+ int val2 ;
3000
+ int ecode2 = 0 ;
3001
+ int res3 ;
3002
+ char *buf3 = 0 ;
3003
+ int alloc3 = 0 ;
3004
+
3005
+ if ((argc < 3) || (argc > 3)) {
3006
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
3007
+ }
3008
+ res1 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg1), 0, 0);
3009
+ if (!SWIG_IsOK(res1)) {
3010
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cbc_Model *","Cbc_setColName", 1, argv[0] ));
3011
+ }
3012
+ ecode2 = SWIG_AsVal_int(argv[1], &val2);
3013
+ if (!SWIG_IsOK(ecode2)) {
3014
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","Cbc_setColName", 2, argv[1] ));
3015
+ }
3016
+ arg2 = (int)(val2);
3017
+ res3 = SWIG_AsCharPtrAndSize(argv[2], &buf3, NULL, &alloc3);
3018
+ if (!SWIG_IsOK(res3)) {
3019
+ SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","Cbc_setColName", 3, argv[2] ));
3020
+ }
3021
+ arg3 = (char *)(buf3);
3022
+ Cbc_setColName(arg1,arg2,(char const *)arg3);
3023
+ if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
3024
+ return Qnil;
3025
+ fail:
3026
+ if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
3027
+ return Qnil;
3028
+ }
3029
+
3030
+
3031
+ SWIGINTERN VALUE
3032
+ _wrap_Cbc_setRowName(int argc, VALUE *argv, VALUE self) {
3033
+ Cbc_Model *arg1 = (Cbc_Model *) 0 ;
3034
+ int arg2 ;
3035
+ char *arg3 = (char *) 0 ;
3036
+ int res1 ;
3037
+ int val2 ;
3038
+ int ecode2 = 0 ;
3039
+ int res3 ;
3040
+ char *buf3 = 0 ;
3041
+ int alloc3 = 0 ;
3042
+
3043
+ if ((argc < 3) || (argc > 3)) {
3044
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
3045
+ }
3046
+ res1 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg1), 0, 0);
3047
+ if (!SWIG_IsOK(res1)) {
3048
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cbc_Model *","Cbc_setRowName", 1, argv[0] ));
3049
+ }
3050
+ ecode2 = SWIG_AsVal_int(argv[1], &val2);
3051
+ if (!SWIG_IsOK(ecode2)) {
3052
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","Cbc_setRowName", 2, argv[1] ));
3053
+ }
3054
+ arg2 = (int)(val2);
3055
+ res3 = SWIG_AsCharPtrAndSize(argv[2], &buf3, NULL, &alloc3);
3056
+ if (!SWIG_IsOK(res3)) {
3057
+ SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","Cbc_setRowName", 3, argv[2] ));
3058
+ }
3059
+ arg3 = (char *)(buf3);
3060
+ Cbc_setRowName(arg1,arg2,(char const *)arg3);
3061
+ if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
3062
+ return Qnil;
3063
+ fail:
3064
+ if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
3065
+ return Qnil;
3066
+ }
3067
+
3068
+
3069
+ SWIGINTERN VALUE
3070
+ _wrap_Cbc_getNumRows(int argc, VALUE *argv, VALUE self) {
3071
+ Cbc_Model *arg1 = (Cbc_Model *) 0 ;
3072
+ int res1 ;
3073
+ int result;
3074
+ VALUE vresult = Qnil;
3075
+
3076
+ if ((argc < 1) || (argc > 1)) {
3077
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3078
+ }
3079
+ res1 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg1), 0, 0);
3080
+ if (!SWIG_IsOK(res1)) {
3081
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cbc_Model *","Cbc_getNumRows", 1, argv[0] ));
3082
+ }
3083
+ result = (int)Cbc_getNumRows(arg1);
3084
+ vresult = SWIG_From_int((int)(result));
3085
+ return vresult;
3086
+ fail:
3087
+ return Qnil;
3088
+ }
3089
+
3090
+
3091
+ SWIGINTERN VALUE
3092
+ _wrap_Cbc_getNumCols(int argc, VALUE *argv, VALUE self) {
3093
+ Cbc_Model *arg1 = (Cbc_Model *) 0 ;
3094
+ int res1 ;
3095
+ int result;
3096
+ VALUE vresult = Qnil;
3097
+
3098
+ if ((argc < 1) || (argc > 1)) {
3099
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3100
+ }
3101
+ res1 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg1), 0, 0);
3102
+ if (!SWIG_IsOK(res1)) {
3103
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cbc_Model *","Cbc_getNumCols", 1, argv[0] ));
3104
+ }
3105
+ result = (int)Cbc_getNumCols(arg1);
3106
+ vresult = SWIG_From_int((int)(result));
3107
+ return vresult;
3108
+ fail:
3109
+ return Qnil;
3110
+ }
3111
+
3112
+
3113
+ SWIGINTERN VALUE
3114
+ _wrap_Cbc_setObjSense(int argc, VALUE *argv, VALUE self) {
3115
+ Cbc_Model *arg1 = (Cbc_Model *) 0 ;
3116
+ double arg2 ;
3117
+ int res1 ;
3118
+ double val2 ;
3119
+ int ecode2 = 0 ;
3120
+
3121
+ if ((argc < 2) || (argc > 2)) {
3122
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
3123
+ }
3124
+ res1 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg1), 0, 0);
3125
+ if (!SWIG_IsOK(res1)) {
3126
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cbc_Model *","Cbc_setObjSense", 1, argv[0] ));
3127
+ }
3128
+ ecode2 = SWIG_AsVal_double(argv[1], &val2);
3129
+ if (!SWIG_IsOK(ecode2)) {
3130
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","Cbc_setObjSense", 2, argv[1] ));
3131
+ }
3132
+ arg2 = (double)(val2);
3133
+ Cbc_setObjSense(arg1,arg2);
3134
+ return Qnil;
3135
+ fail:
3136
+ return Qnil;
3137
+ }
3138
+
3139
+
3140
+ SWIGINTERN VALUE
3141
+ _wrap_Cbc_getObjSense(int argc, VALUE *argv, VALUE self) {
3142
+ Cbc_Model *arg1 = (Cbc_Model *) 0 ;
3143
+ int res1 ;
3144
+ double result;
3145
+ VALUE vresult = Qnil;
3146
+
3147
+ if ((argc < 1) || (argc > 1)) {
3148
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3149
+ }
3150
+ res1 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg1), 0, 0);
3151
+ if (!SWIG_IsOK(res1)) {
3152
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cbc_Model *","Cbc_getObjSense", 1, argv[0] ));
3153
+ }
3154
+ result = (double)Cbc_getObjSense(arg1);
3155
+ vresult = SWIG_From_double((double)(result));
3156
+ return vresult;
3157
+ fail:
3158
+ return Qnil;
3159
+ }
3160
+
3161
+
3162
+ SWIGINTERN VALUE
3163
+ _wrap_Cbc_getRowLower(int argc, VALUE *argv, VALUE self) {
3164
+ Cbc_Model *arg1 = (Cbc_Model *) 0 ;
3165
+ int res1 ;
3166
+ double *result = 0 ;
3167
+ VALUE vresult = Qnil;
3168
+
3169
+ if ((argc < 1) || (argc > 1)) {
3170
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3171
+ }
3172
+ res1 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg1), 0, 0);
3173
+ if (!SWIG_IsOK(res1)) {
3174
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cbc_Model *","Cbc_getRowLower", 1, argv[0] ));
3175
+ }
3176
+ result = (double *)Cbc_getRowLower(arg1);
3177
+ vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 | 0 );
3178
+ return vresult;
3179
+ fail:
3180
+ return Qnil;
3181
+ }
3182
+
3183
+
3184
+ SWIGINTERN VALUE
3185
+ _wrap_Cbc_setRowLower(int argc, VALUE *argv, VALUE self) {
3186
+ Cbc_Model *arg1 = (Cbc_Model *) 0 ;
3187
+ int arg2 ;
3188
+ double arg3 ;
3189
+ int res1 ;
3190
+ int val2 ;
3191
+ int ecode2 = 0 ;
3192
+ double val3 ;
3193
+ int ecode3 = 0 ;
3194
+
3195
+ if ((argc < 3) || (argc > 3)) {
3196
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
3197
+ }
3198
+ res1 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg1), 0, 0);
3199
+ if (!SWIG_IsOK(res1)) {
3200
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cbc_Model *","Cbc_setRowLower", 1, argv[0] ));
3201
+ }
3202
+ ecode2 = SWIG_AsVal_int(argv[1], &val2);
3203
+ if (!SWIG_IsOK(ecode2)) {
3204
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","Cbc_setRowLower", 2, argv[1] ));
3205
+ }
3206
+ arg2 = (int)(val2);
3207
+ ecode3 = SWIG_AsVal_double(argv[2], &val3);
3208
+ if (!SWIG_IsOK(ecode3)) {
3209
+ SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","Cbc_setRowLower", 3, argv[2] ));
3210
+ }
3211
+ arg3 = (double)(val3);
3212
+ Cbc_setRowLower(arg1,arg2,arg3);
3213
+ return Qnil;
3214
+ fail:
3215
+ return Qnil;
3216
+ }
3217
+
3218
+
3219
+ SWIGINTERN VALUE
3220
+ _wrap_Cbc_getRowUpper(int argc, VALUE *argv, VALUE self) {
3221
+ Cbc_Model *arg1 = (Cbc_Model *) 0 ;
3222
+ int res1 ;
3223
+ double *result = 0 ;
3224
+ VALUE vresult = Qnil;
3225
+
3226
+ if ((argc < 1) || (argc > 1)) {
3227
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3228
+ }
3229
+ res1 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg1), 0, 0);
3230
+ if (!SWIG_IsOK(res1)) {
3231
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cbc_Model *","Cbc_getRowUpper", 1, argv[0] ));
3232
+ }
3233
+ result = (double *)Cbc_getRowUpper(arg1);
3234
+ vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 | 0 );
3235
+ return vresult;
3236
+ fail:
3237
+ return Qnil;
3238
+ }
3239
+
3240
+
3241
+ SWIGINTERN VALUE
3242
+ _wrap_Cbc_setRowUpper(int argc, VALUE *argv, VALUE self) {
3243
+ Cbc_Model *arg1 = (Cbc_Model *) 0 ;
3244
+ int arg2 ;
3245
+ double arg3 ;
3246
+ int res1 ;
3247
+ int val2 ;
3248
+ int ecode2 = 0 ;
3249
+ double val3 ;
3250
+ int ecode3 = 0 ;
3251
+
3252
+ if ((argc < 3) || (argc > 3)) {
3253
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
3254
+ }
3255
+ res1 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg1), 0, 0);
3256
+ if (!SWIG_IsOK(res1)) {
3257
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cbc_Model *","Cbc_setRowUpper", 1, argv[0] ));
3258
+ }
3259
+ ecode2 = SWIG_AsVal_int(argv[1], &val2);
3260
+ if (!SWIG_IsOK(ecode2)) {
3261
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","Cbc_setRowUpper", 2, argv[1] ));
3262
+ }
3263
+ arg2 = (int)(val2);
3264
+ ecode3 = SWIG_AsVal_double(argv[2], &val3);
3265
+ if (!SWIG_IsOK(ecode3)) {
3266
+ SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","Cbc_setRowUpper", 3, argv[2] ));
3267
+ }
3268
+ arg3 = (double)(val3);
3269
+ Cbc_setRowUpper(arg1,arg2,arg3);
3270
+ return Qnil;
3271
+ fail:
3272
+ return Qnil;
3273
+ }
3274
+
3275
+
3276
+ SWIGINTERN VALUE
3277
+ _wrap_Cbc_getObjCoefficients(int argc, VALUE *argv, VALUE self) {
3278
+ Cbc_Model *arg1 = (Cbc_Model *) 0 ;
3279
+ int res1 ;
3280
+ double *result = 0 ;
3281
+ VALUE vresult = Qnil;
3282
+
3283
+ if ((argc < 1) || (argc > 1)) {
3284
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3285
+ }
3286
+ res1 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg1), 0, 0);
3287
+ if (!SWIG_IsOK(res1)) {
3288
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cbc_Model *","Cbc_getObjCoefficients", 1, argv[0] ));
3289
+ }
3290
+ result = (double *)Cbc_getObjCoefficients(arg1);
3291
+ vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 | 0 );
3292
+ return vresult;
3293
+ fail:
3294
+ return Qnil;
3295
+ }
3296
+
3297
+
3298
+ SWIGINTERN VALUE
3299
+ _wrap_Cbc_setObjCoeff(int argc, VALUE *argv, VALUE self) {
3300
+ Cbc_Model *arg1 = (Cbc_Model *) 0 ;
3301
+ int arg2 ;
3302
+ double arg3 ;
3303
+ int res1 ;
3304
+ int val2 ;
3305
+ int ecode2 = 0 ;
3306
+ double val3 ;
3307
+ int ecode3 = 0 ;
3308
+
3309
+ if ((argc < 3) || (argc > 3)) {
3310
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
3311
+ }
3312
+ res1 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg1), 0, 0);
3313
+ if (!SWIG_IsOK(res1)) {
3314
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cbc_Model *","Cbc_setObjCoeff", 1, argv[0] ));
3315
+ }
3316
+ ecode2 = SWIG_AsVal_int(argv[1], &val2);
3317
+ if (!SWIG_IsOK(ecode2)) {
3318
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","Cbc_setObjCoeff", 2, argv[1] ));
3319
+ }
3320
+ arg2 = (int)(val2);
3321
+ ecode3 = SWIG_AsVal_double(argv[2], &val3);
3322
+ if (!SWIG_IsOK(ecode3)) {
3323
+ SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","Cbc_setObjCoeff", 3, argv[2] ));
3324
+ }
3325
+ arg3 = (double)(val3);
3326
+ Cbc_setObjCoeff(arg1,arg2,arg3);
3327
+ return Qnil;
3328
+ fail:
3329
+ return Qnil;
3330
+ }
3331
+
3332
+
3333
+ SWIGINTERN VALUE
3334
+ _wrap_Cbc_getColLower(int argc, VALUE *argv, VALUE self) {
3335
+ Cbc_Model *arg1 = (Cbc_Model *) 0 ;
3336
+ int res1 ;
3337
+ double *result = 0 ;
3338
+ VALUE vresult = Qnil;
3339
+
3340
+ if ((argc < 1) || (argc > 1)) {
3341
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3342
+ }
3343
+ res1 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg1), 0, 0);
3344
+ if (!SWIG_IsOK(res1)) {
3345
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cbc_Model *","Cbc_getColLower", 1, argv[0] ));
3346
+ }
3347
+ result = (double *)Cbc_getColLower(arg1);
3348
+ vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 | 0 );
3349
+ return vresult;
3350
+ fail:
3351
+ return Qnil;
3352
+ }
3353
+
3354
+
3355
+ SWIGINTERN VALUE
3356
+ _wrap_Cbc_setColLower(int argc, VALUE *argv, VALUE self) {
3357
+ Cbc_Model *arg1 = (Cbc_Model *) 0 ;
3358
+ int arg2 ;
3359
+ double arg3 ;
3360
+ int res1 ;
3361
+ int val2 ;
3362
+ int ecode2 = 0 ;
3363
+ double val3 ;
3364
+ int ecode3 = 0 ;
3365
+
3366
+ if ((argc < 3) || (argc > 3)) {
3367
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
3368
+ }
3369
+ res1 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg1), 0, 0);
3370
+ if (!SWIG_IsOK(res1)) {
3371
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cbc_Model *","Cbc_setColLower", 1, argv[0] ));
3372
+ }
3373
+ ecode2 = SWIG_AsVal_int(argv[1], &val2);
3374
+ if (!SWIG_IsOK(ecode2)) {
3375
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","Cbc_setColLower", 2, argv[1] ));
3376
+ }
3377
+ arg2 = (int)(val2);
3378
+ ecode3 = SWIG_AsVal_double(argv[2], &val3);
3379
+ if (!SWIG_IsOK(ecode3)) {
3380
+ SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","Cbc_setColLower", 3, argv[2] ));
3381
+ }
3382
+ arg3 = (double)(val3);
3383
+ Cbc_setColLower(arg1,arg2,arg3);
3384
+ return Qnil;
3385
+ fail:
3386
+ return Qnil;
3387
+ }
3388
+
3389
+
3390
+ SWIGINTERN VALUE
3391
+ _wrap_Cbc_getColUpper(int argc, VALUE *argv, VALUE self) {
3392
+ Cbc_Model *arg1 = (Cbc_Model *) 0 ;
3393
+ int res1 ;
3394
+ double *result = 0 ;
3395
+ VALUE vresult = Qnil;
3396
+
3397
+ if ((argc < 1) || (argc > 1)) {
3398
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3399
+ }
3400
+ res1 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg1), 0, 0);
3401
+ if (!SWIG_IsOK(res1)) {
3402
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cbc_Model *","Cbc_getColUpper", 1, argv[0] ));
3403
+ }
3404
+ result = (double *)Cbc_getColUpper(arg1);
3405
+ vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 | 0 );
3406
+ return vresult;
3407
+ fail:
3408
+ return Qnil;
3409
+ }
3410
+
3411
+
3412
+ SWIGINTERN VALUE
3413
+ _wrap_Cbc_setColUpper(int argc, VALUE *argv, VALUE self) {
3414
+ Cbc_Model *arg1 = (Cbc_Model *) 0 ;
3415
+ int arg2 ;
3416
+ double arg3 ;
3417
+ int res1 ;
3418
+ int val2 ;
3419
+ int ecode2 = 0 ;
3420
+ double val3 ;
3421
+ int ecode3 = 0 ;
3422
+
3423
+ if ((argc < 3) || (argc > 3)) {
3424
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
3425
+ }
3426
+ res1 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg1), 0, 0);
3427
+ if (!SWIG_IsOK(res1)) {
3428
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cbc_Model *","Cbc_setColUpper", 1, argv[0] ));
3429
+ }
3430
+ ecode2 = SWIG_AsVal_int(argv[1], &val2);
3431
+ if (!SWIG_IsOK(ecode2)) {
3432
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","Cbc_setColUpper", 2, argv[1] ));
3433
+ }
3434
+ arg2 = (int)(val2);
3435
+ ecode3 = SWIG_AsVal_double(argv[2], &val3);
3436
+ if (!SWIG_IsOK(ecode3)) {
3437
+ SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","Cbc_setColUpper", 3, argv[2] ));
3438
+ }
3439
+ arg3 = (double)(val3);
3440
+ Cbc_setColUpper(arg1,arg2,arg3);
3441
+ return Qnil;
3442
+ fail:
3443
+ return Qnil;
3444
+ }
3445
+
3446
+
3447
+ SWIGINTERN VALUE
3448
+ _wrap_Cbc_isInteger(int argc, VALUE *argv, VALUE self) {
3449
+ Cbc_Model *arg1 = (Cbc_Model *) 0 ;
3450
+ int arg2 ;
3451
+ int res1 ;
3452
+ int val2 ;
3453
+ int ecode2 = 0 ;
3454
+ int result;
3455
+ VALUE vresult = Qnil;
3456
+
3457
+ if ((argc < 2) || (argc > 2)) {
3458
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
3459
+ }
3460
+ res1 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg1), 0, 0);
3461
+ if (!SWIG_IsOK(res1)) {
3462
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cbc_Model *","Cbc_isInteger", 1, argv[0] ));
3463
+ }
3464
+ ecode2 = SWIG_AsVal_int(argv[1], &val2);
3465
+ if (!SWIG_IsOK(ecode2)) {
3466
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","Cbc_isInteger", 2, argv[1] ));
3467
+ }
3468
+ arg2 = (int)(val2);
3469
+ result = (int)Cbc_isInteger(arg1,arg2);
3470
+ vresult = SWIG_From_int((int)(result));
3471
+ return vresult;
3472
+ fail:
3473
+ return Qnil;
3474
+ }
3475
+
3476
+
3477
+ SWIGINTERN VALUE
3478
+ _wrap_Cbc_setContinuous(int argc, VALUE *argv, VALUE self) {
3479
+ Cbc_Model *arg1 = (Cbc_Model *) 0 ;
3480
+ int arg2 ;
3481
+ int res1 ;
3482
+ int val2 ;
3483
+ int ecode2 = 0 ;
3484
+
3485
+ if ((argc < 2) || (argc > 2)) {
3486
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
3487
+ }
3488
+ res1 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg1), 0, 0);
3489
+ if (!SWIG_IsOK(res1)) {
3490
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cbc_Model *","Cbc_setContinuous", 1, argv[0] ));
3491
+ }
3492
+ ecode2 = SWIG_AsVal_int(argv[1], &val2);
3493
+ if (!SWIG_IsOK(ecode2)) {
3494
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","Cbc_setContinuous", 2, argv[1] ));
3495
+ }
3496
+ arg2 = (int)(val2);
3497
+ Cbc_setContinuous(arg1,arg2);
3498
+ return Qnil;
3499
+ fail:
3500
+ return Qnil;
3501
+ }
3502
+
3503
+
3504
+ SWIGINTERN VALUE
3505
+ _wrap_Cbc_setInteger(int argc, VALUE *argv, VALUE self) {
3506
+ Cbc_Model *arg1 = (Cbc_Model *) 0 ;
3507
+ int arg2 ;
3508
+ int res1 ;
3509
+ int val2 ;
3510
+ int ecode2 = 0 ;
3511
+
3512
+ if ((argc < 2) || (argc > 2)) {
3513
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
3514
+ }
3515
+ res1 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg1), 0, 0);
3516
+ if (!SWIG_IsOK(res1)) {
3517
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cbc_Model *","Cbc_setInteger", 1, argv[0] ));
3518
+ }
3519
+ ecode2 = SWIG_AsVal_int(argv[1], &val2);
3520
+ if (!SWIG_IsOK(ecode2)) {
3521
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","Cbc_setInteger", 2, argv[1] ));
3522
+ }
3523
+ arg2 = (int)(val2);
3524
+ Cbc_setInteger(arg1,arg2);
3525
+ return Qnil;
3526
+ fail:
3527
+ return Qnil;
3528
+ }
3529
+
3530
+
3531
+ SWIGINTERN VALUE
3532
+ _wrap_Cbc_addSOS(int argc, VALUE *argv, VALUE self) {
3533
+ Cbc_Model *arg1 = (Cbc_Model *) 0 ;
3534
+ int arg2 ;
3535
+ int *arg3 = (int *) 0 ;
3536
+ int *arg4 = (int *) 0 ;
3537
+ double *arg5 = (double *) 0 ;
3538
+ int arg6 ;
3539
+ int res1 ;
3540
+ int val2 ;
3541
+ int ecode2 = 0 ;
3542
+ void *argp3 = 0 ;
3543
+ int res3 = 0 ;
3544
+ void *argp4 = 0 ;
3545
+ int res4 = 0 ;
3546
+ void *argp5 = 0 ;
3547
+ int res5 = 0 ;
3548
+ int val6 ;
3549
+ int ecode6 = 0 ;
3550
+
3551
+ if ((argc < 6) || (argc > 6)) {
3552
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 6)",argc); SWIG_fail;
3553
+ }
3554
+ res1 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg1), 0, 0);
3555
+ if (!SWIG_IsOK(res1)) {
3556
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cbc_Model *","Cbc_addSOS", 1, argv[0] ));
3557
+ }
3558
+ ecode2 = SWIG_AsVal_int(argv[1], &val2);
3559
+ if (!SWIG_IsOK(ecode2)) {
3560
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","Cbc_addSOS", 2, argv[1] ));
3561
+ }
3562
+ arg2 = (int)(val2);
3563
+ res3 = SWIG_ConvertPtr(argv[2], &argp3,SWIGTYPE_p_int, 0 | 0 );
3564
+ if (!SWIG_IsOK(res3)) {
3565
+ SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "int const *","Cbc_addSOS", 3, argv[2] ));
3566
+ }
3567
+ arg3 = (int *)(argp3);
3568
+ res4 = SWIG_ConvertPtr(argv[3], &argp4,SWIGTYPE_p_int, 0 | 0 );
3569
+ if (!SWIG_IsOK(res4)) {
3570
+ SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "int const *","Cbc_addSOS", 4, argv[3] ));
3571
+ }
3572
+ arg4 = (int *)(argp4);
3573
+ res5 = SWIG_ConvertPtr(argv[4], &argp5,SWIGTYPE_p_double, 0 | 0 );
3574
+ if (!SWIG_IsOK(res5)) {
3575
+ SWIG_exception_fail(SWIG_ArgError(res5), Ruby_Format_TypeError( "", "double const *","Cbc_addSOS", 5, argv[4] ));
3576
+ }
3577
+ arg5 = (double *)(argp5);
3578
+ ecode6 = SWIG_AsVal_int(argv[5], &val6);
3579
+ if (!SWIG_IsOK(ecode6)) {
3580
+ SWIG_exception_fail(SWIG_ArgError(ecode6), Ruby_Format_TypeError( "", "int","Cbc_addSOS", 6, argv[5] ));
3581
+ }
3582
+ arg6 = (int)(val6);
3583
+ Cbc_addSOS(arg1,arg2,(int const *)arg3,(int const *)arg4,(double const *)arg5,arg6);
3584
+ return Qnil;
3585
+ fail:
3586
+ return Qnil;
3587
+ }
3588
+
3589
+
3590
+ SWIGINTERN VALUE
3591
+ _wrap_Cbc_printModel(int argc, VALUE *argv, VALUE self) {
3592
+ Cbc_Model *arg1 = (Cbc_Model *) 0 ;
3593
+ char *arg2 = (char *) 0 ;
3594
+ int res1 ;
3595
+ int res2 ;
3596
+ char *buf2 = 0 ;
3597
+ int alloc2 = 0 ;
3598
+
3599
+ if ((argc < 2) || (argc > 2)) {
3600
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
3601
+ }
3602
+ res1 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg1), 0, 0);
3603
+ if (!SWIG_IsOK(res1)) {
3604
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cbc_Model *","Cbc_printModel", 1, argv[0] ));
3605
+ }
3606
+ res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2);
3607
+ if (!SWIG_IsOK(res2)) {
3608
+ SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","Cbc_printModel", 2, argv[1] ));
3609
+ }
3610
+ arg2 = (char *)(buf2);
3611
+ Cbc_printModel(arg1,(char const *)arg2);
3612
+ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
3613
+ return Qnil;
3614
+ fail:
3615
+ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
3616
+ return Qnil;
3617
+ }
3618
+
3619
+
3620
+ SWIGINTERN VALUE
3621
+ _wrap_Cbc_clone(int argc, VALUE *argv, VALUE self) {
3622
+ Cbc_Model *arg1 = (Cbc_Model *) 0 ;
3623
+ int res1 ;
3624
+ Cbc_Model *result = 0 ;
3625
+ VALUE vresult = Qnil;
3626
+
3627
+ if ((argc < 1) || (argc > 1)) {
3628
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3629
+ }
3630
+ res1 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg1), 0, 0);
3631
+ if (!SWIG_IsOK(res1)) {
3632
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cbc_Model *","Cbc_clone", 1, argv[0] ));
3633
+ }
3634
+ result = (Cbc_Model *)Cbc_clone(arg1);
3635
+ vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 );
3636
+ return vresult;
3637
+ fail:
3638
+ return Qnil;
3639
+ }
3640
+
3641
+
3642
+ SWIGINTERN VALUE
3643
+ _wrap_Cbc_setParameter(int argc, VALUE *argv, VALUE self) {
3644
+ Cbc_Model *arg1 = (Cbc_Model *) 0 ;
3645
+ char *arg2 = (char *) 0 ;
3646
+ char *arg3 = (char *) 0 ;
3647
+ int res1 ;
3648
+ int res2 ;
3649
+ char *buf2 = 0 ;
3650
+ int alloc2 = 0 ;
3651
+ int res3 ;
3652
+ char *buf3 = 0 ;
3653
+ int alloc3 = 0 ;
3654
+
3655
+ if ((argc < 3) || (argc > 3)) {
3656
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
3657
+ }
3658
+ res1 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg1), 0, 0);
3659
+ if (!SWIG_IsOK(res1)) {
3660
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cbc_Model *","Cbc_setParameter", 1, argv[0] ));
3661
+ }
3662
+ res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2);
3663
+ if (!SWIG_IsOK(res2)) {
3664
+ SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","Cbc_setParameter", 2, argv[1] ));
3665
+ }
3666
+ arg2 = (char *)(buf2);
3667
+ res3 = SWIG_AsCharPtrAndSize(argv[2], &buf3, NULL, &alloc3);
3668
+ if (!SWIG_IsOK(res3)) {
3669
+ SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","Cbc_setParameter", 3, argv[2] ));
3670
+ }
3671
+ arg3 = (char *)(buf3);
3672
+ Cbc_setParameter(arg1,(char const *)arg2,(char const *)arg3);
3673
+ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
3674
+ if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
3675
+ return Qnil;
3676
+ fail:
3677
+ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
3678
+ if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
3679
+ return Qnil;
3680
+ }
3681
+
3682
+
3683
+ SWIGINTERN VALUE
3684
+ _wrap_Cbc_registerCallBack(int argc, VALUE *argv, VALUE self) {
3685
+ Cbc_Model *arg1 = (Cbc_Model *) 0 ;
3686
+ cbc_callback arg2 = (cbc_callback) 0 ;
3687
+ int res1 ;
3688
+
3689
+ if ((argc < 2) || (argc > 2)) {
3690
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
3691
+ }
3692
+ res1 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg1), 0, 0);
3693
+ if (!SWIG_IsOK(res1)) {
3694
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cbc_Model *","Cbc_registerCallBack", 1, argv[0] ));
3695
+ }
3696
+ {
3697
+ int res = SWIG_ConvertFunctionPtr(argv[1], (void**)(&arg2), SWIGTYPE_p_f_p_void_int_int_p_q_const__double_int_p_q_const__int_int_p_p_char__void);
3698
+ if (!SWIG_IsOK(res)) {
3699
+ SWIG_exception_fail(SWIG_ArgError(res), Ruby_Format_TypeError( "", "cbc_callback","Cbc_registerCallBack", 2, argv[1] ));
3700
+ }
3701
+ }
3702
+ Cbc_registerCallBack(arg1,arg2);
3703
+ return Qnil;
3704
+ fail:
3705
+ return Qnil;
3706
+ }
3707
+
3708
+
3709
+ SWIGINTERN VALUE
3710
+ _wrap_Cbc_clearCallBack(int argc, VALUE *argv, VALUE self) {
3711
+ Cbc_Model *arg1 = (Cbc_Model *) 0 ;
3712
+ int res1 ;
3713
+
3714
+ if ((argc < 1) || (argc > 1)) {
3715
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3716
+ }
3717
+ res1 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg1), 0, 0);
3718
+ if (!SWIG_IsOK(res1)) {
3719
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cbc_Model *","Cbc_clearCallBack", 1, argv[0] ));
3720
+ }
3721
+ Cbc_clearCallBack(arg1);
3722
+ return Qnil;
3723
+ fail:
3724
+ return Qnil;
3725
+ }
3726
+
3727
+
3728
+ SWIGINTERN VALUE
3729
+ _wrap_Cbc_solve(int argc, VALUE *argv, VALUE self) {
3730
+ Cbc_Model *arg1 = (Cbc_Model *) 0 ;
3731
+ int res1 ;
3732
+ int result;
3733
+ VALUE vresult = Qnil;
3734
+
3735
+ if ((argc < 1) || (argc > 1)) {
3736
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3737
+ }
3738
+ res1 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg1), 0, 0);
3739
+ if (!SWIG_IsOK(res1)) {
3740
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cbc_Model *","Cbc_solve", 1, argv[0] ));
3741
+ }
3742
+ result = (int)Cbc_solve(arg1);
3743
+ vresult = SWIG_From_int((int)(result));
3744
+ return vresult;
3745
+ fail:
3746
+ return Qnil;
3747
+ }
3748
+
3749
+
3750
+ SWIGINTERN VALUE
3751
+ _wrap_Cbc_sumPrimalInfeasibilities(int argc, VALUE *argv, VALUE self) {
3752
+ Cbc_Model *arg1 = (Cbc_Model *) 0 ;
3753
+ int res1 ;
3754
+ double result;
3755
+ VALUE vresult = Qnil;
3756
+
3757
+ if ((argc < 1) || (argc > 1)) {
3758
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3759
+ }
3760
+ res1 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg1), 0, 0);
3761
+ if (!SWIG_IsOK(res1)) {
3762
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cbc_Model *","Cbc_sumPrimalInfeasibilities", 1, argv[0] ));
3763
+ }
3764
+ result = (double)Cbc_sumPrimalInfeasibilities(arg1);
3765
+ vresult = SWIG_From_double((double)(result));
3766
+ return vresult;
3767
+ fail:
3768
+ return Qnil;
3769
+ }
3770
+
3771
+
3772
+ SWIGINTERN VALUE
3773
+ _wrap_Cbc_numberPrimalInfeasibilities(int argc, VALUE *argv, VALUE self) {
3774
+ Cbc_Model *arg1 = (Cbc_Model *) 0 ;
3775
+ int res1 ;
3776
+ int result;
3777
+ VALUE vresult = Qnil;
3778
+
3779
+ if ((argc < 1) || (argc > 1)) {
3780
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3781
+ }
3782
+ res1 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg1), 0, 0);
3783
+ if (!SWIG_IsOK(res1)) {
3784
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cbc_Model *","Cbc_numberPrimalInfeasibilities", 1, argv[0] ));
3785
+ }
3786
+ result = (int)Cbc_numberPrimalInfeasibilities(arg1);
3787
+ vresult = SWIG_From_int((int)(result));
3788
+ return vresult;
3789
+ fail:
3790
+ return Qnil;
3791
+ }
3792
+
3793
+
3794
+ SWIGINTERN VALUE
3795
+ _wrap_Cbc_checkSolution(int argc, VALUE *argv, VALUE self) {
3796
+ Cbc_Model *arg1 = (Cbc_Model *) 0 ;
3797
+ int res1 ;
3798
+
3799
+ if ((argc < 1) || (argc > 1)) {
3800
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3801
+ }
3802
+ res1 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg1), 0, 0);
3803
+ if (!SWIG_IsOK(res1)) {
3804
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cbc_Model *","Cbc_checkSolution", 1, argv[0] ));
3805
+ }
3806
+ Cbc_checkSolution(arg1);
3807
+ return Qnil;
3808
+ fail:
3809
+ return Qnil;
3810
+ }
3811
+
3812
+
3813
+ SWIGINTERN VALUE
3814
+ _wrap_Cbc_getIterationCount(int argc, VALUE *argv, VALUE self) {
3815
+ Cbc_Model *arg1 = (Cbc_Model *) 0 ;
3816
+ int res1 ;
3817
+ int result;
3818
+ VALUE vresult = Qnil;
3819
+
3820
+ if ((argc < 1) || (argc > 1)) {
3821
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3822
+ }
3823
+ res1 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg1), 0, 0);
3824
+ if (!SWIG_IsOK(res1)) {
3825
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cbc_Model *","Cbc_getIterationCount", 1, argv[0] ));
3826
+ }
3827
+ result = (int)Cbc_getIterationCount(arg1);
3828
+ vresult = SWIG_From_int((int)(result));
3829
+ return vresult;
3830
+ fail:
3831
+ return Qnil;
3832
+ }
3833
+
3834
+
3835
+ SWIGINTERN VALUE
3836
+ _wrap_Cbc_isAbandoned(int argc, VALUE *argv, VALUE self) {
3837
+ Cbc_Model *arg1 = (Cbc_Model *) 0 ;
3838
+ int res1 ;
3839
+ int result;
3840
+ VALUE vresult = Qnil;
3841
+
3842
+ if ((argc < 1) || (argc > 1)) {
3843
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3844
+ }
3845
+ res1 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg1), 0, 0);
3846
+ if (!SWIG_IsOK(res1)) {
3847
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cbc_Model *","Cbc_isAbandoned", 1, argv[0] ));
3848
+ }
3849
+ result = (int)Cbc_isAbandoned(arg1);
3850
+ vresult = SWIG_From_int((int)(result));
3851
+ return vresult;
3852
+ fail:
3853
+ return Qnil;
3854
+ }
3855
+
3856
+
3857
+ SWIGINTERN VALUE
3858
+ _wrap_Cbc_isProvenOptimal(int argc, VALUE *argv, VALUE self) {
3859
+ Cbc_Model *arg1 = (Cbc_Model *) 0 ;
3860
+ int res1 ;
3861
+ int result;
3862
+ VALUE vresult = Qnil;
3863
+
3864
+ if ((argc < 1) || (argc > 1)) {
3865
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3866
+ }
3867
+ res1 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg1), 0, 0);
3868
+ if (!SWIG_IsOK(res1)) {
3869
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cbc_Model *","Cbc_isProvenOptimal", 1, argv[0] ));
3870
+ }
3871
+ result = (int)Cbc_isProvenOptimal(arg1);
3872
+ vresult = SWIG_From_int((int)(result));
3873
+ return vresult;
3874
+ fail:
3875
+ return Qnil;
3876
+ }
3877
+
3878
+
3879
+ SWIGINTERN VALUE
3880
+ _wrap_Cbc_isProvenInfeasible(int argc, VALUE *argv, VALUE self) {
3881
+ Cbc_Model *arg1 = (Cbc_Model *) 0 ;
3882
+ int res1 ;
3883
+ int result;
3884
+ VALUE vresult = Qnil;
3885
+
3886
+ if ((argc < 1) || (argc > 1)) {
3887
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3888
+ }
3889
+ res1 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg1), 0, 0);
3890
+ if (!SWIG_IsOK(res1)) {
3891
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cbc_Model *","Cbc_isProvenInfeasible", 1, argv[0] ));
3892
+ }
3893
+ result = (int)Cbc_isProvenInfeasible(arg1);
3894
+ vresult = SWIG_From_int((int)(result));
3895
+ return vresult;
3896
+ fail:
3897
+ return Qnil;
3898
+ }
3899
+
3900
+
3901
+ SWIGINTERN VALUE
3902
+ _wrap_Cbc_isContinuousUnbounded(int argc, VALUE *argv, VALUE self) {
3903
+ Cbc_Model *arg1 = (Cbc_Model *) 0 ;
3904
+ int res1 ;
3905
+ int result;
3906
+ VALUE vresult = Qnil;
3907
+
3908
+ if ((argc < 1) || (argc > 1)) {
3909
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3910
+ }
3911
+ res1 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg1), 0, 0);
3912
+ if (!SWIG_IsOK(res1)) {
3913
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cbc_Model *","Cbc_isContinuousUnbounded", 1, argv[0] ));
3914
+ }
3915
+ result = (int)Cbc_isContinuousUnbounded(arg1);
3916
+ vresult = SWIG_From_int((int)(result));
3917
+ return vresult;
3918
+ fail:
3919
+ return Qnil;
3920
+ }
3921
+
3922
+
3923
+ SWIGINTERN VALUE
3924
+ _wrap_Cbc_isNodeLimitReached(int argc, VALUE *argv, VALUE self) {
3925
+ Cbc_Model *arg1 = (Cbc_Model *) 0 ;
3926
+ int res1 ;
3927
+ int result;
3928
+ VALUE vresult = Qnil;
3929
+
3930
+ if ((argc < 1) || (argc > 1)) {
3931
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3932
+ }
3933
+ res1 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg1), 0, 0);
3934
+ if (!SWIG_IsOK(res1)) {
3935
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cbc_Model *","Cbc_isNodeLimitReached", 1, argv[0] ));
3936
+ }
3937
+ result = (int)Cbc_isNodeLimitReached(arg1);
3938
+ vresult = SWIG_From_int((int)(result));
3939
+ return vresult;
3940
+ fail:
3941
+ return Qnil;
3942
+ }
3943
+
3944
+
3945
+ SWIGINTERN VALUE
3946
+ _wrap_Cbc_isSecondsLimitReached(int argc, VALUE *argv, VALUE self) {
3947
+ Cbc_Model *arg1 = (Cbc_Model *) 0 ;
3948
+ int res1 ;
3949
+ int result;
3950
+ VALUE vresult = Qnil;
3951
+
3952
+ if ((argc < 1) || (argc > 1)) {
3953
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3954
+ }
3955
+ res1 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg1), 0, 0);
3956
+ if (!SWIG_IsOK(res1)) {
3957
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cbc_Model *","Cbc_isSecondsLimitReached", 1, argv[0] ));
3958
+ }
3959
+ result = (int)Cbc_isSecondsLimitReached(arg1);
3960
+ vresult = SWIG_From_int((int)(result));
3961
+ return vresult;
3962
+ fail:
3963
+ return Qnil;
3964
+ }
3965
+
3966
+
3967
+ SWIGINTERN VALUE
3968
+ _wrap_Cbc_isSolutionLimitReached(int argc, VALUE *argv, VALUE self) {
3969
+ Cbc_Model *arg1 = (Cbc_Model *) 0 ;
3970
+ int res1 ;
3971
+ int result;
3972
+ VALUE vresult = Qnil;
3973
+
3974
+ if ((argc < 1) || (argc > 1)) {
3975
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3976
+ }
3977
+ res1 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg1), 0, 0);
3978
+ if (!SWIG_IsOK(res1)) {
3979
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cbc_Model *","Cbc_isSolutionLimitReached", 1, argv[0] ));
3980
+ }
3981
+ result = (int)Cbc_isSolutionLimitReached(arg1);
3982
+ vresult = SWIG_From_int((int)(result));
3983
+ return vresult;
3984
+ fail:
3985
+ return Qnil;
3986
+ }
3987
+
3988
+
3989
+ SWIGINTERN VALUE
3990
+ _wrap_Cbc_isInitialSolveAbandoned(int argc, VALUE *argv, VALUE self) {
3991
+ Cbc_Model *arg1 = (Cbc_Model *) 0 ;
3992
+ int res1 ;
3993
+ int result;
3994
+ VALUE vresult = Qnil;
3995
+
3996
+ if ((argc < 1) || (argc > 1)) {
3997
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3998
+ }
3999
+ res1 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg1), 0, 0);
4000
+ if (!SWIG_IsOK(res1)) {
4001
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cbc_Model *","Cbc_isInitialSolveAbandoned", 1, argv[0] ));
4002
+ }
4003
+ result = (int)Cbc_isInitialSolveAbandoned(arg1);
4004
+ vresult = SWIG_From_int((int)(result));
4005
+ return vresult;
4006
+ fail:
4007
+ return Qnil;
4008
+ }
4009
+
4010
+
4011
+ SWIGINTERN VALUE
4012
+ _wrap_Cbc_isInitialSolveProvenOptimal(int argc, VALUE *argv, VALUE self) {
4013
+ Cbc_Model *arg1 = (Cbc_Model *) 0 ;
4014
+ int res1 ;
4015
+ int result;
4016
+ VALUE vresult = Qnil;
4017
+
4018
+ if ((argc < 1) || (argc > 1)) {
4019
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
4020
+ }
4021
+ res1 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg1), 0, 0);
4022
+ if (!SWIG_IsOK(res1)) {
4023
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cbc_Model *","Cbc_isInitialSolveProvenOptimal", 1, argv[0] ));
4024
+ }
4025
+ result = (int)Cbc_isInitialSolveProvenOptimal(arg1);
4026
+ vresult = SWIG_From_int((int)(result));
4027
+ return vresult;
4028
+ fail:
4029
+ return Qnil;
4030
+ }
4031
+
4032
+
4033
+ SWIGINTERN VALUE
4034
+ _wrap_Cbc_isInitialSolveProvenPrimalInfeasible(int argc, VALUE *argv, VALUE self) {
4035
+ Cbc_Model *arg1 = (Cbc_Model *) 0 ;
4036
+ int res1 ;
4037
+ int result;
4038
+ VALUE vresult = Qnil;
4039
+
4040
+ if ((argc < 1) || (argc > 1)) {
4041
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
4042
+ }
4043
+ res1 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg1), 0, 0);
4044
+ if (!SWIG_IsOK(res1)) {
4045
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cbc_Model *","Cbc_isInitialSolveProvenPrimalInfeasible", 1, argv[0] ));
4046
+ }
4047
+ result = (int)Cbc_isInitialSolveProvenPrimalInfeasible(arg1);
4048
+ vresult = SWIG_From_int((int)(result));
4049
+ return vresult;
4050
+ fail:
4051
+ return Qnil;
4052
+ }
4053
+
4054
+
4055
+ SWIGINTERN VALUE
4056
+ _wrap_Cbc_getRowActivity(int argc, VALUE *argv, VALUE self) {
4057
+ Cbc_Model *arg1 = (Cbc_Model *) 0 ;
4058
+ int res1 ;
4059
+ double *result = 0 ;
4060
+ VALUE vresult = Qnil;
4061
+
4062
+ if ((argc < 1) || (argc > 1)) {
4063
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
4064
+ }
4065
+ res1 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg1), 0, 0);
4066
+ if (!SWIG_IsOK(res1)) {
4067
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cbc_Model *","Cbc_getRowActivity", 1, argv[0] ));
4068
+ }
4069
+ result = (double *)Cbc_getRowActivity(arg1);
4070
+ vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 | 0 );
4071
+ return vresult;
4072
+ fail:
4073
+ return Qnil;
4074
+ }
4075
+
4076
+
4077
+ SWIGINTERN VALUE
4078
+ _wrap_Cbc_getColSolution(int argc, VALUE *argv, VALUE self) {
4079
+ Cbc_Model *arg1 = (Cbc_Model *) 0 ;
4080
+ int res1 ;
4081
+ double *result = 0 ;
4082
+ VALUE vresult = Qnil;
4083
+
4084
+ if ((argc < 1) || (argc > 1)) {
4085
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
4086
+ }
4087
+ res1 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg1), 0, 0);
4088
+ if (!SWIG_IsOK(res1)) {
4089
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cbc_Model *","Cbc_getColSolution", 1, argv[0] ));
4090
+ }
4091
+ result = (double *)Cbc_getColSolution(arg1);
4092
+ vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 | 0 );
4093
+ return vresult;
4094
+ fail:
4095
+ return Qnil;
4096
+ }
4097
+
4098
+
4099
+ SWIGINTERN VALUE
4100
+ _wrap_Cbc_getObjValue(int argc, VALUE *argv, VALUE self) {
4101
+ Cbc_Model *arg1 = (Cbc_Model *) 0 ;
4102
+ int res1 ;
4103
+ double result;
4104
+ VALUE vresult = Qnil;
4105
+
4106
+ if ((argc < 1) || (argc > 1)) {
4107
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
4108
+ }
4109
+ res1 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg1), 0, 0);
4110
+ if (!SWIG_IsOK(res1)) {
4111
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cbc_Model *","Cbc_getObjValue", 1, argv[0] ));
4112
+ }
4113
+ result = (double)Cbc_getObjValue(arg1);
4114
+ vresult = SWIG_From_double((double)(result));
4115
+ return vresult;
4116
+ fail:
4117
+ return Qnil;
4118
+ }
4119
+
4120
+
4121
+ SWIGINTERN VALUE
4122
+ _wrap_Cbc_getBestPossibleObjValue(int argc, VALUE *argv, VALUE self) {
4123
+ Cbc_Model *arg1 = (Cbc_Model *) 0 ;
4124
+ int res1 ;
4125
+ double result;
4126
+ VALUE vresult = Qnil;
4127
+
4128
+ if ((argc < 1) || (argc > 1)) {
4129
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
4130
+ }
4131
+ res1 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg1), 0, 0);
4132
+ if (!SWIG_IsOK(res1)) {
4133
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cbc_Model *","Cbc_getBestPossibleObjValue", 1, argv[0] ));
4134
+ }
4135
+ result = (double)Cbc_getBestPossibleObjValue(arg1);
4136
+ vresult = SWIG_From_double((double)(result));
4137
+ return vresult;
4138
+ fail:
4139
+ return Qnil;
4140
+ }
4141
+
4142
+
4143
+ SWIGINTERN VALUE
4144
+ _wrap_Cbc_getNodeCount(int argc, VALUE *argv, VALUE self) {
4145
+ Cbc_Model *arg1 = (Cbc_Model *) 0 ;
4146
+ int res1 ;
4147
+ int result;
4148
+ VALUE vresult = Qnil;
4149
+
4150
+ if ((argc < 1) || (argc > 1)) {
4151
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
4152
+ }
4153
+ res1 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg1), 0, 0);
4154
+ if (!SWIG_IsOK(res1)) {
4155
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cbc_Model *","Cbc_getNodeCount", 1, argv[0] ));
4156
+ }
4157
+ result = (int)Cbc_getNodeCount(arg1);
4158
+ vresult = SWIG_From_int((int)(result));
4159
+ return vresult;
4160
+ fail:
4161
+ return Qnil;
4162
+ }
4163
+
4164
+
4165
+ SWIGINTERN VALUE
4166
+ _wrap_Cbc_printSolution(int argc, VALUE *argv, VALUE self) {
4167
+ Cbc_Model *arg1 = (Cbc_Model *) 0 ;
4168
+ int res1 ;
4169
+
4170
+ if ((argc < 1) || (argc > 1)) {
4171
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
4172
+ }
4173
+ res1 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg1), 0, 0);
4174
+ if (!SWIG_IsOK(res1)) {
4175
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cbc_Model *","Cbc_printSolution", 1, argv[0] ));
4176
+ }
4177
+ Cbc_printSolution(arg1);
4178
+ return Qnil;
4179
+ fail:
4180
+ return Qnil;
4181
+ }
4182
+
4183
+
4184
+ SWIGINTERN VALUE
4185
+ _wrap_Cbc_status(int argc, VALUE *argv, VALUE self) {
4186
+ Cbc_Model *arg1 = (Cbc_Model *) 0 ;
4187
+ int res1 ;
4188
+ int result;
4189
+ VALUE vresult = Qnil;
4190
+
4191
+ if ((argc < 1) || (argc > 1)) {
4192
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
4193
+ }
4194
+ res1 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg1), 0, 0);
4195
+ if (!SWIG_IsOK(res1)) {
4196
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cbc_Model *","Cbc_status", 1, argv[0] ));
4197
+ }
4198
+ result = (int)Cbc_status(arg1);
4199
+ vresult = SWIG_From_int((int)(result));
4200
+ return vresult;
4201
+ fail:
4202
+ return Qnil;
4203
+ }
4204
+
4205
+
4206
+ SWIGINTERN VALUE
4207
+ _wrap_Cbc_secondaryStatus(int argc, VALUE *argv, VALUE self) {
4208
+ Cbc_Model *arg1 = (Cbc_Model *) 0 ;
4209
+ int res1 ;
4210
+ int result;
4211
+ VALUE vresult = Qnil;
4212
+
4213
+ if ((argc < 1) || (argc > 1)) {
4214
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
4215
+ }
4216
+ res1 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg1), 0, 0);
4217
+ if (!SWIG_IsOK(res1)) {
4218
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Cbc_Model *","Cbc_secondaryStatus", 1, argv[0] ));
4219
+ }
4220
+ result = (int)Cbc_secondaryStatus(arg1);
4221
+ vresult = SWIG_From_int((int)(result));
4222
+ return vresult;
4223
+ fail:
4224
+ return Qnil;
4225
+ }
4226
+
4227
+
4228
+
4229
+ /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
4230
+
4231
+ static void *_p_IntArrayTo_p_int(void *x, int *SWIGUNUSEDPARM(newmemory)) {
4232
+ return (void *)((int *) ((IntArray *) x));
4233
+ }
4234
+ static void *_p_DoubleArrayTo_p_double(void *x, int *SWIGUNUSEDPARM(newmemory)) {
4235
+ return (void *)((double *) ((DoubleArray *) x));
4236
+ }
4237
+ static swig_type_info _swigt__p_DoubleArray = {"_p_DoubleArray", "DoubleArray *", 0, 0, (void*)0, 0};
4238
+ static swig_type_info _swigt__p_IntArray = {"_p_IntArray", "IntArray *", 0, 0, (void*)0, 0};
4239
+ static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
4240
+ static swig_type_info _swigt__p_double = {"_p_double", "double *", 0, 0, (void*)0, 0};
4241
+ static swig_type_info _swigt__p_f_p_void_int_int_p_q_const__double_int_p_q_const__int_int_p_p_char__void = {"_p_f_p_void_int_int_p_q_const__double_int_p_q_const__int_int_p_p_char__void", "void (*)(void *,int,int,double const *,int,int const *,int,char **)|cbc_callback", 0, 0, (void*)0, 0};
4242
+ static swig_type_info _swigt__p_int = {"_p_int", "int *|CoinBigIndex *", 0, 0, (void*)0, 0};
4243
+ static swig_type_info _swigt__p_void = {"_p_void", "Cbc_Model *|Sbb_Model *|Clp_Simplex *|void *", 0, 0, (void*)0, 0};
4244
+
4245
+ static swig_type_info *swig_type_initial[] = {
4246
+ &_swigt__p_DoubleArray,
4247
+ &_swigt__p_IntArray,
4248
+ &_swigt__p_char,
4249
+ &_swigt__p_double,
4250
+ &_swigt__p_f_p_void_int_int_p_q_const__double_int_p_q_const__int_int_p_p_char__void,
4251
+ &_swigt__p_int,
4252
+ &_swigt__p_void,
4253
+ };
4254
+
4255
+ static swig_cast_info _swigc__p_DoubleArray[] = { {&_swigt__p_DoubleArray, 0, 0, 0},{0, 0, 0, 0}};
4256
+ static swig_cast_info _swigc__p_IntArray[] = { {&_swigt__p_IntArray, 0, 0, 0},{0, 0, 0, 0}};
4257
+ static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
4258
+ static swig_cast_info _swigc__p_double[] = { {&_swigt__p_DoubleArray, _p_DoubleArrayTo_p_double, 0, 0}, {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}};
4259
+ static swig_cast_info _swigc__p_f_p_void_int_int_p_q_const__double_int_p_q_const__int_int_p_p_char__void[] = { {&_swigt__p_f_p_void_int_int_p_q_const__double_int_p_q_const__int_int_p_p_char__void, 0, 0, 0},{0, 0, 0, 0}};
4260
+ static swig_cast_info _swigc__p_int[] = { {&_swigt__p_IntArray, _p_IntArrayTo_p_int, 0, 0}, {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
4261
+ static swig_cast_info _swigc__p_void[] = { {&_swigt__p_void, 0, 0, 0},{0, 0, 0, 0}};
4262
+
4263
+ static swig_cast_info *swig_cast_initial[] = {
4264
+ _swigc__p_DoubleArray,
4265
+ _swigc__p_IntArray,
4266
+ _swigc__p_char,
4267
+ _swigc__p_double,
4268
+ _swigc__p_f_p_void_int_int_p_q_const__double_int_p_q_const__int_int_p_p_char__void,
4269
+ _swigc__p_int,
4270
+ _swigc__p_void,
4271
+ };
4272
+
4273
+
4274
+ /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
4275
+
4276
+ /* -----------------------------------------------------------------------------
4277
+ * Type initialization:
4278
+ * This problem is tough by the requirement that no dynamic
4279
+ * memory is used. Also, since swig_type_info structures store pointers to
4280
+ * swig_cast_info structures and swig_cast_info structures store pointers back
4281
+ * to swig_type_info structures, we need some lookup code at initialization.
4282
+ * The idea is that swig generates all the structures that are needed.
4283
+ * The runtime then collects these partially filled structures.
4284
+ * The SWIG_InitializeModule function takes these initial arrays out of
4285
+ * swig_module, and does all the lookup, filling in the swig_module.types
4286
+ * array with the correct data and linking the correct swig_cast_info
4287
+ * structures together.
4288
+ *
4289
+ * The generated swig_type_info structures are assigned staticly to an initial
4290
+ * array. We just loop through that array, and handle each type individually.
4291
+ * First we lookup if this type has been already loaded, and if so, use the
4292
+ * loaded structure instead of the generated one. Then we have to fill in the
4293
+ * cast linked list. The cast data is initially stored in something like a
4294
+ * two-dimensional array. Each row corresponds to a type (there are the same
4295
+ * number of rows as there are in the swig_type_initial array). Each entry in
4296
+ * a column is one of the swig_cast_info structures for that type.
4297
+ * The cast_initial array is actually an array of arrays, because each row has
4298
+ * a variable number of columns. So to actually build the cast linked list,
4299
+ * we find the array of casts associated with the type, and loop through it
4300
+ * adding the casts to the list. The one last trick we need to do is making
4301
+ * sure the type pointer in the swig_cast_info struct is correct.
4302
+ *
4303
+ * First off, we lookup the cast->type name to see if it is already loaded.
4304
+ * There are three cases to handle:
4305
+ * 1) If the cast->type has already been loaded AND the type we are adding
4306
+ * casting info to has not been loaded (it is in this module), THEN we
4307
+ * replace the cast->type pointer with the type pointer that has already
4308
+ * been loaded.
4309
+ * 2) If BOTH types (the one we are adding casting info to, and the
4310
+ * cast->type) are loaded, THEN the cast info has already been loaded by
4311
+ * the previous module so we just ignore it.
4312
+ * 3) Finally, if cast->type has not already been loaded, then we add that
4313
+ * swig_cast_info to the linked list (because the cast->type) pointer will
4314
+ * be correct.
4315
+ * ----------------------------------------------------------------------------- */
4316
+
4317
+ #ifdef __cplusplus
4318
+ extern "C" {
4319
+ #if 0
4320
+ } /* c-mode */
4321
+ #endif
4322
+ #endif
4323
+
4324
+ #if 0
4325
+ #define SWIGRUNTIME_DEBUG
4326
+ #endif
4327
+
4328
+
4329
+ SWIGRUNTIME void
4330
+ SWIG_InitializeModule(void *clientdata) {
4331
+ size_t i;
4332
+ swig_module_info *module_head, *iter;
4333
+ int found, init;
4334
+
4335
+ /* check to see if the circular list has been setup, if not, set it up */
4336
+ if (swig_module.next==0) {
4337
+ /* Initialize the swig_module */
4338
+ swig_module.type_initial = swig_type_initial;
4339
+ swig_module.cast_initial = swig_cast_initial;
4340
+ swig_module.next = &swig_module;
4341
+ init = 1;
4342
+ } else {
4343
+ init = 0;
4344
+ }
4345
+
4346
+ /* Try and load any already created modules */
4347
+ module_head = SWIG_GetModule(clientdata);
4348
+ if (!module_head) {
4349
+ /* This is the first module loaded for this interpreter */
4350
+ /* so set the swig module into the interpreter */
4351
+ SWIG_SetModule(clientdata, &swig_module);
4352
+ module_head = &swig_module;
4353
+ } else {
4354
+ /* the interpreter has loaded a SWIG module, but has it loaded this one? */
4355
+ found=0;
4356
+ iter=module_head;
4357
+ do {
4358
+ if (iter==&swig_module) {
4359
+ found=1;
4360
+ break;
4361
+ }
4362
+ iter=iter->next;
4363
+ } while (iter!= module_head);
4364
+
4365
+ /* if the is found in the list, then all is done and we may leave */
4366
+ if (found) return;
4367
+ /* otherwise we must add out module into the list */
4368
+ swig_module.next = module_head->next;
4369
+ module_head->next = &swig_module;
4370
+ }
4371
+
4372
+ /* When multiple interpreters are used, a module could have already been initialized in
4373
+ a different interpreter, but not yet have a pointer in this interpreter.
4374
+ In this case, we do not want to continue adding types... everything should be
4375
+ set up already */
4376
+ if (init == 0) return;
4377
+
4378
+ /* Now work on filling in swig_module.types */
4379
+ #ifdef SWIGRUNTIME_DEBUG
4380
+ printf("SWIG_InitializeModule: size %d\n", swig_module.size);
4381
+ #endif
4382
+ for (i = 0; i < swig_module.size; ++i) {
4383
+ swig_type_info *type = 0;
4384
+ swig_type_info *ret;
4385
+ swig_cast_info *cast;
4386
+
4387
+ #ifdef SWIGRUNTIME_DEBUG
4388
+ printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
4389
+ #endif
4390
+
4391
+ /* if there is another module already loaded */
4392
+ if (swig_module.next != &swig_module) {
4393
+ type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
4394
+ }
4395
+ if (type) {
4396
+ /* Overwrite clientdata field */
4397
+ #ifdef SWIGRUNTIME_DEBUG
4398
+ printf("SWIG_InitializeModule: found type %s\n", type->name);
4399
+ #endif
4400
+ if (swig_module.type_initial[i]->clientdata) {
4401
+ type->clientdata = swig_module.type_initial[i]->clientdata;
4402
+ #ifdef SWIGRUNTIME_DEBUG
4403
+ printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
4404
+ #endif
4405
+ }
4406
+ } else {
4407
+ type = swig_module.type_initial[i];
4408
+ }
4409
+
4410
+ /* Insert casting types */
4411
+ cast = swig_module.cast_initial[i];
4412
+ while (cast->type) {
4413
+
4414
+ /* Don't need to add information already in the list */
4415
+ ret = 0;
4416
+ #ifdef SWIGRUNTIME_DEBUG
4417
+ printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
4418
+ #endif
4419
+ if (swig_module.next != &swig_module) {
4420
+ ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
4421
+ #ifdef SWIGRUNTIME_DEBUG
4422
+ if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
4423
+ #endif
4424
+ }
4425
+ if (ret) {
4426
+ if (type == swig_module.type_initial[i]) {
4427
+ #ifdef SWIGRUNTIME_DEBUG
4428
+ printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
4429
+ #endif
4430
+ cast->type = ret;
4431
+ ret = 0;
4432
+ } else {
4433
+ /* Check for casting already in the list */
4434
+ swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
4435
+ #ifdef SWIGRUNTIME_DEBUG
4436
+ if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
4437
+ #endif
4438
+ if (!ocast) ret = 0;
4439
+ }
4440
+ }
4441
+
4442
+ if (!ret) {
4443
+ #ifdef SWIGRUNTIME_DEBUG
4444
+ printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
4445
+ #endif
4446
+ if (type->cast) {
4447
+ type->cast->prev = cast;
4448
+ cast->next = type->cast;
4449
+ }
4450
+ type->cast = cast;
4451
+ }
4452
+ cast++;
4453
+ }
4454
+ /* Set entry in modules->types array equal to the type */
4455
+ swig_module.types[i] = type;
4456
+ }
4457
+ swig_module.types[i] = 0;
4458
+
4459
+ #ifdef SWIGRUNTIME_DEBUG
4460
+ printf("**** SWIG_InitializeModule: Cast List ******\n");
4461
+ for (i = 0; i < swig_module.size; ++i) {
4462
+ int j = 0;
4463
+ swig_cast_info *cast = swig_module.cast_initial[i];
4464
+ printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
4465
+ while (cast->type) {
4466
+ printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
4467
+ cast++;
4468
+ ++j;
4469
+ }
4470
+ printf("---- Total casts: %d\n",j);
4471
+ }
4472
+ printf("**** SWIG_InitializeModule: Cast List ******\n");
4473
+ #endif
4474
+ }
4475
+
4476
+ /* This function will propagate the clientdata field of type to
4477
+ * any new swig_type_info structures that have been added into the list
4478
+ * of equivalent types. It is like calling
4479
+ * SWIG_TypeClientData(type, clientdata) a second time.
4480
+ */
4481
+ SWIGRUNTIME void
4482
+ SWIG_PropagateClientData(void) {
4483
+ size_t i;
4484
+ swig_cast_info *equiv;
4485
+ static int init_run = 0;
4486
+
4487
+ if (init_run) return;
4488
+ init_run = 1;
4489
+
4490
+ for (i = 0; i < swig_module.size; i++) {
4491
+ if (swig_module.types[i]->clientdata) {
4492
+ equiv = swig_module.types[i]->cast;
4493
+ while (equiv) {
4494
+ if (!equiv->converter) {
4495
+ if (equiv->type && !equiv->type->clientdata)
4496
+ SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
4497
+ }
4498
+ equiv = equiv->next;
4499
+ }
4500
+ }
4501
+ }
4502
+ }
4503
+
4504
+ #ifdef __cplusplus
4505
+ #if 0
4506
+ { /* c-mode */
4507
+ #endif
4508
+ }
4509
+ #endif
4510
+
4511
+ /*
4512
+
4513
+ */
4514
+ #ifdef __cplusplus
4515
+ extern "C"
4516
+ #endif
4517
+ SWIGEXPORT void Init_cbc_wrapper(void) {
4518
+ size_t i;
4519
+
4520
+ SWIG_InitRuntime();
4521
+ mCbc_wrapper = rb_define_module("Cbc_wrapper");
4522
+
4523
+ SWIG_InitializeModule(0);
4524
+ for (i = 0; i < swig_module.size; i++) {
4525
+ SWIG_define_class(swig_module.types[i]);
4526
+ }
4527
+
4528
+ SWIG_RubyInitializeTrackings();
4529
+
4530
+ SwigClassIntArray.klass = rb_define_class_under(mCbc_wrapper, "IntArray", rb_cObject);
4531
+ SWIG_TypeClientData(SWIGTYPE_p_IntArray, (void *) &SwigClassIntArray);
4532
+ rb_define_alloc_func(SwigClassIntArray.klass, _wrap_IntArray_allocate);
4533
+ rb_define_method(SwigClassIntArray.klass, "initialize", _wrap_new_IntArray, -1);
4534
+ rb_define_method(SwigClassIntArray.klass, "[]", _wrap_IntArray___getitem__, -1);
4535
+ rb_define_method(SwigClassIntArray.klass, "[]=", _wrap_IntArray___setitem__, -1);
4536
+ rb_define_method(SwigClassIntArray.klass, "cast", _wrap_IntArray_cast, -1);
4537
+ rb_define_singleton_method(SwigClassIntArray.klass, "frompointer", _wrap_IntArray_frompointer, -1);
4538
+ SwigClassIntArray.mark = 0;
4539
+ SwigClassIntArray.destroy = (void (*)(void *)) free_IntArray;
4540
+ SwigClassIntArray.trackObjects = 0;
4541
+
4542
+ SwigClassDoubleArray.klass = rb_define_class_under(mCbc_wrapper, "DoubleArray", rb_cObject);
4543
+ SWIG_TypeClientData(SWIGTYPE_p_DoubleArray, (void *) &SwigClassDoubleArray);
4544
+ rb_define_alloc_func(SwigClassDoubleArray.klass, _wrap_DoubleArray_allocate);
4545
+ rb_define_method(SwigClassDoubleArray.klass, "initialize", _wrap_new_DoubleArray, -1);
4546
+ rb_define_method(SwigClassDoubleArray.klass, "[]", _wrap_DoubleArray___getitem__, -1);
4547
+ rb_define_method(SwigClassDoubleArray.klass, "[]=", _wrap_DoubleArray___setitem__, -1);
4548
+ rb_define_method(SwigClassDoubleArray.klass, "cast", _wrap_DoubleArray_cast, -1);
4549
+ rb_define_singleton_method(SwigClassDoubleArray.klass, "frompointer", _wrap_DoubleArray_frompointer, -1);
4550
+ SwigClassDoubleArray.mark = 0;
4551
+ SwigClassDoubleArray.destroy = (void (*)(void *)) free_DoubleArray;
4552
+ SwigClassDoubleArray.trackObjects = 0;
4553
+ rb_define_module_function(mCbc_wrapper, "Cbc_newModel", _wrap_Cbc_newModel, -1);
4554
+ rb_define_module_function(mCbc_wrapper, "Cbc_deleteModel", _wrap_Cbc_deleteModel, -1);
4555
+ rb_define_module_function(mCbc_wrapper, "Cbc_getVersion", _wrap_Cbc_getVersion, -1);
4556
+ rb_define_module_function(mCbc_wrapper, "Cbc_loadProblem", _wrap_Cbc_loadProblem, -1);
4557
+ rb_define_module_function(mCbc_wrapper, "Cbc_readMps", _wrap_Cbc_readMps, -1);
4558
+ rb_define_module_function(mCbc_wrapper, "Cbc_writeMps", _wrap_Cbc_writeMps, -1);
4559
+ rb_define_module_function(mCbc_wrapper, "Cbc_setInitialSolution", _wrap_Cbc_setInitialSolution, -1);
4560
+ rb_define_module_function(mCbc_wrapper, "Cbc_problemName", _wrap_Cbc_problemName, -1);
4561
+ rb_define_module_function(mCbc_wrapper, "Cbc_setProblemName", _wrap_Cbc_setProblemName, -1);
4562
+ rb_define_module_function(mCbc_wrapper, "Cbc_getNumElements", _wrap_Cbc_getNumElements, -1);
4563
+ rb_define_module_function(mCbc_wrapper, "Cbc_getVectorStarts", _wrap_Cbc_getVectorStarts, -1);
4564
+ rb_define_module_function(mCbc_wrapper, "Cbc_getIndices", _wrap_Cbc_getIndices, -1);
4565
+ rb_define_module_function(mCbc_wrapper, "Cbc_getElements", _wrap_Cbc_getElements, -1);
4566
+ rb_define_module_function(mCbc_wrapper, "Cbc_maxNameLength", _wrap_Cbc_maxNameLength, -1);
4567
+ rb_define_module_function(mCbc_wrapper, "Cbc_getRowName", _wrap_Cbc_getRowName, -1);
4568
+ rb_define_module_function(mCbc_wrapper, "Cbc_getColName", _wrap_Cbc_getColName, -1);
4569
+ rb_define_module_function(mCbc_wrapper, "Cbc_setColName", _wrap_Cbc_setColName, -1);
4570
+ rb_define_module_function(mCbc_wrapper, "Cbc_setRowName", _wrap_Cbc_setRowName, -1);
4571
+ rb_define_module_function(mCbc_wrapper, "Cbc_getNumRows", _wrap_Cbc_getNumRows, -1);
4572
+ rb_define_module_function(mCbc_wrapper, "Cbc_getNumCols", _wrap_Cbc_getNumCols, -1);
4573
+ rb_define_module_function(mCbc_wrapper, "Cbc_setObjSense", _wrap_Cbc_setObjSense, -1);
4574
+ rb_define_module_function(mCbc_wrapper, "Cbc_getObjSense", _wrap_Cbc_getObjSense, -1);
4575
+ rb_define_module_function(mCbc_wrapper, "Cbc_getRowLower", _wrap_Cbc_getRowLower, -1);
4576
+ rb_define_module_function(mCbc_wrapper, "Cbc_setRowLower", _wrap_Cbc_setRowLower, -1);
4577
+ rb_define_module_function(mCbc_wrapper, "Cbc_getRowUpper", _wrap_Cbc_getRowUpper, -1);
4578
+ rb_define_module_function(mCbc_wrapper, "Cbc_setRowUpper", _wrap_Cbc_setRowUpper, -1);
4579
+ rb_define_module_function(mCbc_wrapper, "Cbc_getObjCoefficients", _wrap_Cbc_getObjCoefficients, -1);
4580
+ rb_define_module_function(mCbc_wrapper, "Cbc_setObjCoeff", _wrap_Cbc_setObjCoeff, -1);
4581
+ rb_define_module_function(mCbc_wrapper, "Cbc_getColLower", _wrap_Cbc_getColLower, -1);
4582
+ rb_define_module_function(mCbc_wrapper, "Cbc_setColLower", _wrap_Cbc_setColLower, -1);
4583
+ rb_define_module_function(mCbc_wrapper, "Cbc_getColUpper", _wrap_Cbc_getColUpper, -1);
4584
+ rb_define_module_function(mCbc_wrapper, "Cbc_setColUpper", _wrap_Cbc_setColUpper, -1);
4585
+ rb_define_module_function(mCbc_wrapper, "Cbc_isInteger", _wrap_Cbc_isInteger, -1);
4586
+ rb_define_module_function(mCbc_wrapper, "Cbc_setContinuous", _wrap_Cbc_setContinuous, -1);
4587
+ rb_define_module_function(mCbc_wrapper, "Cbc_setInteger", _wrap_Cbc_setInteger, -1);
4588
+ rb_define_module_function(mCbc_wrapper, "Cbc_addSOS", _wrap_Cbc_addSOS, -1);
4589
+ rb_define_module_function(mCbc_wrapper, "Cbc_printModel", _wrap_Cbc_printModel, -1);
4590
+ rb_define_module_function(mCbc_wrapper, "Cbc_clone", _wrap_Cbc_clone, -1);
4591
+ rb_define_module_function(mCbc_wrapper, "Cbc_setParameter", _wrap_Cbc_setParameter, -1);
4592
+ rb_define_module_function(mCbc_wrapper, "Cbc_registerCallBack", _wrap_Cbc_registerCallBack, -1);
4593
+ rb_define_module_function(mCbc_wrapper, "Cbc_clearCallBack", _wrap_Cbc_clearCallBack, -1);
4594
+ rb_define_module_function(mCbc_wrapper, "Cbc_solve", _wrap_Cbc_solve, -1);
4595
+ rb_define_module_function(mCbc_wrapper, "Cbc_sumPrimalInfeasibilities", _wrap_Cbc_sumPrimalInfeasibilities, -1);
4596
+ rb_define_module_function(mCbc_wrapper, "Cbc_numberPrimalInfeasibilities", _wrap_Cbc_numberPrimalInfeasibilities, -1);
4597
+ rb_define_module_function(mCbc_wrapper, "Cbc_checkSolution", _wrap_Cbc_checkSolution, -1);
4598
+ rb_define_module_function(mCbc_wrapper, "Cbc_getIterationCount", _wrap_Cbc_getIterationCount, -1);
4599
+ rb_define_module_function(mCbc_wrapper, "Cbc_isAbandoned", _wrap_Cbc_isAbandoned, -1);
4600
+ rb_define_module_function(mCbc_wrapper, "Cbc_isProvenOptimal", _wrap_Cbc_isProvenOptimal, -1);
4601
+ rb_define_module_function(mCbc_wrapper, "Cbc_isProvenInfeasible", _wrap_Cbc_isProvenInfeasible, -1);
4602
+ rb_define_module_function(mCbc_wrapper, "Cbc_isContinuousUnbounded", _wrap_Cbc_isContinuousUnbounded, -1);
4603
+ rb_define_module_function(mCbc_wrapper, "Cbc_isNodeLimitReached", _wrap_Cbc_isNodeLimitReached, -1);
4604
+ rb_define_module_function(mCbc_wrapper, "Cbc_isSecondsLimitReached", _wrap_Cbc_isSecondsLimitReached, -1);
4605
+ rb_define_module_function(mCbc_wrapper, "Cbc_isSolutionLimitReached", _wrap_Cbc_isSolutionLimitReached, -1);
4606
+ rb_define_module_function(mCbc_wrapper, "Cbc_isInitialSolveAbandoned", _wrap_Cbc_isInitialSolveAbandoned, -1);
4607
+ rb_define_module_function(mCbc_wrapper, "Cbc_isInitialSolveProvenOptimal", _wrap_Cbc_isInitialSolveProvenOptimal, -1);
4608
+ rb_define_module_function(mCbc_wrapper, "Cbc_isInitialSolveProvenPrimalInfeasible", _wrap_Cbc_isInitialSolveProvenPrimalInfeasible, -1);
4609
+ rb_define_module_function(mCbc_wrapper, "Cbc_getRowActivity", _wrap_Cbc_getRowActivity, -1);
4610
+ rb_define_module_function(mCbc_wrapper, "Cbc_getColSolution", _wrap_Cbc_getColSolution, -1);
4611
+ rb_define_module_function(mCbc_wrapper, "Cbc_getObjValue", _wrap_Cbc_getObjValue, -1);
4612
+ rb_define_module_function(mCbc_wrapper, "Cbc_getBestPossibleObjValue", _wrap_Cbc_getBestPossibleObjValue, -1);
4613
+ rb_define_module_function(mCbc_wrapper, "Cbc_getNodeCount", _wrap_Cbc_getNodeCount, -1);
4614
+ rb_define_module_function(mCbc_wrapper, "Cbc_printSolution", _wrap_Cbc_printSolution, -1);
4615
+ rb_define_module_function(mCbc_wrapper, "Cbc_status", _wrap_Cbc_status, -1);
4616
+ rb_define_module_function(mCbc_wrapper, "Cbc_secondaryStatus", _wrap_Cbc_secondaryStatus, -1);
4617
+ }
4618
+