22 deleteFromMap(std::map<unsigned int, T *> & theMap, T * elemToDelete,
bool delete_elem =
true)
25 typename std::map<unsigned int, T *>::iterator i = theMap.find(elemToDelete->id());
26 if (i != theMap.end())
40 typename std::map<unsigned int, T *>::reverse_iterator last_elem = theMap.rbegin();
41 unsigned int new_elem_id = 0;
42 if (last_elem != theMap.rend())
43 new_elem_id = last_elem->first + 1;
51 std::vector<T> common_elems;
52 std::set_intersection(
53 v1.begin(), v1.end(), v2.begin(), v2.end(), std::inserter(common_elems, common_elems.end()));
54 return common_elems.size();
61 std::vector<T> common_elems;
62 std::set_intersection(
63 v1.begin(), v1.end(), v2.begin(), v2.end(), std::inserter(common_elems, common_elems.end()));
64 return common_elems.size();
71 std::vector<T> common_elems;
72 std::set_intersection(
73 v1.begin(), v1.end(), v2.begin(), v2.end(), std::inserter(common_elems, common_elems.end()));