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

Function CreateArray

Common/Core/Testing/Cxx/ExampleDataArrayRangeDispatch.cxx:113–120  ·  view source on GitHub ↗

Create an AOS array and return a plain vtkDataArray pointer.

Source from the content-addressed store, hash-verified

111
112// Create an AOS<float> array and return a plain vtkDataArray pointer.
113vtkDataArray* CreateArray()
114{
115 vtkNew<vtkFloatArray> aosArray;
116 aosArray->SetNumberOfComponents(1);
117 aosArray->SetNumberOfTuples(1024);
118 aosArray->Register(nullptr); // Add a reference before we return.
119 return aosArray;
120}
121
122// std::equal predicate to do "close enough" equality comparisons to work
123// around floating point issues.

Callers 5

TestArrayAPIFunction · 0.70
DeepCopyMethod · 0.50
SetAnnotationsMethod · 0.50
CreateDataArrayMethod · 0.50

Calls 3

SetNumberOfComponentsMethod · 0.45
SetNumberOfTuplesMethod · 0.45
RegisterMethod · 0.45

Tested by 1

TestArrayAPIFunction · 0.56