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

Method IncrementPointReferenceCount

Common/DataModel/vtkGenericEdgeTable.cxx:690–720  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

688
689//------------------------------------------------------------------------------
690void vtkGenericEdgeTable::IncrementPointReferenceCount(vtkIdType ptId)
691{
692 unsigned int index;
693 int found = 0;
694 vtkIdType pos = this->HashFunction(ptId);
695
696 // Need to check size first
697 assert(
698 "check: valid range pos" && static_cast<unsigned>(pos) < this->HashPoints->PointVector.size());
699
700 // Be careful with reference the equal is not overloaded
701 vtkEdgeTablePoints::VectorPointTableType& vect = this->HashPoints->PointVector[pos];
702
703 // vtkDebugMacro(<< "IncrementPointReferenceCount:" << ptId << ":" << vect.size() );
704
705 for (index = 0; index < vect.size(); index++)
706 {
707 PointEntry& ent = vect[index];
708 if (ent.PointId == ptId)
709 {
710 ent.Reference++;
711 found = 1;
712 }
713 }
714
715 if (!found)
716 {
717 // We did not find any corresponding entry, warn user
718 vtkErrorMacro(<< "No entry were found in the hash table");
719 }
720}
721
722//------------------------------------------------------------------------------
723void vtkGenericEdgeTable::LoadFactor()

Callers 1

Calls 3

HashFunctionMethod · 0.95
assertFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected