10 #ifndef SNAKSTRUCT_INCL_H_INCLUDED
11 #define SNAKSTRUCT_INCL_H_INCLUDED
19 readyforuse = (readyforuse && isHashParent);
28 if (!hashParent.empty())
32 hashParent.reserve(elems.size());
33 for (
int i = 0; i < int(elems.size()); ++i)
35 hashParent.emplace(elems[i].KeyParent(), i);
44 int key = elems[pos].KeyParent();
45 auto it = hashParent.find(key);
46 while (it->second != pos && it->first == key)
51 if (it->second == pos && it->first == key)
57 std::cerr <<
"Error: Key value std::pair not found and could not be removed " << std::endl;
58 std::cerr <<
" key " << key <<
" pos " << pos << std::endl;
59 std::cerr <<
" in function:" << __PRETTY_FUNCTION__ << std::endl;
65 int key = elems[pos].KeyParent();
66 auto it = hashParent.find(key);
67 if (it != hashParent.end())
69 while (it != hashParent.end() && it->second != pos && it->first == key)
74 if (it != hashParent.end() && it->second == pos && it->first == key)
93 if (isHashParent == 0)
131 if (isHashParent == 0)
133 std::cerr <<
"Warning: reading from potentially obsolete unordered_map " << std::endl;
134 std::cerr <<
" in snaxarray::findedge(int key)" << std::endl;
136 auto search = hashParent.find(key);
138 if (search == hashParent.end())
144 key2 = elems[search->second].KeyParent();
150 return (search->second);
155 if (isHashParent == 0)
157 std::cerr <<
"Warning: reading from potentially obsolete std::unordered_multimap " << std::endl;
158 std::cerr <<
" in " << __PRETTY_FUNCTION__ << std::endl;
159 std::cerr <<
" To avoid this message perform read operations on "
160 "ArrayStruct<T> using the () operator"
163 ReturnDataEqualRange(key, hashParent, siblings);
169 hashParent.emplace(newelem.KeyParent(), elems.size() - 1);
178 for (ii = 0; ii < n; ++ii)
180 elems[ii].isModif =
false;
189 for (ii = 0; ii < n; ++ii)
191 if (elems[ii].isModif)
193 vecind.push_back(elems[ii].index);
202 modiflog.assign(n,
false);
203 for (ii = 0; ii < n; ++ii)
205 modiflog[ii] = (elems[ii].index);
Provide std::vector container with hashed index mapping.
#define RSVS3D_ERROR_ARGUMENT(M)
Throw a invalid_argument.