Skip to content

Commit

Permalink
Handle SparseLikelihoods.
Browse files Browse the repository at this point in the history
  • Loading branch information
bredelings committed Jan 1, 2025
1 parent df26fd0 commit a4e24da
Showing 1 changed file with 36 additions and 6 deletions.
42 changes: 36 additions & 6 deletions src/substitution/likelihoodSEV.cc
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,12 @@ namespace substitution
for(auto& lc: LCB)
LC.push_back(lc);
for(auto& lc: LCN)
LC.push_back(lc);
{
if (auto SL = lc.to<SparseLikelihoods>())
LC.push_back(SL->DenseLikelihoods());
else
LC.push_back(lc);
}

auto cache = [&](int i) -> auto& { return LC[i].as_<Likelihood_Cache_Branch>(); };

Expand Down Expand Up @@ -424,7 +429,12 @@ namespace substitution
for(auto& lc: LCB)
LC.push_back(lc);
for(auto& lc: LCN)
LC.push_back(lc);
{
if (auto SL = lc.to<SparseLikelihoods>())
LC.push_back(SL->DenseLikelihoods());
else
LC.push_back(lc);
}

auto cache = [&](int i) -> auto& { return LC[i].as_<Likelihood_Cache_Branch>(); };

Expand Down Expand Up @@ -786,7 +796,12 @@ namespace substitution
for(auto& lc: LCB)
LC.push_back(lc);
for(auto& lc: LCN)
LC.push_back(lc);
{
if (auto SL = lc.to<SparseLikelihoods>())
LC.push_back(SL->DenseLikelihoods());
else
LC.push_back(lc);
}

auto cache = [&](int i) -> auto& { return LC[i].as_<Likelihood_Cache_Branch>(); };

Expand Down Expand Up @@ -884,7 +899,12 @@ namespace substitution
for(auto& lc: LCB)
LC.push_back(lc);
for(auto& lc: LCN)
LC.push_back(lc);
{
if (auto SL = lc.to<SparseLikelihoods>())
LC.push_back(SL->DenseLikelihoods());
else
LC.push_back(lc);
}

auto cache = [&](int i) -> auto& { return LC[i].as_<Likelihood_Cache_Branch>(); };

Expand Down Expand Up @@ -1103,7 +1123,12 @@ namespace substitution
for(auto& lc: LCB)
LC.push_back(lc);
for(auto& lc: LCN)
LC.push_back(lc);
{
if (auto SL = lc.to<SparseLikelihoods>())
LC.push_back(SL->DenseLikelihoods());
else
LC.push_back(lc);
}

auto cache = [&](int i) -> auto& { return LC[i].as_<Likelihood_Cache_Branch>(); };

Expand Down Expand Up @@ -1177,7 +1202,12 @@ namespace substitution
for(auto& lc: LCB)
LC.push_back(lc);
for(auto& lc: LCN)
LC.push_back(lc);
{
if (auto SL = lc.to<SparseLikelihoods>())
LC.push_back(SL->DenseLikelihoods());
else
LC.push_back(lc);
}

auto cache = [&](int i) -> auto& { return LC[i].as_<Likelihood_Cache_Branch>(); };

Expand Down

0 comments on commit a4e24da

Please sign in to comment.