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

Method BuildEdgeList

Common/DataModel/vtkGraph.cxx:821–842  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

819
820//------------------------------------------------------------------------------
821void vtkGraph::BuildEdgeList()
822{
823 if (this->EdgeList)
824 {
825 this->EdgeList->SetNumberOfTuples(this->GetNumberOfEdges());
826 }
827 else
828 {
829 this->EdgeList = vtkIdTypeArray::New();
830 this->EdgeList->SetNumberOfComponents(2);
831 this->EdgeList->SetNumberOfTuples(this->GetNumberOfEdges());
832 }
833 vtkEdgeListIterator* it = vtkEdgeListIterator::New();
834 this->GetEdges(it);
835 while (it->HasNext())
836 {
837 vtkEdgeType e = it->Next();
838 this->EdgeList->SetValue(2 * e.Id, e.Source);
839 this->EdgeList->SetValue(2 * e.Id + 1, e.Target);
840 }
841 it->Delete();
842}
843
844//------------------------------------------------------------------------------
845void vtkGraph::SetEdgePoints(vtkIdType e, vtkIdType npts, const double pts[])

Callers 5

CopyInternalMethod · 0.95
GetSourceVertexMethod · 0.95
GetTargetVertexMethod · 0.95
RemoveVertexInternalMethod · 0.95
UpdateBondListMethod · 0.80

Calls 9

GetNumberOfEdgesMethod · 0.95
GetEdgesMethod · 0.95
DeleteMethod · 0.65
NewFunction · 0.50
SetNumberOfTuplesMethod · 0.45
SetNumberOfComponentsMethod · 0.45
HasNextMethod · 0.45
NextMethod · 0.45
SetValueMethod · 0.45

Tested by

no test coverage detected