Template Function aslam::common::keepOnlyNSortedElements

Function Documentation

template<typename ElementType, typename Allocator, typename CompareFunctor, typename RemoveActionFunctor = NullAction<ElementType>>
size_t aslam::common::keepOnlyNSortedElements(size_t max_elements_to_keep, const CompareFunctor &sort_compare_functor, std::vector<ElementType, Allocator> *container, const RemoveActionFunctor &action_on_removed_elements = NullAction<ElementType>())