MeshLib Python Docs
Loading...
Searching...
No Matches
mrmeshpy.UnionFind_UndirectedEdgeId Class Reference

Public Member Functions

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

Static Protected Member Functions

 _pybind11_conduit_v1_ (*args, **kwargs)
 

Detailed Description

Generated from:  MR::UnionFind<MR::UndirectedEdgeId>


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

Constructor & Destructor Documentation

◆ __init__() [1/3]

None mrmeshpy.UnionFind_UndirectedEdgeId.__init__ ( self)

◆ __init__() [2/3]

None mrmeshpy.UnionFind_UndirectedEdgeId.__init__ ( self,
int size )

◆ __init__() [3/3]

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

Member Function Documentation

◆ _pybind11_conduit_v1_()

mrmeshpy.UnionFind_UndirectedEdgeId._pybind11_conduit_v1_ ( * args,
** kwargs )
staticprotected

◆ find()

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

◆ findUpdateRange()

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

◆ parents()

UndirectedEdgeMap mrmeshpy.UnionFind_UndirectedEdgeId.parents ( self)
gets the parents of all elements as in

◆ reset()

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

◆ roots()

UndirectedEdgeMap mrmeshpy.UnionFind_UndirectedEdgeId.roots ( self)
sets the root as the parent of each element, then returns the vector

◆ size()

int mrmeshpy.UnionFind_UndirectedEdgeId.size ( self)

◆ sizeOfComp()

int mrmeshpy.UnionFind_UndirectedEdgeId.sizeOfComp ( self,
UndirectedEdgeId a )
returns the size of component containing given element

◆ unite()

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

◆ united()

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

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