[opengm] 269/386: add learning code (experimental)
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Wed Aug 31 08:38:08 UTC 2016
This is an automated email from the git hooks/post-receive script.
ghisvail-guest pushed a commit to branch debian/master
in repository opengm.
commit 3eafd2cd425c11d83175b0000288d796a1aab6bc
Merge: 376d061 1c9a6e1
Author: joergkappes <kappes at math.uni-heidelberg.de>
Date: Tue Jun 30 18:21:34 2015 +0200
add learning code (experimental)
.gitignore | 7 +
CMakeLists.txt | 10 +-
fubar/brown_horse.py | 127 ++++
fubar/brown_horse2.py | 136 ++++
fubar/brown_horse_sp.py | 206 ++++++
fubar/example1.py | 35 +
fubar/make_grid_potts_dset.py | 1 +
fubar/make_mc_dset.py | 19 +
fubar/max_likelihood_example.py | 40 ++
fubar/noisy_squares_3_labels.py | 121 ++++
fubar/pascal_voc/convertPascalVOC.py | 94 +++
fubar/pascal_voc/convertPascalVOCNew.py | 108 +++
fubar/pascal_voc/learnPascalVOC.py | 35 +
fubar/python_stuff.py | 102 +++
fubar/real_example.py | 96 +++
fubar/real_example_2.py | 150 +++++
fubar/simple_sp.py | 165 +++++
fubar/toy_dataset.py | 125 ++++
fubar/whorse.py | 79 +++
.../opengm/datastructures/marray/marray_hdf5.hxx | 25 +
.../opengm/functions/function_properties_base.hxx | 11 +-
include/opengm/functions/l_potts.hxx | 202 ------
include/opengm/functions/learnable/lpotts.hxx | 254 +++++++
.../opengm/functions/learnable/lsum_of_experts.hxx | 260 ++++++++
include/opengm/functions/learnable/lunary.hxx | 478 ++++++++++++++
include/opengm/functions/potts.hxx | 4 +-
include/opengm/functions/readme.txt | 3 +
include/opengm/functions/unary_loss_function.hxx | 151 +++++
include/opengm/functions/view_convert_function.hxx | 36 +-
include/opengm/graphicalmodel/graphicalmodel.hxx | 44 +-
.../graphicalmodel/graphicalmodel_factor.hxx | 27 +
.../graphicalmodel_function_wrapper.hxx | 79 +++
include/opengm/graphicalmodel/parameters.hxx | 44 --
include/opengm/graphicalmodel/weights.hxx | 282 ++++++++
include/opengm/inference/alphabetaswap.hxx | 33 +-
include/opengm/inference/alphaexpansion.hxx | 85 ++-
include/opengm/inference/alphaexpansionfusion.hxx | 75 ++-
include/opengm/inference/astar.hxx | 129 ++--
.../auxiliary/fusion_move/fusion_mover.hxx | 27 +
include/opengm/inference/bruteforce.hxx | 21 +-
include/opengm/inference/combilp.hxx | 11 +
.../dualdecomposition/dualdecomposition_bundle.hxx | 28 +
.../dualdecomposition_subgradient.hxx | 37 +-
include/opengm/inference/dynamicprogramming.hxx | 20 +
include/opengm/inference/external/ad3.hxx | 23 +
include/opengm/inference/external/daoopt.hxx | 26 +
include/opengm/inference/external/fastPD.hxx | 16 +
include/opengm/inference/external/mrflib.hxx | 15 +
include/opengm/inference/external/qpbo.hxx | 35 +-
include/opengm/inference/external/trws.hxx | 38 +-
include/opengm/inference/fusion_based_inf.hxx | 219 ++++++-
include/opengm/inference/graphcut.hxx | 29 +-
include/opengm/inference/greedygremlin.hxx | 19 +-
include/opengm/inference/hqpbo.hxx | 23 +-
include/opengm/inference/icm.hxx | 63 +-
include/opengm/inference/infandflip.hxx | 23 +
include/opengm/inference/inference.hxx | 9 +
include/opengm/inference/lazyflipper.hxx | 161 +++--
include/opengm/inference/loc.hxx | 29 +
include/opengm/inference/lpcplex.hxx | 81 ++-
include/opengm/inference/lpgurobi.hxx | 80 ++-
include/opengm/inference/lsatr.hxx | 26 +-
.../inference/messagepassing/messagepassing.hxx | 30 +
.../inference/messagepassing/messagepassing_bp.hxx | 11 +
.../messagepassing/messagepassing_trbp.hxx | 9 +
include/opengm/inference/movemaker.hxx | 8 +
include/opengm/inference/mqpbo.hxx | 31 +-
include/opengm/inference/multicut.hxx | 40 +-
include/opengm/inference/partition-move.hxx | 15 +-
include/opengm/inference/qpbo.hxx | 17 +-
include/opengm/inference/reducedinference.hxx | 26 +
include/opengm/inference/sat.hxx | 18 +-
include/opengm/inference/self_fusion.hxx | 47 +-
include/opengm/learning/bundle-optimizer.hxx | 293 +++++++++
include/opengm/learning/dataset/dataset.hxx | 234 +++++++
include/opengm/learning/dataset/dataset_io.hxx | 134 ++++
.../opengm/learning/dataset/editabledataset.hxx | 146 +++++
include/opengm/learning/dataset/testdatasets.hxx | 375 +++++++++++
include/opengm/learning/gradient-accumulator.hxx | 184 ++++++
include/opengm/learning/gridsearch-learning.hxx | 126 ++++
include/opengm/learning/loss/flexibleloss.hxx | 305 +++++++++
.../learning/loss/generalized-hammingloss.hxx | 152 +++++
include/opengm/learning/loss/hammingloss.hxx | 81 +++
include/opengm/learning/loss/noloss.hxx | 73 +++
.../learning/maximum-likelihood-learning.hxx | 310 +++++++++
.../learning/maximum_likelihood_learning.hxx | 237 +++++++
include/opengm/learning/rws.hxx | 286 ++++++++
include/opengm/learning/solver/BundleCollector.h | 49 ++
include/opengm/learning/solver/CplexBackend.h | 429 ++++++++++++
include/opengm/learning/solver/GurobiBackend.h | 439 +++++++++++++
include/opengm/learning/solver/LinearConstraint.h | 94 +++
include/opengm/learning/solver/LinearConstraints.h | 119 ++++
include/opengm/learning/solver/LinearObjective.h | 24 +
.../opengm/learning/solver/LinearSolverBackend.h | 84 +++
.../opengm/learning/solver/QuadraticObjective.h | 181 +++++
.../learning/solver/QuadraticSolverBackend.h | 28 +
.../learning/solver/QuadraticSolverFactory.h | 33 +
.../learning/solver/QuadraticSolverParameters.h | 15 +
include/opengm/learning/solver/Relation.h | 20 +
include/opengm/learning/solver/Sense.h | 20 +
include/opengm/learning/solver/Solution.h | 49 ++
include/opengm/learning/solver/VariableType.h | 18 +
include/opengm/learning/struct-max-margin.hxx | 186 ++++++
include/opengm/learning/structured_perceptron.hxx | 219 +++++++
include/opengm/learning/subgradient_ssvm.hxx | 353 ++++++++++
include/opengm/learning/weight_averaging.hxx | 68 ++
include/opengm/python/numpyview.hxx | 22 +-
include/opengm/python/opengmpython.hxx | 73 ++-
include/opengm/utilities/metaprogramming.hxx | 83 ++-
include/opengm/utilities/shape_accessor.hxx | 78 ++-
src/examples/unsorted-examples/inference_types.cxx | 9 +-
.../commandline/double/opengm_min_sum.cxx | 9 +-
src/interfaces/python/opengm/CMakeLists.txt | 1 +
src/interfaces/python/opengm/__init__.py | 2 +-
.../opengm/_inference_interface_generator.py | 59 ++
src/interfaces/python/opengm/functionhelper.py | 4 +-
.../python/opengm/inference/inf_def_visitor.hxx | 3 +-
.../python/opengm/inference/pyFusionMoves.cxx | 4 +-
.../python/opengm/learning/CMakeLists.txt | 151 +++++
src/interfaces/python/opengm/learning/__init__.py | 726 +++++++++++++++++++++
src/interfaces/python/opengm/learning/helper.hxx | 330 ++++++++++
src/interfaces/python/opengm/learning/learning.cxx | 91 +++
.../python/opengm/learning/pyDataset.cxx | 104 +++
.../python/opengm/learning/pyGridSearchLearner.cxx | 64 ++
.../python/opengm/learning/pyLFunctionGen.cxx | 309 +++++++++
src/interfaces/python/opengm/learning/pyLoss.cxx | 81 +++
.../opengm/learning/pyMaxLikelihoodLearner.cxx | 81 +++
src/interfaces/python/opengm/learning/pyRws.cxx | 72 ++
.../opengm/learning/pyStructMaxMarginLearner.cxx | 64 ++
.../python/opengm/learning/pyStructPerceptron.cxx | 75 +++
.../python/opengm/learning/pySubgradientSSVM.cxx | 80 +++
.../python/opengm/learning/pyWeights.cxx | 46 ++
.../python/opengm/opengmcore/__init__.py | 19 +-
.../python/opengm/opengmcore/function_injector.py | 11 +-
.../python/opengm/opengmcore/opengmcore.cpp | 64 +-
.../python/opengm/opengmcore/pyFunctionGen.cxx | 57 ++
.../python/opengm/opengmcore/pyFunctionTypes.cxx | 224 ++++++-
src/interfaces/python/opengm/opengmcore/pyGm.cxx | 25 +-
src/interfaces/python/test.py | 115 +++-
src/tutorials/c++/basics/doMinSumInference.cxx | 2 +-
src/tutorials/c++/basics/doSumProdInference.cxx | 2 +-
src/unittest/CMakeLists.txt | 6 +-
src/unittest/inference/test_graphcut.cxx | 6 +-
src/unittest/inference/test_lazyflipper.cxx | 2 +-
src/unittest/inference/test_messagepassing.cxx | 20 +-
src/unittest/learning/CMakeLists.txt | 51 ++
src/unittest/learning/test_dataset.cxx | 150 +++++
src/unittest/learning/test_dataset_io.cxx | 99 +++
.../learning/test_generalized_hammingloss.cxx | 65 ++
src/unittest/learning/test_gridsearch_learner.cxx | 90 +++
src/unittest/learning/test_learning.cxx | 233 +++++++
.../learning/test_maximum_likelihood_learner.cxx | 126 ++++
src/unittest/learning/test_subgradient_ssvm.cxx | 238 +++++++
src/unittest/test_gm_learning_functions.cxx | 19 +-
src/unittest/test_learnable_functions.cxx | 79 +++
155 files changed, 14197 insertions(+), 680 deletions(-)
diff --cc CMakeLists.txt
index 017c180,3726d7f..5b94d0d
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@@ -152,6 -149,6 +152,7 @@@ if(WITH_BOOST
message(STATUS "build with Boost")
find_package(Boost 1.47 REQUIRED)
add_definitions(-DWITH_BOOST)
++ add_definitions(-DWITH_BOOST_GRAPH)
include_directories(${Boost_INCLUDE_DIR})
else()
message(STATUS "build without Boost")
@@@ -472,47 -471,14 +475,52 @@@ else(
endif(WITH_MPLP)
#--------------------------------------------------------------
+# SRMP
+#--------------------------------------------------------------
+if(WITH_SRMP)
+ message(STATUS "build with external inference algorithm SRMP")
+ add_definitions(-DWITH_SRMP)
+ SET(SRMP_BASEDIR "${PROJECT_SOURCE_DIR}/src/external/SRMP/" CACHE STRING "SRMP base directory")
+ include_directories(${SRMP_BASEDIR}/include/)
+else(WITH_SRMP)
+ message(STATUS "build without external inference algorithm MPLP")
+endif(WITH_SRMP)
+
+#--------------------------------------------------------------
+# PLANARITY
+#--------------------------------------------------------------
+if(WITH_PLANARITY)
+ message(STATUS "build with external inference algorithm PLANARITY")
+ add_definitions(-DWITH_PLANARITY)
+ SET(PLANARITY_PATCHEDSRCDIR "${PROJECT_SOURCE_DIR}/src/external/planarity.src-patched/" CACHE STRING "PLANARITY base directory")
+ include_directories("${PLANARITY_PATCHEDSRCDIR}../")
+else(WITH_PLANARITY)
+ message(STATUS "build without external inference algorithm PLANARYTY")
+endif(WITH_PLANARITY)
+
+#--------------------------------------------------------------
+# BLOSSOM5
+#--------------------------------------------------------------
+if(WITH_BLOSSOM5)
+ message(STATUS "build with external inference algorithm BLOSSOM5")
+ add_definitions(-DWITH_BLOSSOM5)
+ add_definitions(-DPERFECT_MATCHING_DOUBLE)
+ SET(BLOSSOM5_PATCHEDSRCDIR "${PROJECT_SOURCE_DIR}/src/external/blossom5.src-patched/" CACHE STRING "BLOSSOM5 base directory")
+ include_directories("${BLOSSOM5_PATCHEDSRCDIR}../")
+else(WITH_BLOSSOM5)
+ message(STATUS "build without external inference algorithm BLOSSOM5")
+endif(WITH_BLOSSOM5)
+
+
+#--------------------------------------------------------------
- # thread lib
+ # thread libs
#--------------------------------------------------------------
find_package(Threads)
+ find_package(OpenMP)
+
+ if(OPENMP_FOUND)
+ add_definitions(-DWITH_OPENMP)
+ endif()
#--------------------------------------------------------------
# rt lib
diff --cc include/opengm/functions/function_properties_base.hxx
index 41f4130,6ff7c42..68882d5
--- a/include/opengm/functions/function_properties_base.hxx
+++ b/include/opengm/functions/function_properties_base.hxx
@@@ -54,7 -54,7 +54,8 @@@ public
bool isTruncatedSquaredDifference() const;
bool isAbsoluteDifference() const;
bool isTruncatedAbsoluteDifference() const;
+ bool isLinearConstraint() const;
+
/// find minimum and maximum of the function in a single sweep
/// \return class holding the minimum and the maximum
diff --cc include/opengm/inference/icm.hxx
index 136e466,8b49f87..7b70ac9
--- a/include/opengm/inference/icm.hxx
+++ b/include/opengm/inference/icm.hxx
@@@ -36,33 -36,37 +36,44 @@@ public
typedef opengm::visitors::EmptyVisitor<ICM<GM,ACC> > EmptyVisitorType;
typedef opengm::visitors::TimingVisitor<ICM<GM,ACC> > TimingVisitorType;
- class Parameter {
- public:
- Parameter(
- const std::vector<LabelType>& startPoint
- )
- : moveType_(SINGLE_VARIABLE),
- startPoint_(startPoint)
- {}
+ template<class _GM>
+ struct RebindGm{
+ typedef ICM<_GM, ACC> type;
+ };
- Parameter(
- MoveType moveType,
- const std::vector<LabelType>& startPoint
- )
- : moveType_(moveType),
- startPoint_(startPoint)
- {}
-
- Parameter(
- MoveType moveType = SINGLE_VARIABLE
- )
- : moveType_(moveType),
- startPoint_()
- {}
-
- MoveType moveType_;
- std::vector<LabelType> startPoint_;
- };
+ template<class _GM,class _ACC>
+ struct RebindGmAndAcc{
+ typedef ICM<_GM, _ACC> type;
+ };
+
+
+ class Parameter {
+ public:
-
- Parameter(
- MoveType moveType = SINGLE_VARIABLE
- )
- : moveType_(moveType)
- {
-
- }
-
- template<class OP>
- Parameter(
- const OP & otherParameter
- ){
- moveType_ = otherParameter.moveType_== 0? SINGLE_VARIABLE : FACTOR;
- }
++
++ Parameter(const std::vector<LabelType>& startPoint)
++ : moveType_(SINGLE_VARIABLE),
++ startPoint_(startPoint)
++ {}
++ Parameter(MoveType moveType, const std::vector<LabelType>& startPoint)
++ : moveType_(moveType),
++ startPoint_(startPoint)
++ {}
++
++ Parameter(MoveType moveType = SINGLE_VARIABLE)
++ : moveType_(moveType),
++ startPoint_()
++ {}
++
++ template<class OP>
++ Parameter(const OP & otherParameter)
++ {
++ moveType_ = otherParameter.moveType_== 0? SINGLE_VARIABLE : FACTOR;
++ startPoint_(otherParameter.startPoint_);
++ }
+
+ MoveType moveType_;
++ std::vector<LabelType> startPoint_;
+ };
ICM(const GraphicalModelType&);
ICM(const GraphicalModelType&, const Parameter&);
diff --cc include/opengm/inference/lazyflipper.hxx
index c7929f6,eb77727..53689ab
--- a/include/opengm/inference/lazyflipper.hxx
+++ b/include/opengm/inference/lazyflipper.hxx
@@@ -145,13 -147,19 +157,22 @@@ public
const size_t maxSubgraphSize = 2,
const Tribool inferMultilabel = Tribool::Maybe
)
-- : maxSubgraphSize_(maxSubgraphSize),
++ : maxSubgraphSize_(maxSubgraphSize),
+ startingPoint_(),
inferMultilabel_(inferMultilabel)
{}
+ template<class P>
+ Parameter(
+ const P & p
+ )
+ : maxSubgraphSize_(p.maxSubgraphSize_),
++ startingPoint_(p.startingPoint_),
+ inferMultilabel_(p.inferMultilabel_)
+ {}
+
size_t maxSubgraphSize_;
+ std::vector<LabelType> startingPoint_;
Tribool inferMultilabel_;
};
diff --cc include/opengm/inference/multicut.hxx
index 8dbdfd0,bbe9780..0a764dc
--- a/include/opengm/inference/multicut.hxx
+++ b/include/opengm/inference/multicut.hxx
@@@ -111,35 -113,37 +119,53 @@@ public
std::string workFlow_;
size_t maximalNumberOfConstraintsPerRound_;
double edgeRoundingValue_;
- MWCRounding MWCRounding_;
+ ParamHeper::MWCRounding MWCRounding_;
size_t reductionMode_;
std::vector<bool> allowCutsWithin_;
+ bool useOldPriorityQueue_;
+ bool useChordalSearch_;
+ bool useBufferedStates_;
- template<class P>
- Parameter(const P & p)
- : numThreads_(p.numThreads_),
- verbose_(p.verbose_),
- verboseCPLEX_(p.verboseCPLEX_),
- cutUp_(p.cutUp_),
- timeOut_(p.timeOut_),
- workFlow_(p.workFlow_),
- maximalNumberOfConstraintsPerRound_(p.maximalNumberOfConstraintsPerRound_),
- edgeRoundingValue_(p.edgeRoundingValue_),
- MWCRounding_(static_cast<MWCRounding>(p.MWCRounding_)),
- reductionMode_(p.reductionMode_),
- allowCutsWithin_(p.allowCutsWithin_)
- {
- }
-
++
/// \param numThreads number of threads that should be used (default = 0 [automatic])
/// \param cutUp value which the optima at least has (helps to cut search-tree)
- Parameter
- (
- int numThreads=0,
- double cutUp=1.0e+75
- )
- : numThreads_(numThreads), verbose_(false),verboseCPLEX_(false), cutUp_(cutUp),
- timeOut_(36000000), maximalNumberOfConstraintsPerRound_(1000000),
- edgeRoundingValue_(0.00000001),MWCRounding_(NEAREST), reductionMode_(3)
- {};
+ Parameter
+ (
+ int numThreads=0,
+ double cutUp=1.0e+75
+ )
- : numThreads_(numThreads), verbose_(false),verboseCPLEX_(false), cutUp_(cutUp),
- timeOut_(36000000), maximalNumberOfConstraintsPerRound_(1000000),
- edgeRoundingValue_(0.00000001),MWCRounding_(NEAREST), reductionMode_(3),useOldPriorityQueue_(false), useChordalSearch_(false), useBufferedStates_(false)
++ : numThreads_(numThreads),
++ verbose_(false),
++ verboseCPLEX_(false),
++ cutUp_(cutUp),
++ timeOut_(36000000),
++ maximalNumberOfConstraintsPerRound_(1000000),
++ edgeRoundingValue_(0.00000001),
++ MWCRounding_(NEAREST),
++ reductionMode_(3),
++ useOldPriorityQueue_(false),
++ useChordalSearch_(false),
++ useBufferedStates_(false)
+ {};
+
+ template<class OTHER_PARAM>
+ Parameter
+ (
+ const OTHER_PARAM & p
+ )
- : numThreads_(p.numThreads_), verbose_(p.verbose_),verboseCPLEX_(p.verboseCPLEX_), cutUp_(p.cutUp_),
- timeOut_(p.timeOut_), maximalNumberOfConstraintsPerRound_(p.maximalNumberOfConstraintsPerRound_),
- edgeRoundingValue_(p.edgeRoundingValue_),MWCRounding_(p.MWCRounding_), reductionMode_(p.reductionMode_),
- useOldPriorityQueue_(p.useOldPriorityQueue_), useChordalSearch_(p.useChordalSearch_)
++ : numThreads_(p.numThreads_),
++ verbose_(p.verbose_),
++ verboseCPLEX_(p.verboseCPLEX_),
++ cutUp_(p.cutUp_),
++ timeOut_(p.timeOut_),
++ maximalNumberOfConstraintsPerRound_(p.maximalNumberOfConstraintsPerRound_),
++ edgeRoundingValue_(p.edgeRoundingValue_),
++ MWCRounding_(static_cast<MWCRounding>(p.MWCRounding_)),
++ reductionMode_(p.reductionMode_),
++ allowCutsWithin_(p.allowCutsWithin_),
++ useOldPriorityQueue_(p.useOldPriorityQueue_),
++ useChordalSearch_(p.useChordalSearch_)
+ {};
};
virtual ~Multicut();
diff --cc src/interfaces/commandline/double/opengm_min_sum.cxx
index 1e5e693,32fc9e9..06935e4
--- a/src/interfaces/commandline/double/opengm_min_sum.cxx
+++ b/src/interfaces/commandline/double/opengm_min_sum.cxx
@@@ -35,11 -35,11 +35,6 @@@
#include "../../common/caller/trws_caller.hxx"
#endif
--#if (defined(WITH_MAXFLOW) )
--#include "../../common/caller/lsatr_caller.hxx"
--#endif
--
--
#if (defined(WITH_MAXFLOW) || defined(WITH_BOOST))
#include "../../common/caller/graphcut_caller.hxx"
#include "../../common/caller/alphaexpansion_caller.hxx"
@@@ -47,6 -47,6 +42,10 @@@
#include "../../common/caller/qpbo_caller.hxx"
#endif
++#if (defined(WITH_MAXFLOW) )
++#include "../../common/caller/lsatr_caller.hxx"
++#endif
++
#ifdef WITH_QPBO
#include "../../common/caller/mqpbo_caller.hxx"
#ifdef WITH_BOOST
diff --cc src/interfaces/python/opengm/inference/pyFusionMoves.cxx
index e7debfe,bc44fbc..b8ec9c1
--- a/src/interfaces/python/opengm/inference/pyFusionMoves.cxx
+++ b/src/interfaces/python/opengm/inference/pyFusionMoves.cxx
@@@ -123,13 -123,12 +123,13 @@@ private
#endif
}
else if(fusionSolver==std::string("lf2")){
- return fusionMover_. template fuse<LazyFlipperSubInf> (typename LazyFlipperSubInf::Parameter(2),true);
+ return fusionMover_. template fuse<LazyFlipperSubInf> (typename LazyFlipperSubInf::Parameter(size_t(2)),true);
}
else if(fusionSolver==std::string("lf3")){
- return fusionMover_. template fuse<LazyFlipperSubInf> (typename LazyFlipperSubInf::Parameter(3),true);
+ return fusionMover_. template fuse<LazyFlipperSubInf> (typename LazyFlipperSubInf::Parameter(size_t(3)),true);
}
+ throw opengm::RuntimeError("unknown fusion solver");
}
diff --cc src/unittest/CMakeLists.txt
index ee2f3b4,63a2545..1ba6251
--- a/src/unittest/CMakeLists.txt
+++ b/src/unittest/CMakeLists.txt
@@@ -79,38 -82,6 +82,39 @@@ if(BUILD_TESTING
ADD_EXECUTABLE(test-memoryinfo test_memoryinfo.cxx ${headers})
add_test(test-memoryinfo ${CMAKE_CURRENT_BINARY_DIR}/test-memoryinfo)
+ add_executable(test-lp-solver test_lp_solver.cxx ${headers})
+ add_test(test-lp-solver ${CMAKE_CURRENT_BINARY_DIR}/test-lp-solver)
+ if(WITH_CPLEX)
+ if(WIN32)
+ target_link_libraries(test-lp-solver wsock32.lib ${CPLEX_LIBRARIES} )
+ else(WIN32)
+ target_link_libraries(test-lp-solver ${CMAKE_THREAD_LIBS_INIT} ${CPLEX_LIBRARIES} )
+ endif(WIN32)
+ endif(WITH_CPLEX)
+ if(WITH_GUROBI)
+ target_link_libraries(test-lp-solver
+ ${GUROBI_LIBRARIES}
+ ${GUOBI_CXX_LIBRARY}
+ ${GUROBI_LIBRARY}
+ ${CMAKE_THREAD_LIBS_INIT}
+ )
+ endif(WITH_GUROBI)
+ if(LINK_RT)
+ target_link_libraries(test-lp-solver rt)
+ endif(LINK_RT)
+
+ add_executable(test-indicator-variable test_indicator_variable.cxx ${headers})
+ add_test(test-indicator-variable ${CMAKE_CURRENT_BINARY_DIR}/test-indicator-variable)
+
+ add_executable(test-linear-constraint test_linear_constraint.cxx ${headers})
+ add_test(test-linear-constraint ${CMAKE_CURRENT_BINARY_DIR}/test-linear-constraint)
+
+ add_executable(test-subsequence-iterator test_subsequence_iterator.cxx ${headers})
+ add_test(test-subsequence-iterator ${CMAKE_CURRENT_BINARY_DIR}/test-subsequence-iterator)
+
+ add_executable(test-lp-functiontransfer test_lp_functiontransfer.cxx ${headers})
+ add_test(test-lp-functiontransfer ${CMAKE_CURRENT_BINARY_DIR}/test-lp-functiontransfer)
+
add_subdirectory(inference)
+ add_subdirectory(learning)
endif()
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/opengm.git
More information about the debian-science-commits
mailing list