Skip to content

Commit

Permalink
Small fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
abellgithub committed Aug 13, 2020
1 parent 9a5c870 commit db4c5bf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
1 change: 0 additions & 1 deletion filters/NeighborClassifierFilter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ void NeighborClassifierFilter::doOneNoDomain(PointRef &point, PointRef &temp,
[](CountMap::const_reference p1, CountMap::const_reference p2)
{ return p1.second < p2.second; });

// update point
if (pr.second > iSrc.size() / 2.0)
{
int oldclass = point.getFieldAs<int>(Dimension::Id::Classification);
Expand Down
7 changes: 4 additions & 3 deletions test/unit/filters/NeighborClassifierFilterTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,10 @@ TEST(NeighborClassifierFilterTest, candidate)
Stage& r = *(factory.createStage("readers.las"));
r.setOptions(ro);

// NeighborClassifier used to be broken because it would change voting point classifications while
// it was running. This mean it would create different classifications if the order was different.
// Adding this filter should quickly expose this case if it were to reappear.
// NeighborClassifier used to be broken because it would change voting point
// classifications while it was running. This mean it would create different
// classifications if the point order was different.
// Randomizing the data should quickly expose this case if it were to reappear.
Stage& rfilter = *(factory.createStage("filters.randomize"));
rfilter.setInput(r);

Expand Down

0 comments on commit db4c5bf

Please sign in to comment.