Skip to content

Commit

Permalink
SSE constraints changes
Browse files Browse the repository at this point in the history
  • Loading branch information
willgearty committed Oct 26, 2023
1 parent 41cb4c9 commit 0f4f63c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/core/datatypes/trees/Tree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -797,7 +797,7 @@ size_t Tree::getNumberOfInteriorNodes( void ) const

size_t preliminaryNumIntNodes = getNumberOfNodes() - getNumberOfTips();

if ( isRooted() )
if ( preliminaryNumIntNodes > 1 )
{
if (preliminaryNumIntNodes > 1)
return preliminaryNumIntNodes - 1;
Expand All @@ -806,7 +806,7 @@ size_t Tree::getNumberOfInteriorNodes( void ) const
}
else
{
return preliminaryNumIntNodes;
return 0;
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1117,9 +1117,11 @@ std::vector<double> GeneralizedLineageHeterogeneousBirthDeathSamplingProcess::si
{
// get the age of the tip
double a = taxa[i + 1].getAge();
double min_age_tax = taxa[i + 1].getAgeRange().getMin();
double max_age_tax = taxa[i + 1].getAgeRange().getMax();

// simulate the age of a node
double new_age = a + rng->uniform01() * (max_age - a);
double new_age = min_age_tax + rng->uniform01() * (max_age_tax - min_age_tax);

//add the age to the vector of ages
ages.push_back(new_age);
Expand Down

0 comments on commit 0f4f63c

Please sign in to comment.