blob: 6038c15e42ef81d9dfa53558236886ae9cd29c8d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
diff -ur bpp-core-2.2.0_org/src/Bpp/Numeric/Function/ThreePointsNumericalDerivative.cpp bpp-core-2.2.0/src/Bpp/Numeric/Function/ThreePointsNumericalDerivative.cpp
--- bpp-core-2.2.0_org/src/Bpp/Numeric/Function/ThreePointsNumericalDerivative.cpp 2019-10-18 14:13:47.041015700 +0900
+++ bpp-core-2.2.0/src/Bpp/Numeric/Function/ThreePointsNumericalDerivative.cpp 2019-10-18 15:32:41.888978173 +0900
@@ -53,7 +53,7 @@
function2_->enableSecondOrderDerivatives(false);
function_->setParameters(parameters);
f2_ = function_->getValue();
- if ((abs(f2_) >= NumConstants::VERY_BIG()) || isnan(f2_))
+ if ((abs(f2_) >= NumConstants::VERY_BIG()) || std::isnan(f2_))
{
for (size_t i = 0; i < variables_.size(); ++i)
{
@@ -103,7 +103,7 @@
p = p.subList(0);
f1_ = function_->getValue();
- if ((abs(f1_) >= NumConstants::VERY_BIG()) || isnan(f1_))
+ if ((abs(f1_) >= NumConstants::VERY_BIG()) || std::isnan(f1_))
throw ConstraintException("f1_ too large", &p[0], f1_);
else
hf1 = h;
@@ -137,7 +137,7 @@
p = p.subList(0);
f3_ = function_->getValue();
- if ((abs(f3_) >= NumConstants::VERY_BIG()) || isnan(f3_))
+ if ((abs(f3_) >= NumConstants::VERY_BIG()) || std::isnan(f3_))
throw ConstraintException("f3_ too large", &p[0], f3_);
else
hf3 = h;
diff -ur bpp-core-2.2.0_org/src/Bpp/Numeric/Hmm/RescaledHmmLikelihood.cpp bpp-core-2.2.0/src/Bpp/Numeric/Hmm/RescaledHmmLikelihood.cpp
--- bpp-core-2.2.0_org/src/Bpp/Numeric/Hmm/RescaledHmmLikelihood.cpp 2019-10-18 14:13:47.051016751 +0900
+++ bpp-core-2.2.0/src/Bpp/Numeric/Hmm/RescaledHmmLikelihood.cpp 2019-10-18 15:40:33.218550564 +0900
@@ -124,7 +124,7 @@
size_t ii = i * nbStates_;
for (size_t j = 0; j < nbStates_; j++) {
trans[ii + j] = transitionMatrix_->Pij(j, i);
- if (isnan(trans[ii + j]))
+ if (std::isnan(trans[ii + j]))
throw Exception("RescaledHmmLikelihood::computeForward_. NaN transition probability");
if (trans[ii + j] < 0)
throw Exception("RescaledHmmLikelihood::computeForward_. Negative transition probability: " + TextTools::toString(trans[ii + j]));
|