5 #ifndef __pinocchio_multibody_instance_filter_hpp__
6 #define __pinocchio_multibody_instance_filter_hpp__
34 template<
typename Allocator>
35 std::vector<size_t>
apply(
const std::vector<T, Allocator> & object_vector)
const
37 std::vector<size_t> res;
38 res.reserve(object_vector.size());
40 for (
size_t k = 0; k < object_vector.size(); ++k)
42 if ((*
this)(object_vector[k]))
46 res.reserve(res.size());
Main pinocchio namespace.
Instance filter base class.
std::vector< size_t > apply(const std::vector< T, Allocator > &object_vector) const
Apply the filter on the given vector of objects and returns the list of indexes of the objects matchi...
virtual bool operator()(const T &obj) const =0
Returns true if the input obj matches the filter conditions.