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

Method FindLess

Common/DataModel/vtkReebGraph.cxx:876–908  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

874
875//------------------------------------------------------------------------------
876vtkIdType vtkReebGraph::Implementation::FindLess(
877 vtkIdType nodeId, vtkIdType startingNodeId, vtkReebLabelTag label)
878{
879 if (!this->GetNode(nodeId)->IsFinalized)
880 return 0;
881
882 // base case
883 if (vtkReebGraphIsSmaller(
884 this, nodeId, startingNodeId, this->GetNode(nodeId), this->GetNode(startingNodeId)))
885 return nodeId;
886
887 // iterative case
888 for (vtkIdType A = this->GetNode(nodeId)->ArcDownId; A; A = this->GetArc(A)->ArcDwId1)
889 {
890 vtkReebArc* a = this->GetArc(A);
891 vtkIdType M = this->GetArc(A)->NodeId0;
892 vtkReebNode* m = this->GetNode(M);
893
894 if (a->LabelId0 || !m->IsFinalized) // other labels or not final node
895 continue;
896
897 if ((M = FindLess(M, startingNodeId, label)))
898 {
899 if (label)
900 {
901 SetLabel(A, label);
902 }
903 return M;
904 }
905 }
906
907 return 0;
908}
909
910//------------------------------------------------------------------------------
911vtkIdType vtkReebGraph::Implementation::FindJoinNode(

Callers

nothing calls this directly

Calls 3

GetNodeMethod · 0.95
GetArcMethod · 0.95
SetLabelFunction · 0.50

Tested by

no test coverage detected