use of boofcv.alg.structure.SceneMergingOperations.SceneCommonCounts in project BoofCV by lessthanoptimal.
the class TestSceneMergingOperations method findViewCounts.
@Test
void findViewCounts() {
var list = new DogArray<>(SceneCommonCounts::new, SceneCommonCounts::reset);
// First two calls should add elements. The third all look up the first one again
SceneCommonCounts found1 = SceneMergingOperations.findViewCounts(list, 5);
SceneCommonCounts found2 = SceneMergingOperations.findViewCounts(list, 6);
SceneCommonCounts found3 = SceneMergingOperations.findViewCounts(list, 5);
assertEquals(2, list.size);
assertSame(found1, found3);
assertEquals(5, found1.sceneIndex);
assertEquals(6, found2.sceneIndex);
}
Aggregations