Commit 78a52c80 authored by omid's avatar omid
Browse files

correcting a bug related to initializing (using command line parameters)

when branch lengths are not set to fixed 
parent 5223be55
......@@ -352,10 +352,9 @@ void BranchSiteModel::initFromParams(void) {
throw FastCodeMLFatal("Invalid p0 and p1 values"); //
if (p0 + p1 > 1)
throw FastCodeMLFatal("Invalid p0 and p1 values");
mVar[0] = log((p0) / (1 - p0 - p1)); // log(p0); // p0 -> x0
mVar[mNumTimes + 0] = log((p0) / (1 - p0 - p1)); // log(p0); // p0 -> x0
mVar[1] =
log((p1) / (1 - p0 - p1)); // log(p1); // p1 -> x1
mVar[mNumTimes + 1] = log((p1) / (1 - p0 - p1)); // log(p1); // p1 -> x1
#else
if (p0 < 0 || p1 < 0 || (p0 + p1) < 1e-15)
throw FastCodeMLFatal("Invalid p0 and p1 values");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment