[med-svn] [libbpp-phyl] 03/03: Version 2.3.2.
Julien Dutheil
jdutheil-guest at moszumanska.debian.org
Tue Feb 6 12:41:12 UTC 2018
This is an automated email from the git hooks/post-receive script.
jdutheil-guest pushed a commit to branch master
in repository libbpp-phyl.
commit d6dea21173b20b172065d3357d6bba9d5ae69327
Author: Julien Y. Dutheil <dutheil at evolbio.mpg.de>
Date: Tue Feb 6 13:42:17 2018 +0100
Version 2.3.2.
---
debian/changelog | 7 ++
debian/control | 6 +-
...-unit-tests-compilation-on-some-platforms.patch | 19 ---
.../patches/correct_constructors_inheritance.patch | 48 ++++++++
debian/patches/relax_test_timeout.patch | 13 --
debian/patches/remove_deprecated_warnings.patch | 98 ---------------
debian/patches/series | 6 +-
debian/patches/test_likelihood_clock.patch | 67 -----------
debian/patches/test_mapping.patch | 132 ---------------------
debian/patches/unforce-cxxflags.patch | 2 +-
10 files changed, 60 insertions(+), 338 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 4ebfdee..f6e47cb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+libbpp-phyl (2.3.2-1) UNRELEASED; urgency=medium
+
+ [ Julien Dutheil ]
+ * Standards-Version: 4.1.2
+
+ -- Julien Dutheil <julien.dutheil at univ-montp2.fr> Mon, 05 Feb 2018 20:59:41 +0200
+
libbpp-phyl (2.3.1-10) unstable; urgency=medium
[ Julien Dutheil ]
diff --git a/debian/control b/debian/control
index 39df795..5bea196 100644
--- a/debian/control
+++ b/debian/control
@@ -7,8 +7,8 @@ Priority: optional
Build-Depends: debhelper (>= 10),
cmake,
d-shlibs (>= 0.80),
- libbpp-seq-dev (>= 2.3.1)
-Standards-Version: 4.0.1
+ libbpp-seq-dev (>= 2.3.2)
+Standards-Version: 4.1.2
Vcs-Browser: https://anonscm.debian.org/cgit/debian-med/libbpp-phyl.git
Vcs-Git: https://anonscm.debian.org/git/debian-med/libbpp-phyl.git
Homepage: http://biopp.univ-montp2.fr/wiki/index.php/Main_Page
@@ -18,7 +18,7 @@ Architecture: any
Section: libdevel
Depends: libbpp-phyl11 (= ${binary:Version}),
${misc:Depends},
- libbpp-seq-dev (>= 2.3.1)
+ libbpp-seq-dev (>= 2.3.2)
Description: Bio++ Phylogenetic library development files
Bio++ is a set of C++ libraries for Bioinformatics, including sequence
analysis, phylogenetics, molecular evolution and population genetics.
diff --git a/debian/patches/0002-Fixed-unit-tests-compilation-on-some-platforms.patch b/debian/patches/0002-Fixed-unit-tests-compilation-on-some-platforms.patch
deleted file mode 100644
index e576257..0000000
--- a/debian/patches/0002-Fixed-unit-tests-compilation-on-some-platforms.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-From 40b4ee6fb20750e6aacbeaf67cba4f87ed88972a Mon Sep 17 00:00:00 2001
-From: "Julien Y. Dutheil" <dutheil at evolbio.mpg.de>
-Date: Tue, 27 Jun 2017 10:45:09 +0200
-Subject: [PATCH 2/2] Fixed unit tests compilation on some platforms.
-
----
- test/CMakeLists.txt | 1 +
- 1 file changed, 1 insertion(+)
-
---- a/test/CMakeLists.txt
-+++ b/test/CMakeLists.txt
-@@ -16,6 +16,7 @@ foreach (test_cpp_file ${test_cpp_files}
- get_filename_component (test_name ${test_cpp_file} NAME_WE)
- add_executable (${test_name} ${test_cpp_file})
- target_link_libraries (${test_name} ${PROJECT_NAME}-shared)
-+ set_target_properties (${test_name} PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
- add_test (
- NAME ${test_name}
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
diff --git a/debian/patches/correct_constructors_inheritance.patch b/debian/patches/correct_constructors_inheritance.patch
new file mode 100644
index 0000000..e5a74a9
--- /dev/null
+++ b/debian/patches/correct_constructors_inheritance.patch
@@ -0,0 +1,48 @@
+diff --git a/src/Bpp/Phyl/Model/RateDistribution/ConstantRateDistribution.h b/src/Bpp/Phyl/Model/RateDistribution/ConstantRateDistribution.h
+index 93e8f47..593441d 100644
+--- a/src/Bpp/Phyl/Model/RateDistribution/ConstantRateDistribution.h
++++ b/src/Bpp/Phyl/Model/RateDistribution/ConstantRateDistribution.h
+@@ -50,7 +50,6 @@ class ConstantRateDistribution:
+ {
+ public:
+ ConstantRateDistribution():
+- AbstractParameterAliasable("Constant."),
+ ConstantDistribution(1.)
+ {
+ resetParameters_();
+diff --git a/src/Bpp/Phyl/Model/RateDistribution/ExponentialDiscreteRateDistribution.h b/src/Bpp/Phyl/Model/RateDistribution/ExponentialDiscreteRateDistribution.h
+index e647f63..7373643 100644
+--- a/src/Bpp/Phyl/Model/RateDistribution/ExponentialDiscreteRateDistribution.h
++++ b/src/Bpp/Phyl/Model/RateDistribution/ExponentialDiscreteRateDistribution.h
+@@ -50,7 +50,6 @@ class ExponentialDiscreteRateDistribution:
+ {
+ public:
+ ExponentialDiscreteRateDistribution(size_t nbClasses):
+- AbstractParameterAliasable("Exponential."),
+ ExponentialDiscreteDistribution(nbClasses, 1.)
+ {
+ deleteParameter_(0);
+diff --git a/src/Bpp/Phyl/Model/RateDistribution/GammaDiscreteRateDistribution.h b/src/Bpp/Phyl/Model/RateDistribution/GammaDiscreteRateDistribution.h
+index 5159ec1..7cbb799 100644
+--- a/src/Bpp/Phyl/Model/RateDistribution/GammaDiscreteRateDistribution.h
++++ b/src/Bpp/Phyl/Model/RateDistribution/GammaDiscreteRateDistribution.h
+@@ -50,7 +50,6 @@ class GammaDiscreteRateDistribution:
+ {
+ public:
+ GammaDiscreteRateDistribution(size_t nbClasses, double alpha = 1.):
+- AbstractParameterAliasable("Gamma."),
+ GammaDiscreteDistribution(nbClasses, alpha, alpha)
+ {
+ aliasParameters("alpha", "beta");
+diff --git a/src/Bpp/Phyl/Model/RateDistribution/GaussianDiscreteRateDistribution.h b/src/Bpp/Phyl/Model/RateDistribution/GaussianDiscreteRateDistribution.h
+index 75eb37e..bde7c9c 100644
+--- a/src/Bpp/Phyl/Model/RateDistribution/GaussianDiscreteRateDistribution.h
++++ b/src/Bpp/Phyl/Model/RateDistribution/GaussianDiscreteRateDistribution.h
+@@ -50,7 +50,6 @@ class GaussianDiscreteRateDistribution:
+ {
+ public:
+ GaussianDiscreteRateDistribution(size_t nbClasses, double sigma):
+- AbstractParameterAliasable("Gaussian."),
+ GaussianDiscreteDistribution(nbClasses, 1., sigma)
+ {
+ deleteParameter_(0);
diff --git a/debian/patches/relax_test_timeout.patch b/debian/patches/relax_test_timeout.patch
deleted file mode 100644
index eadaa9c..0000000
--- a/debian/patches/relax_test_timeout.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Author: Julien Y. Dutheil <dutheil at evolbio.mpg.de>
-Date: Sat Jun 24 23:41:39 2017 +0200
-Description: Added longer timeout for tests.
-
---- a/test/CMakeLists.txt
-+++ b/test/CMakeLists.txt
-@@ -21,4 +21,6 @@ foreach (test_cpp_file ${test_cpp_files}
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
- COMMAND ${test_name}
- )
-+ set_tests_properties (${test_name} PROPERTIES TIMEOUT 60000)
- endforeach (test_cpp_file)
-+
diff --git a/debian/patches/remove_deprecated_warnings.patch b/debian/patches/remove_deprecated_warnings.patch
deleted file mode 100644
index 9809bb7..0000000
--- a/debian/patches/remove_deprecated_warnings.patch
+++ /dev/null
@@ -1,98 +0,0 @@
-Author: Julien Y. Dutheil <dutheil at evolbio.mpg.de>
-Date: Sun Jul 16 10:45:20 2017 +0200
-Description: Remove deprecated warnings
-
---- a/src/Bpp/Phyl/Likelihood/AbstractNonHomogeneousTreeLikelihood.h
-+++ b/src/Bpp/Phyl/Likelihood/AbstractNonHomogeneousTreeLikelihood.h
-@@ -74,7 +74,7 @@ class AbstractNonHomogeneousTreeLikeliho
- siteModelDescriptions_(), index_(0), nbModels_(modelSet->getNumberOfModels())
- {
- for (size_t i = 0; i < nbModels_; ++i)
-- siteModelDescriptions_.push_back(ConstNoPartitionSiteModelDescription(modelSet->getModel(i), modelSet->getNodesWithModel(i)));
-+ siteModelDescriptions_.push_back(ConstNoPartitionSiteModelDescription(modelSet->getSubstitutionModel(i), modelSet->getNodesWithModel(i)));
- }
-
- public:
---- a/src/Bpp/Phyl/Likelihood/DRNonHomogeneousTreeLikelihood.cpp
-+++ b/src/Bpp/Phyl/Likelihood/DRNonHomogeneousTreeLikelihood.cpp
-@@ -142,7 +142,7 @@ void DRNonHomogeneousTreeLikelihood::set
- data_ = PatternTools::getSequenceSubset(sites, *tree_->getRootNode());
- if (verbose_)
- ApplicationTools::displayTask("Initializing data structure");
-- likelihoodData_->initLikelihoods(*data_, *modelSet_->getModel(0)); // We assume here that all models have the same number of states, and that they have the same 'init' method,
-+ likelihoodData_->initLikelihoods(*data_, *modelSet_->getSubstitutionModel(0)); // We assume here that all models have the same number of states, and that they have the same 'init' method,
- // Which is a reasonable assumption as long as they share the same alphabet.
- if (verbose_)
- ApplicationTools::displayTaskDone();
---- a/src/Bpp/Phyl/Likelihood/RNonHomogeneousTreeLikelihood.cpp
-+++ b/src/Bpp/Phyl/Likelihood/RNonHomogeneousTreeLikelihood.cpp
-@@ -140,7 +140,7 @@ void RNonHomogeneousTreeLikelihood::setD
- if (data_) delete data_;
- data_ = PatternTools::getSequenceSubset(sites, *tree_->getRootNode());
- if (verbose_) ApplicationTools::displayTask("Initializing data structure");
-- likelihoodData_->initLikelihoods(*data_, *modelSet_->getModel(0)); //We assume here that all models have the same number of states, and that they have the same 'init' method,
-+ likelihoodData_->initLikelihoods(*data_, *modelSet_->getSubstitutionModel(0)); //We assume here that all models have the same number of states, and that they have the same 'init' method,
- //Which is a reasonable assumption as long as they share the same alphabet.
- if (verbose_) ApplicationTools::displayTaskDone();
-
---- a/src/Bpp/Phyl/Model/SubstitutionModelSet.h
-+++ b/src/Bpp/Phyl/Model/SubstitutionModelSet.h
-@@ -247,7 +247,6 @@ public:
- * @param i Index of the model in the set.
- * @return A pointer toward the corresponding model.
- */
--
- const SubstitutionModel* getModel(size_t i) const throw (IndexOutOfBoundsException)
- {
- std::cerr << "#warning : SubstitutionModelSet::getModel function is deprecated in Bio++ 2.3.0. Replace it with SubstitutionModelSet::getSubstitutionModel." << std::endl;
---- a/test/test_likelihood_nh.cpp
-+++ b/test/test_likelihood_nh.cpp
-@@ -129,11 +129,11 @@ int main() {
- cout << c1 << ": " << tl.getValue() << "\t" << c2 << ": " << tl2.getValue() << endl;
-
- for (size_t i = 0; i < nmodels; ++i) {
-- cout << modelSet2->getModel(i)->getParameter("theta").getValue() << "\t" << modelSet3->getModel(i)->getParameter("theta").getValue() << endl;
-- //if (abs(modelSet2->getModel(i)->getParameter("theta").getValue() - modelSet3->getModel(i)->getParameter("theta").getValue()) > 0.1)
-+ cout << modelSet2->getSubstitutionModel(i)->getParameter("theta").getValue() << "\t" << modelSet3->getSubstitutionModel(i)->getParameter("theta").getValue() << endl;
-+ //if (abs(modelSet2->getSubstitutionModel(i)->getParameter("theta").getValue() - modelSet3->getSubstitutionModel(i)->getParameter("theta").getValue()) > 0.1)
- // return 1;
-- thetasEst1[i] += modelSet2->getModel(i)->getParameter("theta").getValue();
-- thetasEst2[i] += modelSet3->getModel(i)->getParameter("theta").getValue();
-+ thetasEst1[i] += modelSet2->getSubstitutionModel(i)->getParameter("theta").getValue();
-+ thetasEst2[i] += modelSet3->getSubstitutionModel(i)->getParameter("theta").getValue();
- }
- }
- thetasEst1 /= static_cast<double>(nrep);
---- a/test/test_simulations.cpp
-+++ b/test/test_simulations.cpp
-@@ -104,8 +104,8 @@ int main() {
-
- //Now compare estimated values to real ones:
- for (size_t i = 0; i < thetas.size(); ++i) {
-- cout << thetas[i] << "\t" << modelSet2->getModel(i)->getParameter("theta").getValue() << endl;
-- double diff = abs(thetas[i] - modelSet2->getModel(i)->getParameter("theta").getValue());
-+ cout << thetas[i] << "\t" << modelSet2->getSubstitutionModel(i)->getParameter("theta").getValue() << endl;
-+ double diff = abs(thetas[i] - modelSet2->getSubstitutionModel(i)->getParameter("theta").getValue());
- if (diff > 0.1)
- return 1;
- }
-@@ -119,7 +119,7 @@ int main() {
- VectorSiteContainer sites2(seqNames, alphabet);
- for (unsigned int i = 0; i < n; ++i) {
- RASiteSimulationResult* result = simulator.dSimulateSite();
-- unique_ptr<Site> site(result->getSite(*simulator.getSubstitutionModelSet()->getModel(0)));
-+ unique_ptr<Site> site(result->getSite(*simulator.getSubstitutionModelSet()->getSubstitutionModel(0)));
- site->setPosition(static_cast<int>(i));
- sites2.addSite(*site, false);
- delete result;
-@@ -136,8 +136,8 @@ int main() {
-
- //Now compare estimated values to real ones:
- for (size_t i = 0; i < thetas.size(); ++i) {
-- cout << thetas[i] << "\t" << modelSet3->getModel(i)->getParameter("theta").getValue() << endl;
-- double diff = abs(thetas[i] - modelSet3->getModel(i)->getParameter("theta").getValue());
-+ cout << thetas[i] << "\t" << modelSet3->getSubstitutionModel(i)->getParameter("theta").getValue() << endl;
-+ double diff = abs(thetas[i] - modelSet3->getSubstitutionModel(i)->getParameter("theta").getValue());
- if (diff > 0.1)
- return 1;
- }
diff --git a/debian/patches/series b/debian/patches/series
index 572f22c..305f256 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,6 +1,2 @@
unforce-cxxflags.patch
-relax_test_timeout.patch
-0002-Fixed-unit-tests-compilation-on-some-platforms.patch
-remove_deprecated_warnings.patch
-test_likelihood_clock.patch
-test_mapping.patch
+correct_constructors_inheritance.patch
diff --git a/debian/patches/test_likelihood_clock.patch b/debian/patches/test_likelihood_clock.patch
deleted file mode 100644
index 7cdbeda..0000000
--- a/debian/patches/test_likelihood_clock.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-Author: Julien Y. Dutheil <dutheil at evolbio.mpg.de>
-Date: Sun Jul 16 10:45:20 2017 +0200
-Description: Relax test constraint
-
---- a/test/test_likelihood_clock.cpp
-+++ b/test/test_likelihood_clock.cpp
-@@ -41,7 +41,7 @@ knowledge of the CeCILL license and that
- #include <Bpp/Seq/Alphabet/AlphabetTools.h>
- #include <Bpp/Phyl/TreeTemplate.h>
- #include <Bpp/Phyl/Model/Nucleotide/T92.h>
--#include <Bpp/Phyl/Model/RateDistribution/GammaDiscreteRateDistribution.h>
-+#include <Bpp/Phyl/Model/RateDistribution/ConstantRateDistribution.h>
- #include <Bpp/Phyl/Simulation/HomogeneousSequenceSimulator.h>
- #include <Bpp/Phyl/Likelihood/RHomogeneousTreeLikelihood.h>
- #include <Bpp/Phyl/Likelihood/RHomogeneousClockTreeLikelihood.h>
-@@ -60,7 +60,7 @@ void fitModelH(SubstitutionModel* model,
- ApplicationTools::displayResult("Test model", model->getName());
- cout << setprecision(20) << tl.getValue() << endl;
- ApplicationTools::displayResult("* initial likelihood", tl.getValue());
-- if (abs(tl.getValue() - initialValue) > 0.0001)
-+ if (abs(tl.getValue() - initialValue) > 0.001)
- throw Exception("Incorrect initial value.");
- unique_ptr<OutputStream> messenger(new StlOutputStream(new ofstream("messages.txt", ios::out)));
- unique_ptr<OutputStream> profiler(new StlOutputStream(new ofstream("profile.txt", ios::out)));
-@@ -69,7 +69,7 @@ void fitModelH(SubstitutionModel* model,
- cout << setprecision(20) << tl.getValue() << endl;
- ApplicationTools::displayResult("* likelihood after full optimization", tl.getValue());
- tl.getParameters().printParameters(cout);
-- if (abs(tl.getValue() - finalValue) > 0.0001)
-+ if (abs(tl.getValue() - finalValue) > 0.001)
- throw Exception("Incorrect final value.");
- }
-
-@@ -92,7 +92,7 @@ void fitModelHClock(SubstitutionModel* m
- ApplicationTools::displayResult("* likelihood after full optimization", tl.getValue());
- tl.getParameters().printParameters(cout);
- if (abs(tl.getValue() - finalValue) > 0.001)
-- throw Exception("Incorrect final value.");
-+ throw Exception("Incorrect final value:" + TextTools::toString(tl.getValue()) + "<>" + TextTools::toString(finalValue));
- }
-
- int main() {
-@@ -103,7 +103,7 @@ int main() {
-
- const NucleicAlphabet* alphabet = &AlphabetTools::DNA_ALPHABET;
- SubstitutionModel* model = new T92(alphabet, 3.);
-- DiscreteDistribution* rdist = new GammaDiscreteRateDistribution(4, 1.0);
-+ DiscreteDistribution* rdist = new ConstantRateDistribution();
-
- VectorSiteContainer sites(alphabet);
- sites.addSequence(BasicSequence("A", "AAATGGCTGTGCACGTC", alphabet));
-@@ -112,13 +112,13 @@ int main() {
- sites.addSequence(BasicSequence("D", "CAACGGGAGTGCGCCTA", alphabet));
-
- try {
-- fitModelH(model, rdist, *tree, sites, 93.017264552603336369, 71.265543199977557265);
-+ fitModelH(model, rdist, *tree, sites, 94.3957, 71.2657);
- } catch (Exception& ex) {
- cerr << ex.what() << endl;
- return 1;
- }
- try {
-- fitModelHClock(model, rdist, *tree, sites, 92.27912072473920090943, 71.26554020984087856050);
-+ fitModelHClock(model, rdist, *tree, sites, 92.3295, 71.2657);
- } catch (Exception& ex) {
- cerr << ex.what() << endl;
- return 1;
diff --git a/debian/patches/test_mapping.patch b/debian/patches/test_mapping.patch
deleted file mode 100644
index bd9f283..0000000
--- a/debian/patches/test_mapping.patch
+++ /dev/null
@@ -1,132 +0,0 @@
-Author: Julien Y. Dutheil <dutheil at evolbio.mpg.de>
-Date: Sun Jul 16 10:45:20 2017 +0200
-Description: More sensible tests
-
---- a/test/test_mapping.cpp
-+++ b/test/test_mapping.cpp
-@@ -64,7 +64,8 @@ using namespace bpp;
- using namespace std;
-
- int main() {
-- TreeTemplate<Node>* tree = TreeTemplateTools::parenthesisToTree("((A:0.001, B:0.002):0.008,C:0.01,D:0.1);");
-+ try {
-+ TreeTemplate<Node>* tree = TreeTemplateTools::parenthesisToTree("((A:0.001, B:0.002):0.008,C:0.01,D:0.02);");
- vector<int> ids = tree->getNodesId();
- ids.pop_back(); //Ignore root
-
-@@ -79,23 +80,12 @@ int main() {
- TotalSubstitutionRegister* totReg = new TotalSubstitutionRegister(model);
- ComprehensiveSubstitutionRegister* detReg = new ComprehensiveSubstitutionRegister(model);
-
--
-- cout << "test mem" << endl;
-- ProteicAlphabet* alphabet2 = new ProteicAlphabet();
-- ReversibleSubstitutionModel* model2 = new JTT92(alphabet2);
-- AlphabetIndex1* ind = new GranthamAAVolumeIndex();
-- for (size_t i = 0; i < 1000000; i++) {
-- cout << i << endl;
-- unique_ptr<DecompositionReward> d(new DecompositionReward(model2, ind));
-- }
-- cout << "done" << endl;
--
-- unsigned int n = 20000;
-+ size_t n = 50000;
- vector< vector<double> > realMap(n);
- vector< vector< vector<double> > > realMapTotal(n);
- vector< vector< vector<double> > > realMapDetailed(n);
- VectorSiteContainer sites(tree->getLeavesNames(), alphabet);
-- for (unsigned int i = 0; i < n; ++i) {
-+ for (size_t i = 0; i < n; ++i) {
- ApplicationTools::displayGauge(i, n - 1, '=');
- unique_ptr<RASiteSimulationResult> result(simulator.dSimulateSite());
- realMap[i].resize(ids.size());
-@@ -108,12 +98,10 @@ int main() {
- result->getSubstitutionCount(ids[j], *totReg, realMapTotal[i][j]);
- result->getSubstitutionCount(ids[j], *detReg, realMapDetailed[i][j]);
- if (realMapTotal[i][j][0] != realMap[i][j]) {
-- cerr << "Error, total substitution register provides wrong result." << endl;
-- return 1;
-+ throw Exception("Error, total substitution register provides wrong result.");
- }
- if (abs(VectorTools::sum(realMapDetailed[i][j]) - realMap[i][j]) > 0.000001) {
-- cerr << "Error, detailed substitution register provides wrong result." << endl;
-- return 1;
-+ throw Exception("Error, detailed substitution register provides wrong result.");
- }
- }
- unique_ptr<Site> site(result->getSite(*model));
-@@ -130,9 +118,10 @@ int main() {
- drhtl.initialize();
- cout << drhtl.getValue() << endl;
-
-+ //Laplace transforms:
- SubstitutionCount* sCountAna = new LaplaceSubstitutionCount(model, 10);
- Matrix<double>* m = sCountAna->getAllNumbersOfSubstitutions(0.001, 1);
-- cout << "Analytical total count:" << endl;
-+ cout << "Analytical (Laplace) total count:" << endl;
- MatrixTools::print(*m);
- delete m;
- ProbabilisticSubstitutionMapping* probMapAna =
-@@ -237,7 +226,7 @@ int main() {
- //Check per branch:
-
- //1. Total:
-- for (unsigned int j = 0; j < ids.size(); ++j) {
-+ for (size_t j = 0; j < ids.size(); ++j) {
- double totalReal = 0;
- double totalObs1 = 0;
- double totalObs2 = 0;
-@@ -246,7 +235,7 @@ int main() {
- double totalObs5 = 0;
- double totalObs6 = 0;
- double totalObs7 = 0;
-- for (unsigned int i = 0; i < n; ++i) {
-+ for (size_t i = 0; i < n; ++i) {
- totalReal += realMap[i][j];
- totalObs1 += probMapAna->getNumberOfSubstitutions(ids[j], i, 0);
- totalObs2 += probMapTot->getNumberOfSubstitutions(ids[j], i, 0);
-@@ -258,16 +247,16 @@ int main() {
- }
- if (tree->isLeaf(ids[j])) cout << tree->getNodeName(ids[j]) << "\t";
- cout << tree->getDistanceToFather(ids[j]) << "\t" << totalReal << "\t" << totalObs1 << "\t" << totalObs2 << "\t" << totalObs3 << "\t" << totalObs4 << "\t" << totalObs5 << "\t" << totalObs6 << "\t" << totalObs7 << endl;
-- if (abs(totalReal - totalObs1) / totalReal > 0.1) return 1;
-- if (abs(totalReal - totalObs2) / totalReal > 0.1) return 1;
-- if (abs(totalReal - totalObs3) / totalReal > 0.1) return 1;
-- if (abs(totalReal - totalObs4) / totalReal > 0.1) return 1;
-- if (abs(totalReal - totalObs5) / totalReal > 0.1) return 1;
-- if (abs(totalReal - totalObs6) / totalReal > 0.1) return 1;
-- if (abs(totalReal - totalObs7) / totalReal > 0.1) return 1;
-+ if (abs(totalReal - totalObs1) / totalReal > 0.1) throw Exception("Laplace substitution mapping failed, observed: " + TextTools::toString(totalObs1) + ", expected " + TextTools::toString(totalReal));
-+ //if (abs(totalReal - totalObs2) / totalReal > 0.1) return 1; //We do not expect the naive mapping to actually give an accurate result!
-+ //if (abs(totalReal - totalObs3) / totalReal > 0.1) return 1;
-+ if (abs(totalReal - totalObs4) / totalReal > 0.1) throw Exception("Uniformization (total) substitution mapping failed, observed: " + TextTools::toString(totalObs4) + ", expected " + TextTools::toString(totalReal));
-+ if (abs(totalReal - totalObs5) / totalReal > 0.1) throw Exception("Uniformization (detailed) substitution mapping failed, observed: " + TextTools::toString(totalObs5) + ", expected " + TextTools::toString(totalReal));
-+ if (abs(totalReal - totalObs6) / totalReal > 0.1) throw Exception("Decomposition (total) substitution mapping failed, observed: " + TextTools::toString(totalObs6) + ", expected " + TextTools::toString(totalReal));
-+ if (abs(totalReal - totalObs7) / totalReal > 0.1) throw Exception("Decomposition (detailed) substitution mapping failed, observed: " + TextTools::toString(totalObs7) + ", expected " + TextTools::toString(totalReal));
- }
- //2. Detail:
-- for (unsigned int j = 0; j < ids.size(); ++j) {
-+ for (size_t j = 0; j < ids.size(); ++j) {
- vector<double> real(4, 0);
- vector<double> obs1(4, 0);
- vector<double> obs2(4, 0);
-@@ -283,7 +272,7 @@ int main() {
- }
- if (tree->isLeaf(ids[j])) cout << tree->getNodeName(ids[j]) << "\t";
- cout << tree->getDistanceToFather(ids[j]) << "\t";
-- for (unsigned int t = 0; t < 4; ++t) {
-+ for (size_t t = 0; t < 4; ++t) {
- cout << obs1[t] << "/" << real[t] << "\t";
- cout << obs2[t] << "/" << real[t] << "\t";
- cout << obs3[t] << "/" << real[t] << "\t";
-@@ -306,5 +295,10 @@ int main() {
- delete probMapUniTot;
- delete probMapUniDet;
- //return (abs(obs - 0.001) < 0.001 ? 0 : 1);
-+ } catch (exception& e) {
-+ cout << "Test failed. Reason:" << endl;
-+ cout << e.what() << endl;
-+ return 1;
-+ }
- return 0;
- }
diff --git a/debian/patches/unforce-cxxflags.patch b/debian/patches/unforce-cxxflags.patch
index c2e404d..eecdb93 100644
--- a/debian/patches/unforce-cxxflags.patch
+++ b/debian/patches/unforce-cxxflags.patch
@@ -11,7 +11,7 @@ Comment: Upstream version 2.3.0 now has additional -std=c++11 which might
# Compile options
-set (CMAKE_CXX_FLAGS "-std=c++11 -Wall -Weffc++ -Wshadow -Wconversion")
-+# set (CMAKE_CXX_FLAGS "-std=c++11 -Wall -Weffc++ -Wshadow -Wconversion")
++set (CMAKE_CXX_FLAGS "-std=c++11 -Wno-deprecated -g")
IF(NOT CMAKE_BUILD_TYPE)
SET(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/libbpp-phyl.git
More information about the debian-med-commit
mailing list