Return a pointer to the relevant vector of indices if specified value was found in the array.
| 130 | // Return a pointer to the relevant vector of indices if specified value was |
| 131 | // found in the array. |
| 132 | std::vector<vtkIdType>* FindIndexVec(ValueType value) |
| 133 | { |
| 134 | std::vector<vtkIdType>* indices{ nullptr }; |
| 135 | if (vtkGenericDataArrayLookupHelper_detail::isnan(value) && !this->NanIndices.empty()) |
| 136 | { |
| 137 | indices = &this->NanIndices; |
| 138 | } |
| 139 | const auto& pos = this->ValueMap.find(value); |
| 140 | if (pos != this->ValueMap.end()) |
| 141 | { |
| 142 | indices = &pos->second; |
| 143 | } |
| 144 | return indices; |
| 145 | } |
| 146 | |
| 147 | ArrayTypeT* AssociatedArray{ nullptr }; |
| 148 | std::unordered_map<ValueType, std::vector<vtkIdType>> ValueMap; |
no test coverage detected