// List the index used by the relative motions
static std::set<IndexT> getIndexT(const RelativeInfo_Vec & vec_relative)
{
  std::set<IndexT> indexT_set;
  for (RelativeInfo_Vec::const_iterator iter = vec_relative.begin();
    iter != vec_relative.end(); ++iter)
  {
    indexT_set.insert(iter->first.first);
    indexT_set.insert(iter->first.second);
  }
  return indexT_set;
}
Beispiel #2
0
inline
void KeepOnlyReferencedElement(
  const std::set<IndexT> & set_remainingIds,
  RelativeInfo_Vec & relativeInfo_vec)
{
  RelativeInfo_Vec map_infered;
  for (RelativeInfo_Vec::const_iterator iter = relativeInfo_vec.begin();
    iter != relativeInfo_vec.end(); ++iter)
  {
    if (set_remainingIds.count(iter->first.first) &&
        set_remainingIds.count(iter->first.second))
    {
      map_infered.push_back(*iter);
    }
  }
  relativeInfo_vec.swap(map_infered);
}