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

Method SetGraph

Common/DataModel/vtkVertexListIterator.cxx:33–51  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

31
32//------------------------------------------------------------------------------
33void vtkVertexListIterator::SetGraph(vtkGraph* graph)
34{
35 vtkSetObjectBodyMacro(Graph, vtkGraph, graph);
36 if (this->Graph)
37 {
38 this->Current = 0;
39 this->End = this->Graph->GetNumberOfVertices();
40
41 // For a distributed graph, shift the iteration space to cover
42 // local vertices
43 vtkDistributedGraphHelper* helper = this->Graph->GetDistributedGraphHelper();
44 if (helper)
45 {
46 int myRank = this->Graph->GetInformation()->Get(vtkDataObject::DATA_PIECE_NUMBER());
47 this->Current = helper->MakeDistributedId(myRank, this->Current);
48 this->End = helper->MakeDistributedId(myRank, this->End);
49 }
50 }
51}
52
53//------------------------------------------------------------------------------
54void vtkVertexListIterator::PrintSelf(ostream& os, vtkIndent indent)

Callers

nothing calls this directly

Calls 5

GetNumberOfVerticesMethod · 0.80
MakeDistributedIdMethod · 0.80
GetMethod · 0.45
GetInformationMethod · 0.45

Tested by

no test coverage detected