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

Method Sort

Common/Core/vtkSortDataArray.cxx:30–46  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

28
29//------------------------------------------------------------------------------
30void vtkSortDataArray::Sort(vtkIdList* keys, int dir)
31{
32 if (keys == nullptr)
33 {
34 return;
35 }
36 vtkIdType* data = keys->GetPointer(0);
37 vtkIdType numKeys = keys->GetNumberOfIds();
38 if (dir == 0)
39 {
40 vtkSMPTools::Sort(data, data + numKeys);
41 }
42 else
43 {
44 vtkSMPTools::Sort(data, data + numKeys, std::greater<>());
45 }
46}
47
48//------------------------------------------------------------------------------
49void vtkSortDataArray::Sort(vtkAbstractArray* keys, int dir)

Callers

nothing calls this directly

Calls 8

ShuffleArrayFunction · 0.85
SortFunction · 0.70
GetPointerMethod · 0.45
GetNumberOfIdsMethod · 0.45
GetNumberOfComponentsMethod · 0.45
GetVoidPointerMethod · 0.45
GetNumberOfTuplesMethod · 0.45
GetDataTypeMethod · 0.45

Tested by

no test coverage detected