ruby-cbc 0.1.9 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -5
- data/Rakefile +0 -2
- data/lib/ruby-cbc.rb +1 -1
- data/lib/ruby-cbc/problem.rb +6 -8
- data/lib/ruby-cbc/version.rb +1 -1
- data/ruby-cbc.gemspec +3 -2
- metadata +17 -287
- data/ext/ruby-cbc/cbc.i +0 -15
- data/ext/ruby-cbc/cbc_wrap.c +0 -4618
- data/ext/ruby-cbc/extconf.rb +0 -60
- data/ext/ruby-cbc/install/bin/cbc +0 -0
- data/ext/ruby-cbc/install/bin/clp +0 -0
- data/ext/ruby-cbc/install/include/coin/CbcBranchActual.hpp +0 -24
- data/ext/ruby-cbc/install/include/coin/CbcBranchAllDifferent.hpp +0 -62
- data/ext/ruby-cbc/install/include/coin/CbcBranchBase.hpp +0 -78
- data/ext/ruby-cbc/install/include/coin/CbcBranchCut.hpp +0 -183
- data/ext/ruby-cbc/install/include/coin/CbcBranchDecision.hpp +0 -129
- data/ext/ruby-cbc/install/include/coin/CbcBranchDefaultDecision.hpp +0 -100
- data/ext/ruby-cbc/install/include/coin/CbcBranchDynamic.hpp +0 -206
- data/ext/ruby-cbc/install/include/coin/CbcBranchLotsize.hpp +0 -242
- data/ext/ruby-cbc/install/include/coin/CbcBranchToFixLots.hpp +0 -94
- data/ext/ruby-cbc/install/include/coin/CbcBranchingObject.hpp +0 -236
- data/ext/ruby-cbc/install/include/coin/CbcClique.hpp +0 -303
- data/ext/ruby-cbc/install/include/coin/CbcCompare.hpp +0 -39
- data/ext/ruby-cbc/install/include/coin/CbcCompareActual.hpp +0 -14
- data/ext/ruby-cbc/install/include/coin/CbcCompareBase.hpp +0 -142
- data/ext/ruby-cbc/install/include/coin/CbcCompareDefault.hpp +0 -120
- data/ext/ruby-cbc/install/include/coin/CbcCompareDepth.hpp +0 -47
- data/ext/ruby-cbc/install/include/coin/CbcCompareEstimate.hpp +0 -48
- data/ext/ruby-cbc/install/include/coin/CbcCompareObjective.hpp +0 -49
- data/ext/ruby-cbc/install/include/coin/CbcConfig.h +0 -14
- data/ext/ruby-cbc/install/include/coin/CbcConsequence.hpp +0 -49
- data/ext/ruby-cbc/install/include/coin/CbcCountRowCut.hpp +0 -168
- data/ext/ruby-cbc/install/include/coin/CbcCutGenerator.hpp +0 -482
- data/ext/ruby-cbc/install/include/coin/CbcCutModifier.hpp +0 -57
- data/ext/ruby-cbc/install/include/coin/CbcCutSubsetModifier.hpp +0 -66
- data/ext/ruby-cbc/install/include/coin/CbcDummyBranchingObject.hpp +0 -83
- data/ext/ruby-cbc/install/include/coin/CbcEventHandler.hpp +0 -245
- data/ext/ruby-cbc/install/include/coin/CbcFathom.hpp +0 -137
- data/ext/ruby-cbc/install/include/coin/CbcFathomDynamicProgramming.hpp +0 -169
- data/ext/ruby-cbc/install/include/coin/CbcFeasibilityBase.hpp +0 -56
- data/ext/ruby-cbc/install/include/coin/CbcFixVariable.hpp +0 -67
- data/ext/ruby-cbc/install/include/coin/CbcFollowOn.hpp +0 -207
- data/ext/ruby-cbc/install/include/coin/CbcFullNodeInfo.hpp +0 -161
- data/ext/ruby-cbc/install/include/coin/CbcGeneral.hpp +0 -60
- data/ext/ruby-cbc/install/include/coin/CbcGeneralDepth.hpp +0 -279
- data/ext/ruby-cbc/install/include/coin/CbcHeuristic.hpp +0 -682
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicDINS.hpp +0 -96
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicDW.hpp +0 -309
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicDive.hpp +0 -192
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicDiveCoefficient.hpp +0 -52
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicDiveFractional.hpp +0 -52
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicDiveGuided.hpp +0 -55
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicDiveLineSearch.hpp +0 -52
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicDivePseudoCost.hpp +0 -60
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicDiveVectorLength.hpp +0 -52
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicFPump.hpp +0 -340
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicGreedy.hpp +0 -280
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicLocal.hpp +0 -271
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicPivotAndFix.hpp +0 -58
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicRENS.hpp +0 -77
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicRINS.hpp +0 -102
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicRandRound.hpp +0 -58
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicVND.hpp +0 -94
- data/ext/ruby-cbc/install/include/coin/CbcLinked.hpp +0 -1406
- data/ext/ruby-cbc/install/include/coin/CbcMessage.hpp +0 -94
- data/ext/ruby-cbc/install/include/coin/CbcMipStartIO.hpp +0 -26
- data/ext/ruby-cbc/install/include/coin/CbcModel.hpp +0 -2952
- data/ext/ruby-cbc/install/include/coin/CbcNWay.hpp +0 -166
- data/ext/ruby-cbc/install/include/coin/CbcNode.hpp +0 -351
- data/ext/ruby-cbc/install/include/coin/CbcNodeInfo.hpp +0 -349
- data/ext/ruby-cbc/install/include/coin/CbcObject.hpp +0 -272
- data/ext/ruby-cbc/install/include/coin/CbcObjectUpdateData.hpp +0 -64
- data/ext/ruby-cbc/install/include/coin/CbcOrClpParam.cpp +0 -4134
- data/ext/ruby-cbc/install/include/coin/CbcOrClpParam.hpp +0 -532
- data/ext/ruby-cbc/install/include/coin/CbcParam.hpp +0 -324
- data/ext/ruby-cbc/install/include/coin/CbcPartialNodeInfo.hpp +0 -110
- data/ext/ruby-cbc/install/include/coin/CbcSOS.hpp +0 -279
- data/ext/ruby-cbc/install/include/coin/CbcSimpleInteger.hpp +0 -286
- data/ext/ruby-cbc/install/include/coin/CbcSimpleIntegerDynamicPseudoCost.hpp +0 -564
- data/ext/ruby-cbc/install/include/coin/CbcSimpleIntegerPseudoCost.hpp +0 -114
- data/ext/ruby-cbc/install/include/coin/CbcSolver.hpp +0 -447
- data/ext/ruby-cbc/install/include/coin/CbcStrategy.hpp +0 -258
- data/ext/ruby-cbc/install/include/coin/CbcSubProblem.hpp +0 -83
- data/ext/ruby-cbc/install/include/coin/CbcTree.hpp +0 -490
- data/ext/ruby-cbc/install/include/coin/CbcTreeLocal.hpp +0 -372
- data/ext/ruby-cbc/install/include/coin/Cbc_C_Interface.h +0 -381
- data/ext/ruby-cbc/install/include/coin/Cgl012cut.hpp +0 -464
- data/ext/ruby-cbc/install/include/coin/CglAllDifferent.hpp +0 -115
- data/ext/ruby-cbc/install/include/coin/CglClique.hpp +0 -308
- data/ext/ruby-cbc/install/include/coin/CglConfig.h +0 -19
- data/ext/ruby-cbc/install/include/coin/CglCutGenerator.hpp +0 -121
- data/ext/ruby-cbc/install/include/coin/CglDuplicateRow.hpp +0 -189
- data/ext/ruby-cbc/install/include/coin/CglFlowCover.hpp +0 -371
- data/ext/ruby-cbc/install/include/coin/CglGMI.hpp +0 -364
- data/ext/ruby-cbc/install/include/coin/CglGMIParam.hpp +0 -313
- data/ext/ruby-cbc/install/include/coin/CglGomory.hpp +0 -204
- data/ext/ruby-cbc/install/include/coin/CglKnapsackCover.hpp +0 -310
- data/ext/ruby-cbc/install/include/coin/CglLandP.hpp +0 -306
- data/ext/ruby-cbc/install/include/coin/CglLandPValidator.hpp +0 -130
- data/ext/ruby-cbc/install/include/coin/CglLiftAndProject.hpp +0 -104
- data/ext/ruby-cbc/install/include/coin/CglMessage.hpp +0 -50
- data/ext/ruby-cbc/install/include/coin/CglMixedIntegerRounding.hpp +0 -429
- data/ext/ruby-cbc/install/include/coin/CglMixedIntegerRounding2.hpp +0 -427
- data/ext/ruby-cbc/install/include/coin/CglOddHole.hpp +0 -160
- data/ext/ruby-cbc/install/include/coin/CglParam.hpp +0 -93
- data/ext/ruby-cbc/install/include/coin/CglPreProcess.hpp +0 -492
- data/ext/ruby-cbc/install/include/coin/CglProbing.hpp +0 -543
- data/ext/ruby-cbc/install/include/coin/CglRedSplit.hpp +0 -448
- data/ext/ruby-cbc/install/include/coin/CglRedSplit2.hpp +0 -494
- data/ext/ruby-cbc/install/include/coin/CglRedSplit2Param.hpp +0 -495
- data/ext/ruby-cbc/install/include/coin/CglRedSplitParam.hpp +0 -272
- data/ext/ruby-cbc/install/include/coin/CglResidualCapacity.hpp +0 -240
- data/ext/ruby-cbc/install/include/coin/CglSimpleRounding.hpp +0 -174
- data/ext/ruby-cbc/install/include/coin/CglStored.hpp +0 -125
- data/ext/ruby-cbc/install/include/coin/CglTreeInfo.hpp +0 -180
- data/ext/ruby-cbc/install/include/coin/CglTwomir.hpp +0 -565
- data/ext/ruby-cbc/install/include/coin/CglZeroHalf.hpp +0 -133
- data/ext/ruby-cbc/install/include/coin/ClpAmplObjective.hpp +0 -113
- data/ext/ruby-cbc/install/include/coin/ClpCholeskyBase.hpp +0 -294
- data/ext/ruby-cbc/install/include/coin/ClpCholeskyDense.hpp +0 -162
- data/ext/ruby-cbc/install/include/coin/ClpConfig.h +0 -17
- data/ext/ruby-cbc/install/include/coin/ClpConstraint.hpp +0 -125
- data/ext/ruby-cbc/install/include/coin/ClpConstraintAmpl.hpp +0 -108
- data/ext/ruby-cbc/install/include/coin/ClpConstraintLinear.hpp +0 -110
- data/ext/ruby-cbc/install/include/coin/ClpConstraintQuadratic.hpp +0 -119
- data/ext/ruby-cbc/install/include/coin/ClpDualRowDantzig.hpp +0 -71
- data/ext/ruby-cbc/install/include/coin/ClpDualRowPivot.hpp +0 -129
- data/ext/ruby-cbc/install/include/coin/ClpDualRowSteepest.hpp +0 -153
- data/ext/ruby-cbc/install/include/coin/ClpDummyMatrix.hpp +0 -183
- data/ext/ruby-cbc/install/include/coin/ClpDynamicExampleMatrix.hpp +0 -186
- data/ext/ruby-cbc/install/include/coin/ClpDynamicMatrix.hpp +0 -381
- data/ext/ruby-cbc/install/include/coin/ClpEventHandler.hpp +0 -187
- data/ext/ruby-cbc/install/include/coin/ClpFactorization.hpp +0 -432
- data/ext/ruby-cbc/install/include/coin/ClpGubDynamicMatrix.hpp +0 -247
- data/ext/ruby-cbc/install/include/coin/ClpGubMatrix.hpp +0 -358
- data/ext/ruby-cbc/install/include/coin/ClpInterior.hpp +0 -570
- data/ext/ruby-cbc/install/include/coin/ClpLinearObjective.hpp +0 -103
- data/ext/ruby-cbc/install/include/coin/ClpMatrixBase.hpp +0 -524
- data/ext/ruby-cbc/install/include/coin/ClpMessage.hpp +0 -131
- data/ext/ruby-cbc/install/include/coin/ClpModel.hpp +0 -1307
- data/ext/ruby-cbc/install/include/coin/ClpNetworkMatrix.hpp +0 -229
- data/ext/ruby-cbc/install/include/coin/ClpNode.hpp +0 -349
- data/ext/ruby-cbc/install/include/coin/ClpNonLinearCost.hpp +0 -401
- data/ext/ruby-cbc/install/include/coin/ClpObjective.hpp +0 -134
- data/ext/ruby-cbc/install/include/coin/ClpPackedMatrix.hpp +0 -638
- data/ext/ruby-cbc/install/include/coin/ClpParameters.hpp +0 -126
- data/ext/ruby-cbc/install/include/coin/ClpPdcoBase.hpp +0 -103
- data/ext/ruby-cbc/install/include/coin/ClpPlusMinusOneMatrix.hpp +0 -290
- data/ext/ruby-cbc/install/include/coin/ClpPresolve.hpp +0 -299
- data/ext/ruby-cbc/install/include/coin/ClpPrimalColumnDantzig.hpp +0 -72
- data/ext/ruby-cbc/install/include/coin/ClpPrimalColumnPivot.hpp +0 -155
- data/ext/ruby-cbc/install/include/coin/ClpPrimalColumnSteepest.hpp +0 -247
- data/ext/ruby-cbc/install/include/coin/ClpQuadraticObjective.hpp +0 -155
- data/ext/ruby-cbc/install/include/coin/ClpSimplex.hpp +0 -1797
- data/ext/ruby-cbc/install/include/coin/ClpSimplexDual.hpp +0 -300
- data/ext/ruby-cbc/install/include/coin/ClpSimplexNonlinear.hpp +0 -117
- data/ext/ruby-cbc/install/include/coin/ClpSimplexOther.hpp +0 -277
- data/ext/ruby-cbc/install/include/coin/ClpSimplexPrimal.hpp +0 -244
- data/ext/ruby-cbc/install/include/coin/ClpSolve.hpp +0 -446
- data/ext/ruby-cbc/install/include/coin/Clp_C_Interface.h +0 -525
- data/ext/ruby-cbc/install/include/coin/CoinAlloc.hpp +0 -176
- data/ext/ruby-cbc/install/include/coin/CoinBuild.hpp +0 -149
- data/ext/ruby-cbc/install/include/coin/CoinDenseFactorization.hpp +0 -419
- data/ext/ruby-cbc/install/include/coin/CoinDenseVector.hpp +0 -383
- data/ext/ruby-cbc/install/include/coin/CoinDistance.hpp +0 -48
- data/ext/ruby-cbc/install/include/coin/CoinError.hpp +0 -257
- data/ext/ruby-cbc/install/include/coin/CoinFactorization.hpp +0 -2044
- data/ext/ruby-cbc/install/include/coin/CoinFileIO.hpp +0 -166
- data/ext/ruby-cbc/install/include/coin/CoinFinite.hpp +0 -34
- data/ext/ruby-cbc/install/include/coin/CoinFloatEqual.hpp +0 -177
- data/ext/ruby-cbc/install/include/coin/CoinHelperFunctions.hpp +0 -1111
- data/ext/ruby-cbc/install/include/coin/CoinIndexedVector.hpp +0 -1164
- data/ext/ruby-cbc/install/include/coin/CoinLpIO.hpp +0 -805
- data/ext/ruby-cbc/install/include/coin/CoinMessage.hpp +0 -96
- data/ext/ruby-cbc/install/include/coin/CoinMessageHandler.hpp +0 -666
- data/ext/ruby-cbc/install/include/coin/CoinModel.hpp +0 -1054
- data/ext/ruby-cbc/install/include/coin/CoinModelUseful.hpp +0 -441
- data/ext/ruby-cbc/install/include/coin/CoinMpsIO.hpp +0 -1056
- data/ext/ruby-cbc/install/include/coin/CoinOslFactorization.hpp +0 -280
- data/ext/ruby-cbc/install/include/coin/CoinPackedMatrix.hpp +0 -947
- data/ext/ruby-cbc/install/include/coin/CoinPackedVector.hpp +0 -657
- data/ext/ruby-cbc/install/include/coin/CoinPackedVectorBase.hpp +0 -269
- data/ext/ruby-cbc/install/include/coin/CoinParam.hpp +0 -644
- data/ext/ruby-cbc/install/include/coin/CoinPragma.hpp +0 -26
- data/ext/ruby-cbc/install/include/coin/CoinPresolveDoubleton.hpp +0 -73
- data/ext/ruby-cbc/install/include/coin/CoinPresolveDual.hpp +0 -85
- data/ext/ruby-cbc/install/include/coin/CoinPresolveDupcol.hpp +0 -226
- data/ext/ruby-cbc/install/include/coin/CoinPresolveEmpty.hpp +0 -116
- data/ext/ruby-cbc/install/include/coin/CoinPresolveFixed.hpp +0 -181
- data/ext/ruby-cbc/install/include/coin/CoinPresolveForcing.hpp +0 -61
- data/ext/ruby-cbc/install/include/coin/CoinPresolveImpliedFree.hpp +0 -60
- data/ext/ruby-cbc/install/include/coin/CoinPresolveIsolated.hpp +0 -51
- data/ext/ruby-cbc/install/include/coin/CoinPresolveMatrix.hpp +0 -1842
- data/ext/ruby-cbc/install/include/coin/CoinPresolveMonitor.hpp +0 -105
- data/ext/ruby-cbc/install/include/coin/CoinPresolvePsdebug.hpp +0 -166
- data/ext/ruby-cbc/install/include/coin/CoinPresolveSingleton.hpp +0 -112
- data/ext/ruby-cbc/install/include/coin/CoinPresolveSubst.hpp +0 -101
- data/ext/ruby-cbc/install/include/coin/CoinPresolveTighten.hpp +0 -55
- data/ext/ruby-cbc/install/include/coin/CoinPresolveTripleton.hpp +0 -66
- data/ext/ruby-cbc/install/include/coin/CoinPresolveUseless.hpp +0 -63
- data/ext/ruby-cbc/install/include/coin/CoinPresolveZeros.hpp +0 -60
- data/ext/ruby-cbc/install/include/coin/CoinRational.hpp +0 -44
- data/ext/ruby-cbc/install/include/coin/CoinSearchTree.hpp +0 -465
- data/ext/ruby-cbc/install/include/coin/CoinShallowPackedVector.hpp +0 -148
- data/ext/ruby-cbc/install/include/coin/CoinSignal.hpp +0 -117
- data/ext/ruby-cbc/install/include/coin/CoinSimpFactorization.hpp +0 -431
- data/ext/ruby-cbc/install/include/coin/CoinSmartPtr.hpp +0 -528
- data/ext/ruby-cbc/install/include/coin/CoinSnapshot.hpp +0 -476
- data/ext/ruby-cbc/install/include/coin/CoinSort.hpp +0 -678
- data/ext/ruby-cbc/install/include/coin/CoinStructuredModel.hpp +0 -247
- data/ext/ruby-cbc/install/include/coin/CoinTime.hpp +0 -310
- data/ext/ruby-cbc/install/include/coin/CoinTypes.hpp +0 -64
- data/ext/ruby-cbc/install/include/coin/CoinUtility.hpp +0 -19
- data/ext/ruby-cbc/install/include/coin/CoinUtilsConfig.h +0 -34
- data/ext/ruby-cbc/install/include/coin/CoinWarmStart.hpp +0 -58
- data/ext/ruby-cbc/install/include/coin/CoinWarmStartBasis.hpp +0 -456
- data/ext/ruby-cbc/install/include/coin/CoinWarmStartDual.hpp +0 -166
- data/ext/ruby-cbc/install/include/coin/CoinWarmStartPrimalDual.hpp +0 -211
- data/ext/ruby-cbc/install/include/coin/CoinWarmStartVector.hpp +0 -488
- data/ext/ruby-cbc/install/include/coin/Coin_C_defines.h +0 -115
- data/ext/ruby-cbc/install/include/coin/Idiot.hpp +0 -298
- data/ext/ruby-cbc/install/include/coin/OsiAuxInfo.hpp +0 -206
- data/ext/ruby-cbc/install/include/coin/OsiBranchingObject.hpp +0 -1005
- data/ext/ruby-cbc/install/include/coin/OsiCbcSolverInterface.hpp +0 -764
- data/ext/ruby-cbc/install/include/coin/OsiChooseVariable.hpp +0 -534
- data/ext/ruby-cbc/install/include/coin/OsiClpSolverInterface.hpp +0 -1509
- data/ext/ruby-cbc/install/include/coin/OsiColCut.hpp +0 -324
- data/ext/ruby-cbc/install/include/coin/OsiCollections.hpp +0 -35
- data/ext/ruby-cbc/install/include/coin/OsiConfig.h +0 -19
- data/ext/ruby-cbc/install/include/coin/OsiCut.hpp +0 -245
- data/ext/ruby-cbc/install/include/coin/OsiCuts.hpp +0 -474
- data/ext/ruby-cbc/install/include/coin/OsiPresolve.hpp +0 -252
- data/ext/ruby-cbc/install/include/coin/OsiRowCut.hpp +0 -331
- data/ext/ruby-cbc/install/include/coin/OsiRowCutDebugger.hpp +0 -187
- data/ext/ruby-cbc/install/include/coin/OsiSolverBranch.hpp +0 -152
- data/ext/ruby-cbc/install/include/coin/OsiSolverInterface.hpp +0 -2143
- data/ext/ruby-cbc/install/include/coin/OsiSolverParameters.hpp +0 -142
- data/ext/ruby-cbc/install/include/coin/OsiUnitTests.hpp +0 -374
- data/ext/ruby-cbc/install/lib/libCbc.la +0 -35
- data/ext/ruby-cbc/install/lib/libCbc.so +0 -0
- data/ext/ruby-cbc/install/lib/libCbc.so.3 +0 -0
- data/ext/ruby-cbc/install/lib/libCbc.so.3.9.7 +0 -0
- data/ext/ruby-cbc/install/lib/libCbcSolver.la +0 -35
- data/ext/ruby-cbc/install/lib/libCbcSolver.so +0 -0
- data/ext/ruby-cbc/install/lib/libCbcSolver.so.3 +0 -0
- data/ext/ruby-cbc/install/lib/libCbcSolver.so.3.9.7 +0 -0
- data/ext/ruby-cbc/install/lib/libCgl.la +0 -35
- data/ext/ruby-cbc/install/lib/libCgl.so +0 -0
- data/ext/ruby-cbc/install/lib/libCgl.so.1 +0 -0
- data/ext/ruby-cbc/install/lib/libCgl.so.1.9.7 +0 -0
- data/ext/ruby-cbc/install/lib/libClp.la +0 -35
- data/ext/ruby-cbc/install/lib/libClp.so +0 -0
- data/ext/ruby-cbc/install/lib/libClp.so.1 +0 -0
- data/ext/ruby-cbc/install/lib/libClp.so.1.13.9 +0 -0
- data/ext/ruby-cbc/install/lib/libClpSolver.la +0 -35
- data/ext/ruby-cbc/install/lib/libClpSolver.so +0 -0
- data/ext/ruby-cbc/install/lib/libClpSolver.so.1 +0 -0
- data/ext/ruby-cbc/install/lib/libClpSolver.so.1.13.9 +0 -0
- data/ext/ruby-cbc/install/lib/libCoinUtils.la +0 -35
- data/ext/ruby-cbc/install/lib/libCoinUtils.so +0 -0
- data/ext/ruby-cbc/install/lib/libCoinUtils.so.3 +0 -0
- data/ext/ruby-cbc/install/lib/libCoinUtils.so.3.10.11 +0 -0
- data/ext/ruby-cbc/install/lib/libOsi.la +0 -35
- data/ext/ruby-cbc/install/lib/libOsi.so +0 -0
- data/ext/ruby-cbc/install/lib/libOsi.so.1 +0 -0
- data/ext/ruby-cbc/install/lib/libOsi.so.1.12.6 +0 -0
- data/ext/ruby-cbc/install/lib/libOsiCbc.la +0 -35
- data/ext/ruby-cbc/install/lib/libOsiCbc.so +0 -0
- data/ext/ruby-cbc/install/lib/libOsiCbc.so.3 +0 -0
- data/ext/ruby-cbc/install/lib/libOsiCbc.so.3.9.7 +0 -0
- data/ext/ruby-cbc/install/lib/libOsiClp.la +0 -35
- data/ext/ruby-cbc/install/lib/libOsiClp.so +0 -0
- data/ext/ruby-cbc/install/lib/libOsiClp.so.1 +0 -0
- data/ext/ruby-cbc/install/lib/libOsiClp.so.1.13.9 +0 -0
- data/ext/ruby-cbc/install/lib/libOsiCommonTests.la +0 -35
- data/ext/ruby-cbc/install/lib/libOsiCommonTests.so +0 -0
- data/ext/ruby-cbc/install/lib/libOsiCommonTests.so.1 +0 -0
- data/ext/ruby-cbc/install/lib/libOsiCommonTests.so.1.12.6 +0 -0
- data/ext/ruby-cbc/install/lib/pkgconfig/cbc.pc +0 -12
- data/ext/ruby-cbc/install/lib/pkgconfig/cgl.pc +0 -12
- data/ext/ruby-cbc/install/lib/pkgconfig/clp.pc +0 -12
- data/ext/ruby-cbc/install/lib/pkgconfig/coindatamiplib3.pc +0 -9
- data/ext/ruby-cbc/install/lib/pkgconfig/coindatasample.pc +0 -9
- data/ext/ruby-cbc/install/lib/pkgconfig/coinutils.pc +0 -12
- data/ext/ruby-cbc/install/lib/pkgconfig/osi-cbc.pc +0 -12
- data/ext/ruby-cbc/install/lib/pkgconfig/osi-clp.pc +0 -12
- data/ext/ruby-cbc/install/lib/pkgconfig/osi-unittests.pc +0 -12
- data/ext/ruby-cbc/install/lib/pkgconfig/osi.pc +0 -12
@@ -1,383 +0,0 @@
|
|
1
|
-
/* $Id: CoinDenseVector.hpp 1372 2011-01-03 23:31:00Z lou $ */
|
2
|
-
// Copyright (C) 2003, International Business Machines
|
3
|
-
// Corporation and others. All Rights Reserved.
|
4
|
-
// This code is licensed under the terms of the Eclipse Public License (EPL).
|
5
|
-
|
6
|
-
#ifndef CoinDenseVector_H
|
7
|
-
#define CoinDenseVector_H
|
8
|
-
|
9
|
-
#if defined(_MSC_VER)
|
10
|
-
// Turn off compiler warning about long names
|
11
|
-
# pragma warning(disable:4786)
|
12
|
-
#endif
|
13
|
-
|
14
|
-
#include <cassert>
|
15
|
-
#include <cstdlib>
|
16
|
-
#include <cmath>
|
17
|
-
#include "CoinHelperFunctions.hpp"
|
18
|
-
|
19
|
-
//#############################################################################
|
20
|
-
/** A function that tests the methods in the CoinDenseVector class. The
|
21
|
-
only reason for it not to be a member method is that this way it doesn't
|
22
|
-
have to be compiled into the library. And that's a gain, because the
|
23
|
-
library should be compiled with optimization on, but this method should be
|
24
|
-
compiled with debugging. */
|
25
|
-
template <typename T> void
|
26
|
-
CoinDenseVectorUnitTest(T dummy);
|
27
|
-
|
28
|
-
//#############################################################################
|
29
|
-
/** Dense Vector
|
30
|
-
|
31
|
-
Stores a dense (or expanded) vector of floating point values.
|
32
|
-
Type of vector elements is controlled by templating.
|
33
|
-
(Some working quantities such as accumulated sums
|
34
|
-
are explicitly declared of type double). This allows the
|
35
|
-
components of the vector integer, single or double precision.
|
36
|
-
|
37
|
-
Here is a sample usage:
|
38
|
-
@verbatim
|
39
|
-
const int ne = 4;
|
40
|
-
double el[ne] = { 10., 40., 1., 50. }
|
41
|
-
|
42
|
-
// Create vector and set its value
|
43
|
-
CoinDenseVector<double> r(ne,el);
|
44
|
-
|
45
|
-
// access each element
|
46
|
-
assert( r.getElements()[0]==10. );
|
47
|
-
assert( r.getElements()[1]==40. );
|
48
|
-
assert( r.getElements()[2]== 1. );
|
49
|
-
assert( r.getElements()[3]==50. );
|
50
|
-
|
51
|
-
// Test for equality
|
52
|
-
CoinDenseVector<double> r1;
|
53
|
-
r1=r;
|
54
|
-
|
55
|
-
// Add dense vectors.
|
56
|
-
// Similarly for subtraction, multiplication,
|
57
|
-
// and division.
|
58
|
-
CoinDenseVector<double> add = r + r1;
|
59
|
-
assert( add[0] == 10.+10. );
|
60
|
-
assert( add[1] == 40.+40. );
|
61
|
-
assert( add[2] == 1.+ 1. );
|
62
|
-
assert( add[3] == 50.+50. );
|
63
|
-
|
64
|
-
assert( r.sum() == 10.+40.+1.+50. );
|
65
|
-
@endverbatim
|
66
|
-
*/
|
67
|
-
template <typename T> class CoinDenseVector {
|
68
|
-
private:
|
69
|
-
/**@name Private member data */
|
70
|
-
//@{
|
71
|
-
/// Size of element vector
|
72
|
-
int nElements_;
|
73
|
-
///Vector elements
|
74
|
-
T * elements_;
|
75
|
-
//@}
|
76
|
-
|
77
|
-
public:
|
78
|
-
/**@name Get methods. */
|
79
|
-
//@{
|
80
|
-
/// Get the size
|
81
|
-
inline int getNumElements() const { return nElements_; }
|
82
|
-
inline int size() const { return nElements_; }
|
83
|
-
/// Get element values
|
84
|
-
inline const T * getElements() const { return elements_; }
|
85
|
-
/// Get element values
|
86
|
-
inline T * getElements() { return elements_; }
|
87
|
-
//@}
|
88
|
-
|
89
|
-
//-------------------------------------------------------------------
|
90
|
-
// Set indices and elements
|
91
|
-
//-------------------------------------------------------------------
|
92
|
-
/**@name Set methods */
|
93
|
-
//@{
|
94
|
-
/// Reset the vector (i.e. set all elemenets to zero)
|
95
|
-
void clear();
|
96
|
-
/** Assignment operator */
|
97
|
-
CoinDenseVector & operator=(const CoinDenseVector &);
|
98
|
-
/** Member of array operator */
|
99
|
-
T & operator[](int index) const;
|
100
|
-
|
101
|
-
/** Set vector size, and elements.
|
102
|
-
Size is the length of the elements vector.
|
103
|
-
The element vector is copied into this class instance's
|
104
|
-
member data. */
|
105
|
-
void setVector(int size, const T * elems);
|
106
|
-
|
107
|
-
|
108
|
-
/** Elements set to have the same scalar value */
|
109
|
-
void setConstant(int size, T elems);
|
110
|
-
|
111
|
-
|
112
|
-
/** Set an existing element in the dense vector
|
113
|
-
The first argument is the "index" into the elements() array
|
114
|
-
*/
|
115
|
-
void setElement(int index, T element);
|
116
|
-
/** Resize the dense vector to be the first newSize elements.
|
117
|
-
If length is decreased, vector is truncated. If increased
|
118
|
-
new entries, set to new default element */
|
119
|
-
void resize(int newSize, T fill=T());
|
120
|
-
|
121
|
-
/** Append a dense vector to this dense vector */
|
122
|
-
void append(const CoinDenseVector &);
|
123
|
-
//@}
|
124
|
-
|
125
|
-
/**@name norms, sum and scale */
|
126
|
-
//@{
|
127
|
-
/// 1-norm of vector
|
128
|
-
inline T oneNorm() const {
|
129
|
-
T norm = 0;
|
130
|
-
for (int i=0; i<nElements_; i++)
|
131
|
-
norm += CoinAbs(elements_[i]);
|
132
|
-
return norm;
|
133
|
-
}
|
134
|
-
/// 2-norm of vector
|
135
|
-
inline double twoNorm() const {
|
136
|
-
double norm = 0.;
|
137
|
-
for (int i=0; i<nElements_; i++)
|
138
|
-
norm += elements_[i] * elements_[i];
|
139
|
-
// std namespace removed because it was causing a compile
|
140
|
-
// problem with Microsoft Visual C++
|
141
|
-
return /*std::*/sqrt(norm);
|
142
|
-
}
|
143
|
-
/// infinity-norm of vector
|
144
|
-
inline T infNorm() const {
|
145
|
-
T norm = 0;
|
146
|
-
for (int i=0; i<nElements_; i++)
|
147
|
-
norm = CoinMax(norm, CoinAbs(elements_[i]));
|
148
|
-
return norm;
|
149
|
-
}
|
150
|
-
/// sum of vector elements
|
151
|
-
inline T sum() const {
|
152
|
-
T sume = 0;
|
153
|
-
for (int i=0; i<nElements_; i++)
|
154
|
-
sume += elements_[i];
|
155
|
-
return sume;
|
156
|
-
}
|
157
|
-
/// scale vector elements
|
158
|
-
inline void scale(T factor) {
|
159
|
-
for (int i=0; i<nElements_; i++)
|
160
|
-
elements_[i] *= factor;
|
161
|
-
return;
|
162
|
-
}
|
163
|
-
//@}
|
164
|
-
|
165
|
-
/**@name Arithmetic operators. */
|
166
|
-
//@{
|
167
|
-
/// add <code>value</code> to every entry
|
168
|
-
void operator+=(T value);
|
169
|
-
/// subtract <code>value</code> from every entry
|
170
|
-
void operator-=(T value);
|
171
|
-
/// multiply every entry by <code>value</code>
|
172
|
-
void operator*=(T value);
|
173
|
-
/// divide every entry by <code>value</code>
|
174
|
-
void operator/=(T value);
|
175
|
-
//@}
|
176
|
-
|
177
|
-
/**@name Constructors and destructors */
|
178
|
-
//@{
|
179
|
-
/** Default constructor */
|
180
|
-
CoinDenseVector();
|
181
|
-
/** Alternate Constructors - set elements to vector of Ts */
|
182
|
-
CoinDenseVector(int size, const T * elems);
|
183
|
-
/** Alternate Constructors - set elements to same scalar value */
|
184
|
-
CoinDenseVector(int size, T element=T());
|
185
|
-
/** Copy constructors */
|
186
|
-
CoinDenseVector(const CoinDenseVector &);
|
187
|
-
|
188
|
-
/** Destructor */
|
189
|
-
~CoinDenseVector ();
|
190
|
-
//@}
|
191
|
-
|
192
|
-
private:
|
193
|
-
/**@name Private methods */
|
194
|
-
//@{
|
195
|
-
/// Copy internal data
|
196
|
-
void gutsOfSetVector(int size, const T * elems);
|
197
|
-
/// Set all elements to a given value
|
198
|
-
void gutsOfSetConstant(int size, T value);
|
199
|
-
//@}
|
200
|
-
};
|
201
|
-
|
202
|
-
//#############################################################################
|
203
|
-
|
204
|
-
/**@name Arithmetic operators on dense vectors.
|
205
|
-
|
206
|
-
<strong>NOTE</strong>: Because these methods return an object (they can't
|
207
|
-
return a reference, though they could return a pointer...) they are
|
208
|
-
<em>very</em> inefficient...
|
209
|
-
*/
|
210
|
-
//@{
|
211
|
-
/// Return the sum of two dense vectors
|
212
|
-
template <typename T> inline
|
213
|
-
CoinDenseVector<T> operator+(const CoinDenseVector<T>& op1,
|
214
|
-
const CoinDenseVector<T>& op2){
|
215
|
-
assert(op1.size() == op2.size());
|
216
|
-
int size = op1.size();
|
217
|
-
CoinDenseVector<T> op3(size);
|
218
|
-
const T *elements1 = op1.getElements();
|
219
|
-
const T *elements2 = op2.getElements();
|
220
|
-
T *elements3 = op3.getElements();
|
221
|
-
for(int i=0; i<size; i++)
|
222
|
-
elements3[i] = elements1[i] + elements2[i];
|
223
|
-
return op3;
|
224
|
-
}
|
225
|
-
|
226
|
-
/// Return the difference of two dense vectors
|
227
|
-
template <typename T> inline
|
228
|
-
CoinDenseVector<T> operator-(const CoinDenseVector<T>& op1,
|
229
|
-
const CoinDenseVector<T>& op2){
|
230
|
-
assert(op1.size() == op2.size());
|
231
|
-
int size = op1.size();
|
232
|
-
CoinDenseVector<T> op3(size);
|
233
|
-
const T *elements1 = op1.getElements();
|
234
|
-
const T *elements2 = op2.getElements();
|
235
|
-
T *elements3 = op3.getElements();
|
236
|
-
for(int i=0; i<size; i++)
|
237
|
-
elements3[i] = elements1[i] - elements2[i];
|
238
|
-
return op3;
|
239
|
-
}
|
240
|
-
|
241
|
-
|
242
|
-
/// Return the element-wise product of two dense vectors
|
243
|
-
template <typename T> inline
|
244
|
-
CoinDenseVector<T> operator*(const CoinDenseVector<T>& op1,
|
245
|
-
const CoinDenseVector<T>& op2){
|
246
|
-
assert(op1.size() == op2.size());
|
247
|
-
int size = op1.size();
|
248
|
-
CoinDenseVector<T> op3(size);
|
249
|
-
const T *elements1 = op1.getElements();
|
250
|
-
const T *elements2 = op2.getElements();
|
251
|
-
T *elements3 = op3.getElements();
|
252
|
-
for(int i=0; i<size; i++)
|
253
|
-
elements3[i] = elements1[i] * elements2[i];
|
254
|
-
return op3;
|
255
|
-
}
|
256
|
-
|
257
|
-
/// Return the element-wise ratio of two dense vectors
|
258
|
-
template <typename T> inline
|
259
|
-
CoinDenseVector<T> operator/(const CoinDenseVector<T>& op1,
|
260
|
-
const CoinDenseVector<T>& op2){
|
261
|
-
assert(op1.size() == op2.size());
|
262
|
-
int size = op1.size();
|
263
|
-
CoinDenseVector<T> op3(size);
|
264
|
-
const T *elements1 = op1.getElements();
|
265
|
-
const T *elements2 = op2.getElements();
|
266
|
-
T *elements3 = op3.getElements();
|
267
|
-
for(int i=0; i<size; i++)
|
268
|
-
elements3[i] = elements1[i] / elements2[i];
|
269
|
-
return op3;
|
270
|
-
}
|
271
|
-
//@}
|
272
|
-
|
273
|
-
/**@name Arithmetic operators on dense vector and a constant.
|
274
|
-
These functions create a dense vector as a result. That dense vector will
|
275
|
-
have the same indices as <code>op1</code> and the specified operation is
|
276
|
-
done entry-wise with the given value. */
|
277
|
-
//@{
|
278
|
-
/// Return the sum of a dense vector and a constant
|
279
|
-
template <typename T> inline
|
280
|
-
CoinDenseVector<T> operator+(const CoinDenseVector<T>& op1, T value){
|
281
|
-
int size = op1.size();
|
282
|
-
CoinDenseVector<T> op3(size);
|
283
|
-
const T *elements1 = op1.getElements();
|
284
|
-
T *elements3 = op3.getElements();
|
285
|
-
double dvalue = value;
|
286
|
-
for(int i=0; i<size; i++)
|
287
|
-
elements3[i] = elements1[i] + dvalue;
|
288
|
-
return op3;
|
289
|
-
}
|
290
|
-
|
291
|
-
/// Return the difference of a dense vector and a constant
|
292
|
-
template <typename T> inline
|
293
|
-
CoinDenseVector<T> operator-(const CoinDenseVector<T>& op1, T value){
|
294
|
-
int size = op1.size();
|
295
|
-
CoinDenseVector<T> op3(size);
|
296
|
-
const T *elements1 = op1.getElements();
|
297
|
-
T *elements3 = op3.getElements();
|
298
|
-
double dvalue = value;
|
299
|
-
for(int i=0; i<size; i++)
|
300
|
-
elements3[i] = elements1[i] - dvalue;
|
301
|
-
return op3;
|
302
|
-
}
|
303
|
-
|
304
|
-
/// Return the element-wise product of a dense vector and a constant
|
305
|
-
template <typename T> inline
|
306
|
-
CoinDenseVector<T> operator*(const CoinDenseVector<T>& op1, T value){
|
307
|
-
int size = op1.size();
|
308
|
-
CoinDenseVector<T> op3(size);
|
309
|
-
const T *elements1 = op1.getElements();
|
310
|
-
T *elements3 = op3.getElements();
|
311
|
-
double dvalue = value;
|
312
|
-
for(int i=0; i<size; i++)
|
313
|
-
elements3[i] = elements1[i] * dvalue;
|
314
|
-
return op3;
|
315
|
-
}
|
316
|
-
|
317
|
-
/// Return the element-wise ratio of a dense vector and a constant
|
318
|
-
template <typename T> inline
|
319
|
-
CoinDenseVector<T> operator/(const CoinDenseVector<T>& op1, T value){
|
320
|
-
int size = op1.size();
|
321
|
-
CoinDenseVector<T> op3(size);
|
322
|
-
const T *elements1 = op1.getElements();
|
323
|
-
T *elements3 = op3.getElements();
|
324
|
-
double dvalue = value;
|
325
|
-
for(int i=0; i<size; i++)
|
326
|
-
elements3[i] = elements1[i] / dvalue;
|
327
|
-
return op3;
|
328
|
-
}
|
329
|
-
|
330
|
-
/// Return the sum of a constant and a dense vector
|
331
|
-
template <typename T> inline
|
332
|
-
CoinDenseVector<T> operator+(T value, const CoinDenseVector<T>& op1){
|
333
|
-
int size = op1.size();
|
334
|
-
CoinDenseVector<T> op3(size);
|
335
|
-
const T *elements1 = op1.getElements();
|
336
|
-
T *elements3 = op3.getElements();
|
337
|
-
double dvalue = value;
|
338
|
-
for(int i=0; i<size; i++)
|
339
|
-
elements3[i] = elements1[i] + dvalue;
|
340
|
-
return op3;
|
341
|
-
}
|
342
|
-
|
343
|
-
/// Return the difference of a constant and a dense vector
|
344
|
-
template <typename T> inline
|
345
|
-
CoinDenseVector<T> operator-(T value, const CoinDenseVector<T>& op1){
|
346
|
-
int size = op1.size();
|
347
|
-
CoinDenseVector<T> op3(size);
|
348
|
-
const T *elements1 = op1.getElements();
|
349
|
-
T *elements3 = op3.getElements();
|
350
|
-
double dvalue = value;
|
351
|
-
for(int i=0; i<size; i++)
|
352
|
-
elements3[i] = dvalue - elements1[i];
|
353
|
-
return op3;
|
354
|
-
}
|
355
|
-
|
356
|
-
/// Return the element-wise product of a constant and a dense vector
|
357
|
-
template <typename T> inline
|
358
|
-
CoinDenseVector<T> operator*(T value, const CoinDenseVector<T>& op1){
|
359
|
-
int size = op1.size();
|
360
|
-
CoinDenseVector<T> op3(size);
|
361
|
-
const T *elements1 = op1.getElements();
|
362
|
-
T *elements3 = op3.getElements();
|
363
|
-
double dvalue = value;
|
364
|
-
for(int i=0; i<size; i++)
|
365
|
-
elements3[i] = elements1[i] * dvalue;
|
366
|
-
return op3;
|
367
|
-
}
|
368
|
-
|
369
|
-
/// Return the element-wise ratio of a a constant and dense vector
|
370
|
-
template <typename T> inline
|
371
|
-
CoinDenseVector<T> operator/(T value, const CoinDenseVector<T>& op1){
|
372
|
-
int size = op1.size();
|
373
|
-
CoinDenseVector<T> op3(size);
|
374
|
-
const T *elements1 = op1.getElements();
|
375
|
-
T *elements3 = op3.getElements();
|
376
|
-
double dvalue = value;
|
377
|
-
for(int i=0; i<size; i++)
|
378
|
-
elements3[i] = dvalue / elements1[i];
|
379
|
-
return op3;
|
380
|
-
}
|
381
|
-
//@}
|
382
|
-
|
383
|
-
#endif
|
@@ -1,48 +0,0 @@
|
|
1
|
-
/* $Id: CoinDistance.hpp 1372 2011-01-03 23:31:00Z lou $ */
|
2
|
-
// Copyright (C) 2000, International Business Machines
|
3
|
-
// Corporation and others. All Rights Reserved.
|
4
|
-
// This code is licensed under the terms of the Eclipse Public License (EPL).
|
5
|
-
|
6
|
-
#ifndef CoinDistance_H
|
7
|
-
#define CoinDistance_H
|
8
|
-
|
9
|
-
#include <iterator>
|
10
|
-
|
11
|
-
//-------------------------------------------------------------------
|
12
|
-
//
|
13
|
-
// Attempt to provide an std::distance function
|
14
|
-
// that will work on multiple platforms
|
15
|
-
//
|
16
|
-
//-------------------------------------------------------------------
|
17
|
-
|
18
|
-
/** CoinDistance
|
19
|
-
|
20
|
-
This is the Coin implementation of the std::function that is
|
21
|
-
designed to work on multiple platforms.
|
22
|
-
*/
|
23
|
-
template <class ForwardIterator, class Distance>
|
24
|
-
void coinDistance(ForwardIterator first, ForwardIterator last,
|
25
|
-
Distance& n)
|
26
|
-
{
|
27
|
-
#if defined(__SUNPRO_CC)
|
28
|
-
n = 0;
|
29
|
-
std::distance(first,last,n);
|
30
|
-
#else
|
31
|
-
n = std::distance(first,last);
|
32
|
-
#endif
|
33
|
-
}
|
34
|
-
|
35
|
-
template <class ForwardIterator>
|
36
|
-
size_t coinDistance(ForwardIterator first, ForwardIterator last)
|
37
|
-
{
|
38
|
-
size_t retVal;
|
39
|
-
#if defined(__SUNPRO_CC)
|
40
|
-
retVal = 0;
|
41
|
-
std::distance(first,last,retVal);
|
42
|
-
#else
|
43
|
-
retVal = std::distance(first,last);
|
44
|
-
#endif
|
45
|
-
return retVal;
|
46
|
-
}
|
47
|
-
|
48
|
-
#endif
|
@@ -1,257 +0,0 @@
|
|
1
|
-
/* $Id: CoinError.hpp 1372 2011-01-03 23:31:00Z lou $ */
|
2
|
-
// Copyright (C) 2000, International Business Machines
|
3
|
-
// Corporation and others. All Rights Reserved.
|
4
|
-
// This code is licensed under the terms of the Eclipse Public License (EPL).
|
5
|
-
|
6
|
-
#ifndef CoinError_H
|
7
|
-
#define CoinError_H
|
8
|
-
|
9
|
-
#include <string>
|
10
|
-
#include <iostream>
|
11
|
-
#include <cassert>
|
12
|
-
#include <cstring>
|
13
|
-
|
14
|
-
#include "CoinUtilsConfig.h"
|
15
|
-
#include "CoinPragma.hpp"
|
16
|
-
|
17
|
-
/** A function to block the popup windows that windows creates when the code
|
18
|
-
crashes */
|
19
|
-
void WindowsErrorPopupBlocker();
|
20
|
-
|
21
|
-
//-------------------------------------------------------------------
|
22
|
-
//
|
23
|
-
// Error class used to throw exceptions
|
24
|
-
//
|
25
|
-
// Errors contain:
|
26
|
-
//
|
27
|
-
//-------------------------------------------------------------------
|
28
|
-
|
29
|
-
/** Error Class thrown by an exception
|
30
|
-
|
31
|
-
This class is used when exceptions are thrown.
|
32
|
-
It contains:
|
33
|
-
<ul>
|
34
|
-
<li>message text
|
35
|
-
<li>name of method throwing exception
|
36
|
-
<li>name of class throwing exception or hint
|
37
|
-
<li>name of file if assert
|
38
|
-
<li>line number
|
39
|
-
</ul>
|
40
|
-
For asserts class=> optional hint
|
41
|
-
*/
|
42
|
-
class CoinError {
|
43
|
-
friend void CoinErrorUnitTest();
|
44
|
-
|
45
|
-
private:
|
46
|
-
CoinError()
|
47
|
-
:
|
48
|
-
message_(),
|
49
|
-
method_(),
|
50
|
-
class_(),
|
51
|
-
file_(),
|
52
|
-
lineNumber_()
|
53
|
-
{
|
54
|
-
// nothing to do here
|
55
|
-
}
|
56
|
-
|
57
|
-
public:
|
58
|
-
|
59
|
-
//-------------------------------------------------------------------
|
60
|
-
// Get methods
|
61
|
-
//-------------------------------------------------------------------
|
62
|
-
/**@name Get error attributes */
|
63
|
-
//@{
|
64
|
-
/// get message text
|
65
|
-
inline const std::string & message() const
|
66
|
-
{ return message_; }
|
67
|
-
/// get name of method instantiating error
|
68
|
-
inline const std::string & methodName() const
|
69
|
-
{ return method_; }
|
70
|
-
/// get name of class instantiating error (or hint for assert)
|
71
|
-
inline const std::string & className() const
|
72
|
-
{ return class_; }
|
73
|
-
/// get name of file for assert
|
74
|
-
inline const std::string & fileName() const
|
75
|
-
{ return file_; }
|
76
|
-
/// get line number of assert (-1 if not assert)
|
77
|
-
inline int lineNumber() const
|
78
|
-
{ return lineNumber_; }
|
79
|
-
/// Just print (for asserts)
|
80
|
-
inline void print(bool doPrint = true) const
|
81
|
-
{
|
82
|
-
if (! doPrint)
|
83
|
-
return;
|
84
|
-
if (lineNumber_<0) {
|
85
|
-
std::cout<<message_<<" in "<<class_<<"::"<<method_<<std::endl;
|
86
|
-
} else {
|
87
|
-
std::cout<<file_<<":"<<lineNumber_<<" method "<<method_
|
88
|
-
<<" : assertion \'"<<message_<<"\' failed."<<std::endl;
|
89
|
-
if(class_!="")
|
90
|
-
std::cout<<"Possible reason: "<<class_<<std::endl;
|
91
|
-
}
|
92
|
-
}
|
93
|
-
//@}
|
94
|
-
|
95
|
-
|
96
|
-
/**@name Constructors and destructors */
|
97
|
-
//@{
|
98
|
-
/// Alternate Constructor
|
99
|
-
CoinError (
|
100
|
-
std::string message__,
|
101
|
-
std::string methodName__,
|
102
|
-
std::string className__,
|
103
|
-
std::string fileName_ = std::string(),
|
104
|
-
int line = -1)
|
105
|
-
:
|
106
|
-
message_(message__),
|
107
|
-
method_(methodName__),
|
108
|
-
class_(className__),
|
109
|
-
file_(fileName_),
|
110
|
-
lineNumber_(line)
|
111
|
-
{
|
112
|
-
print(printErrors_);
|
113
|
-
}
|
114
|
-
|
115
|
-
/// Copy constructor
|
116
|
-
CoinError (const CoinError & source)
|
117
|
-
:
|
118
|
-
message_(source.message_),
|
119
|
-
method_(source.method_),
|
120
|
-
class_(source.class_),
|
121
|
-
file_(source.file_),
|
122
|
-
lineNumber_(source.lineNumber_)
|
123
|
-
{
|
124
|
-
// nothing to do here
|
125
|
-
}
|
126
|
-
|
127
|
-
/// Assignment operator
|
128
|
-
CoinError & operator=(const CoinError& rhs)
|
129
|
-
{
|
130
|
-
if (this != &rhs) {
|
131
|
-
message_=rhs.message_;
|
132
|
-
method_=rhs.method_;
|
133
|
-
class_=rhs.class_;
|
134
|
-
file_=rhs.file_;
|
135
|
-
lineNumber_ = rhs.lineNumber_;
|
136
|
-
}
|
137
|
-
return *this;
|
138
|
-
}
|
139
|
-
|
140
|
-
/// Destructor
|
141
|
-
virtual ~CoinError ()
|
142
|
-
{
|
143
|
-
// nothing to do here
|
144
|
-
}
|
145
|
-
//@}
|
146
|
-
|
147
|
-
private:
|
148
|
-
|
149
|
-
/**@name Private member data */
|
150
|
-
//@{
|
151
|
-
/// message test
|
152
|
-
std::string message_;
|
153
|
-
/// method name
|
154
|
-
std::string method_;
|
155
|
-
/// class name or hint
|
156
|
-
std::string class_;
|
157
|
-
/// file name
|
158
|
-
std::string file_;
|
159
|
-
/// Line number
|
160
|
-
int lineNumber_;
|
161
|
-
//@}
|
162
|
-
|
163
|
-
public:
|
164
|
-
/// Whether to print every error
|
165
|
-
static bool printErrors_;
|
166
|
-
};
|
167
|
-
|
168
|
-
#ifndef __STRING
|
169
|
-
#define __STRING(x) #x
|
170
|
-
#endif
|
171
|
-
|
172
|
-
#ifndef __GNUC_PREREQ
|
173
|
-
# define __GNUC_PREREQ(maj, min) (0)
|
174
|
-
#endif
|
175
|
-
|
176
|
-
#ifndef COIN_ASSERT
|
177
|
-
# define CoinAssertDebug(expression) assert(expression)
|
178
|
-
# define CoinAssertDebugHint(expression,hint) assert(expression)
|
179
|
-
# define CoinAssert(expression) assert(expression)
|
180
|
-
# define CoinAssertHint(expression,hint) assert(expression)
|
181
|
-
#else
|
182
|
-
# ifdef NDEBUG
|
183
|
-
# define CoinAssertDebug(expression) {}
|
184
|
-
# define CoinAssertDebugHint(expression,hint) {}
|
185
|
-
# else
|
186
|
-
# if defined(__GNUC__) && __GNUC_PREREQ(2, 6)
|
187
|
-
# define CoinAssertDebug(expression) { \
|
188
|
-
if (!(expression)) { \
|
189
|
-
throw CoinError(__STRING(expression), __PRETTY_FUNCTION__, \
|
190
|
-
"", __FILE__, __LINE__); \
|
191
|
-
} \
|
192
|
-
}
|
193
|
-
# define CoinAssertDebugHint(expression,hint) { \
|
194
|
-
if (!(expression)) { \
|
195
|
-
throw CoinError(__STRING(expression), __PRETTY_FUNCTION__, \
|
196
|
-
hint, __FILE__,__LINE__); \
|
197
|
-
} \
|
198
|
-
}
|
199
|
-
# else
|
200
|
-
# define CoinAssertDebug(expression) { \
|
201
|
-
if (!(expression)) { \
|
202
|
-
throw CoinError(__STRING(expression), "", \
|
203
|
-
"", __FILE__,__LINE__); \
|
204
|
-
} \
|
205
|
-
}
|
206
|
-
# define CoinAssertDebugHint(expression,hint) { \
|
207
|
-
if (!(expression)) { \
|
208
|
-
throw CoinError(__STRING(expression), "", \
|
209
|
-
hint, __FILE__,__LINE__); \
|
210
|
-
} \
|
211
|
-
}
|
212
|
-
# endif
|
213
|
-
# endif
|
214
|
-
# if defined(__GNUC__) && __GNUC_PREREQ(2, 6)
|
215
|
-
# define CoinAssert(expression) { \
|
216
|
-
if (!(expression)) { \
|
217
|
-
throw CoinError(__STRING(expression), __PRETTY_FUNCTION__, \
|
218
|
-
"", __FILE__, __LINE__); \
|
219
|
-
} \
|
220
|
-
}
|
221
|
-
# define CoinAssertHint(expression,hint) { \
|
222
|
-
if (!(expression)) { \
|
223
|
-
throw CoinError(__STRING(expression), __PRETTY_FUNCTION__, \
|
224
|
-
hint, __FILE__,__LINE__); \
|
225
|
-
} \
|
226
|
-
}
|
227
|
-
# else
|
228
|
-
# define CoinAssert(expression) { \
|
229
|
-
if (!(expression)) { \
|
230
|
-
throw CoinError(__STRING(expression), "", \
|
231
|
-
"", __FILE__,__LINE__); \
|
232
|
-
} \
|
233
|
-
}
|
234
|
-
# define CoinAssertHint(expression,hint) { \
|
235
|
-
if (!(expression)) { \
|
236
|
-
throw CoinError(__STRING(expression), "", \
|
237
|
-
hint, __FILE__,__LINE__); \
|
238
|
-
} \
|
239
|
-
}
|
240
|
-
# endif
|
241
|
-
#endif
|
242
|
-
|
243
|
-
|
244
|
-
//#############################################################################
|
245
|
-
/** A function that tests the methods in the CoinError class. The
|
246
|
-
only reason for it not to be a member method is that this way it doesn't
|
247
|
-
have to be compiled into the library. And that's a gain, because the
|
248
|
-
library should be compiled with optimization on, but this method should be
|
249
|
-
compiled with debugging. */
|
250
|
-
void
|
251
|
-
CoinErrorUnitTest();
|
252
|
-
|
253
|
-
#ifdef __LINE__
|
254
|
-
#define CoinErrorFL(x, y, z) CoinError((x), (y), (z), __FILE__, __LINE__)
|
255
|
-
#endif
|
256
|
-
|
257
|
-
#endif
|