MeshLib Python Docs
Loading...
Searching...
No Matches
meshlib.mrmeshpy.UnionFind_FaceId Class Reference

Public Member Functions

None __init__ (self)
 
None __init__ (self, int size)
 
None __init__ (self, UnionFind_FaceId arg0)
 
FaceId find (self, FaceId a)
 
FaceId findUpdateRange (self, FaceId a, FaceId begin, FaceId end)
 
FaceMap parents (self)
 
None reset (self, int size)
 
FaceMap roots (self)
 
int size (self)
 
int sizeOfComp (self, FaceId a)
 
tuple[FaceId, bool] unite (self, FaceId first, FaceId second)
 
bool united (self, FaceId first, FaceId second)
 

Detailed Description

Generated from:  MR::UnionFind<MR::FaceId>


\\brief Simple union find data structure
\\tparam I is an id type, e.g. FaceId
\\ingroup BasicGroup

Constructor & Destructor Documentation

◆ __init__() [1/3]

None meshlib.mrmeshpy.UnionFind_FaceId.__init__ ( self)

◆ __init__() [2/3]

None meshlib.mrmeshpy.UnionFind_FaceId.__init__ ( self,
int size )

◆ __init__() [3/3]

None meshlib.mrmeshpy.UnionFind_FaceId.__init__ ( self,
UnionFind_FaceId arg0 )
Implicit copy constructor.

Member Function Documentation

◆ find()

FaceId meshlib.mrmeshpy.UnionFind_FaceId.find ( self,
FaceId a )
finds the root of the set containing given element with optimizing data structure updates

◆ findUpdateRange()

FaceId meshlib.mrmeshpy.UnionFind_FaceId.findUpdateRange ( self,
FaceId a,
FaceId begin,
FaceId end )
finds the root of the set containing given element with optimizing data structure in the range [begin, end)

◆ parents()

FaceMap meshlib.mrmeshpy.UnionFind_FaceId.parents ( self)
gets the parents of all elements as in

◆ reset()

None meshlib.mrmeshpy.UnionFind_FaceId.reset ( self,
int size )
reset roots to represent each element as disjoint set of rank 0

◆ roots()

FaceMap meshlib.mrmeshpy.UnionFind_FaceId.roots ( self)
sets the root as the parent of each element, then returns the vector

◆ size()

int meshlib.mrmeshpy.UnionFind_FaceId.size ( self)

◆ sizeOfComp()

int meshlib.mrmeshpy.UnionFind_FaceId.sizeOfComp ( self,
FaceId a )
returns the size of component containing given element

◆ unite()

tuple[FaceId, bool] meshlib.mrmeshpy.UnionFind_FaceId.unite ( self,
FaceId first,
FaceId second )
unite two elements,
\\return first: new common root, second: true = union was done, false = first and second were already united

◆ united()

bool meshlib.mrmeshpy.UnionFind_FaceId.united ( self,
FaceId first,
FaceId second )
returns true if given two elements are from one component

The documentation for this class was generated from the following file: