MCPcopy Create free account
hub / github.com/Kitware/VTK / FindIndexVec

Function FindIndexVec

Common/Core/vtkGenericDataArrayLookupHelper.h:132–145  ·  view source on GitHub ↗

Return a pointer to the relevant vector of indices if specified value was found in the array.

Source from the content-addressed store, hash-verified

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;

Callers 1

LookupValueFunction · 0.85

Calls 4

isnanFunction · 0.70
emptyMethod · 0.45
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected