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

Method GetCumulativeWeights

Filters/Modeling/vtkDijkstraGraphGeodesicPath.cxx:47–60  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

45
46//------------------------------------------------------------------------------
47void vtkDijkstraGraphGeodesicPath::GetCumulativeWeights(vtkDoubleArray* weights)
48{
49 if (!weights)
50 {
51 return;
52 }
53
54 weights->Initialize();
55 double* weightsArray = new double[this->Internals->CumulativeWeights.size()];
56 std::copy(this->Internals->CumulativeWeights.begin(), this->Internals->CumulativeWeights.end(),
57 weightsArray);
58 weights->SetArray(
59 weightsArray, static_cast<vtkIdType>(this->Internals->CumulativeWeights.size()), 0);
60}
61
62//------------------------------------------------------------------------------
63int vtkDijkstraGraphGeodesicPath::RequestData(vtkInformation* vtkNotUsed(request),

Callers

nothing calls this directly

Calls 6

copyFunction · 0.50
InitializeMethod · 0.45
sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
SetArrayMethod · 0.45

Tested by

no test coverage detected