예제 #1
0
template <typename PointInT, typename StateT> bool
pcl::tracking::KLDAdaptiveParticleFilterTracker<PointInT, StateT>::insertIntoBins
(std::vector<int> bin, std::vector<std::vector<int> > &B)
{
  for (size_t i = 0; i < B.size (); i++)
  {
    if (equalBin (bin, B[i]))
      return false;
  }
  B.push_back (bin);
  return true;
}
template <typename PointInT, typename StateT> bool
pcl::tracking::KLDAdaptiveParticleFilterTracker<PointInT, StateT>::insertIntoBins
(std::vector<int> &&new_bin, std::vector<std::vector<int> > &bins)
{
  for (auto &existing_bin : bins)
  {
    if (equalBin (new_bin, existing_bin))
      return false;
  }
  bins.push_back (std::move(new_bin));
  return true;
}