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

Function UpdateLookup

Common/Core/vtkGenericDataArrayLookupHelper.h:109–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

107 void operator=(const vtkGenericDataArrayLookupHelper&) = delete;
108
109 void UpdateLookup()
110 {
111 if (!this->AssociatedArray || (this->AssociatedArray->GetNumberOfTuples() < 1) ||
112 (!this->ValueMap.empty() || !this->NanIndices.empty()))
113 {
114 return;
115 }
116
117 vtkIdType num = this->AssociatedArray->GetNumberOfValues();
118 this->ValueMap.reserve(num);
119 for (vtkIdType i = 0; i < num; ++i)
120 {
121 auto value = this->AssociatedArray->GetValue(i);
122 if (vtkGenericDataArrayLookupHelper_detail::isnan(value))
123 {
124 NanIndices.push_back(i);
125 }
126 this->ValueMap[value].push_back(i);
127 }
128 }
129
130 // Return a pointer to the relevant vector of indices if specified value was
131 // found in the array.

Callers

nothing calls this directly

Calls 7

isnanFunction · 0.70
GetNumberOfTuplesMethod · 0.45
emptyMethod · 0.45
GetNumberOfValuesMethod · 0.45
reserveMethod · 0.45
GetValueMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected