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

Method GetTargetVertex

Common/DataModel/vtkGraph.cxx:788–818  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

786
787//------------------------------------------------------------------------------
788vtkIdType vtkGraph::GetTargetVertex(vtkIdType e)
789{
790 if (vtkDistributedGraphHelper* helper = this->GetDistributedGraphHelper())
791 {
792 int myRank = this->Information->Get(vtkDataObject::DATA_PIECE_NUMBER());
793 if (myRank != helper->GetEdgeOwner(e))
794 {
795 if (e != this->Internals->LastRemoteEdgeId)
796 {
797 this->Internals->LastRemoteEdgeId = e;
798 helper->FindEdgeSourceAndTarget(
799 e, &this->Internals->LastRemoteEdgeSource, &this->Internals->LastRemoteEdgeTarget);
800 }
801
802 return this->Internals->LastRemoteEdgeTarget;
803 }
804
805 e = helper->GetEdgeIndex(e);
806 }
807
808 if (e < 0 || e >= this->GetNumberOfEdges())
809 {
810 vtkErrorMacro("Edge index out of range.");
811 return -1;
812 }
813 if (!this->EdgeList)
814 {
815 this->BuildEdgeList();
816 }
817 return this->EdgeList->GetValue(2 * e + 1);
818}
819
820//------------------------------------------------------------------------------
821void vtkGraph::BuildEdgeList()

Callers 15

RemoveEdgeInternalMethod · 0.95
ToDirectedGraphMethod · 0.95
ToUndirectedGraphMethod · 0.95
WriteEdgesMethod · 0.80
WriteDataMethod · 0.80
testMethod · 0.80
EdgePositionMethod · 0.80
ComputeMultipliersMethod · 0.80
ComputeBoundsMethod · 0.80
PaintBuffersMethod · 0.80
TestGraphIteratorsFunction · 0.80

Calls 7

GetNumberOfEdgesMethod · 0.95
BuildEdgeListMethod · 0.95
GetEdgeOwnerMethod · 0.80
GetEdgeIndexMethod · 0.80
GetMethod · 0.45
GetValueMethod · 0.45

Tested by 4

testMethod · 0.64
TestGraphIteratorsFunction · 0.64
TestGraphDeletionFunction · 0.64