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

Method FindGreater

Common/DataModel/vtkReebGraph.cxx:839–873  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

837
838//------------------------------------------------------------------------------
839vtkIdType vtkReebGraph::Implementation::FindGreater(
840 vtkIdType nodeId, vtkIdType startingNodeId, vtkReebLabelTag label)
841{
842 if (!this->GetNode(nodeId)->IsFinalized)
843 return 0;
844
845 // base case
846 if (vtkReebGraphIsHigherThan(
847 this, nodeId, startingNodeId, this->GetNode(nodeId), this->GetNode(startingNodeId)))
848 return nodeId;
849
850 // iterative case
851 for (vtkIdType A = this->GetNode(nodeId)->ArcUpId; A; A = this->GetArc(A)->ArcDwId0)
852 {
853 vtkReebArc* a = this->GetArc(A);
854 vtkIdType M = this->GetArc(A)->NodeId1;
855 vtkReebNode* m = this->GetNode(M);
856
857 if (a->LabelId0 || !m->IsFinalized) // other labels or not final node
858 {
859 continue;
860 }
861
862 if ((M = FindGreater(M, startingNodeId, label)))
863 {
864 if (label)
865 {
866 SetLabel(A, label);
867 }
868 return M;
869 }
870 }
871
872 return 0;
873}
874
875//------------------------------------------------------------------------------
876vtkIdType vtkReebGraph::Implementation::FindLess(

Callers

nothing calls this directly

Calls 3

GetNodeMethod · 0.95
GetArcMethod · 0.95
SetLabelFunction · 0.50

Tested by

no test coverage detected