Skip to content

Commit

Permalink
validate_selection_edge_list: harmonize pop id validation with valida…
Browse files Browse the repository at this point in the history
…te_edge_list
  • Loading branch information
iraikov committed Aug 12, 2024
1 parent 5841021 commit e3964ae
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions src/graph/validate_selection_edge_list.cc
Original file line number Diff line number Diff line change
Expand Up @@ -57,23 +57,27 @@ namespace neuroh5
}
else
{
if (riter != pop_ranges.begin())
{
--riter;
pp.second = riter->second.second;
}
else
DEBUG("unable to find population for dst = ",
dst,"\n");
return false;
}
}
else
{
if (riter != pop_ranges.begin())
{
--riter;
pp.second = riter->second.second;
}
else
{
{
DEBUG("unable to find population for dst = ",
dst,"\n");
return false;
}
}
}
else
{
pp.second = riter->second.second-1;
}
size_t low = selection_dst_ptr[i], high = selection_dst_ptr[i+1];
assert((low <= src_idx.size()) && (high <= src_idx.size()));
if ((high-low) == 0)
Expand Down

0 comments on commit e3964ae

Please sign in to comment.