Skip to content

Commit

Permalink
fixing constraint lookup
Browse files Browse the repository at this point in the history
  • Loading branch information
petergjoel committed Oct 7, 2023
1 parent 9492049 commit c5861ed
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/RefinementTree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,12 @@ namespace prlearn {
}
}
else {
size_t j = 0;
for(size_t i = 0; i < n_labels; ++i)
{
size_t j = 0;
for(;j < _mapping.size() && _mapping[j]._label < next_labels[i]; ++j) {};
if(j >= _mapping.size()) return val;
if(_mapping[j]._label != next_labels[i])
continue;
if(j >= _mapping.size()) continue;
if(_mapping[j]._label != next_labels[i]) continue;
const auto& res = _mapping[j];
auto node = _nodes[res._nid].get_leaf(point, res._nid, _nodes);
auto v = _nodes[node]._predictor._q.avg();
Expand Down

0 comments on commit c5861ed

Please sign in to comment.