Skip to content

Commit

Permalink
Stop including the values -- they are all 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bredelings committed Jan 1, 2025
1 parent e1ab712 commit df26fd0
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 5 deletions.
2 changes: 0 additions & 2 deletions src/substitution/cache.H
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,6 @@ class SparseLikelihoods: public Object
mutable object_ptr<Likelihood_Cache_Branch> DenseLikelihoods_;

public:
std::vector<double> values;
std::vector<int> states;
std::vector<int> column_offsets;

Expand All @@ -216,7 +215,6 @@ public:
bool away_from_root() const {return false;}

int num_non_zeros() const {
assert(values.size() == states.size());
return states.size();
}

Expand Down
2 changes: 1 addition & 1 deletion src/substitution/cache.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ object_ptr<Likelihood_Cache_Branch> SparseLikelihoods::DenseLikelihoods() const

for(int m=0;m<n_models();m++)
for(int j=column_offsets[i];j<column_offsets[i+1];j++)
S[m*n_states() + states[j]] = values[j];
S[m*n_states() + states[j]] = 1;

i++;
}
Expand Down
2 changes: 0 additions & 2 deletions src/substitution/likelihoodSEV.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1049,7 +1049,6 @@ namespace substitution
int l = smap[s1].as_int();
if (ok[l])
{
LCB->values.push_back(1.0);
LCB->states.push_back(s1);
}
}
Expand All @@ -1058,7 +1057,6 @@ namespace substitution
{
for(int s1=0;s1<n_states;s1++)
{
LCB->values.push_back(1.0);
LCB->states.push_back(s1);
}
}
Expand Down

0 comments on commit df26fd0

Please sign in to comment.