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

Method GetInducedEdges

Common/DataModel/vtkGraph.cxx:1123–1141  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1121
1122//------------------------------------------------------------------------------
1123void vtkGraph::GetInducedEdges(vtkIdTypeArray* verts, vtkIdTypeArray* edges)
1124{
1125 edges->Initialize();
1126 if (this->GetDistributedGraphHelper())
1127 {
1128 vtkErrorMacro("Cannot get induced edges on a distributed graph.");
1129 return;
1130 }
1131 vtkSmartPointer<vtkEdgeListIterator> edgeIter = vtkSmartPointer<vtkEdgeListIterator>::New();
1132 this->GetEdges(edgeIter);
1133 while (edgeIter->HasNext())
1134 {
1135 vtkEdgeType e = edgeIter->Next();
1136 if (verts->LookupValue(e.Source) >= 0 && verts->LookupValue(e.Target) >= 0)
1137 {
1138 edges->InsertNextValue(e.Id);
1139 }
1140 }
1141}
1142
1143//------------------------------------------------------------------------------
1144void vtkGraph::AddVertexInternal(vtkVariantArray* propertyArr, vtkIdType* vertex)

Callers 1

ConvertSelectionMethod · 0.80

Calls 8

GetEdgesMethod · 0.95
NewFunction · 0.50
InitializeMethod · 0.45
HasNextMethod · 0.45
NextMethod · 0.45
LookupValueMethod · 0.45
InsertNextValueMethod · 0.45

Tested by

no test coverage detected