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

Classes

class  Element
 

Public Member Functions

None __init__ (self, int size, float def_=0.0, std_greater_float pred='std::greater< float >{}')
 
None __init__ (self, std_vector_Heap_float_Id_GraphVertTag_std_greater_float_Element elms, std_greater_float pred='std::greater< float >{}')
 
None __init__ (self, Heap_float_GraphVertId_std_greater_float arg0)
 
None resize (self, int size, float def_=0.0)
 
None setLargerValue (self, GraphVertId elemId, float newVal)
 
None setSmallerValue (self, GraphVertId elemId, float newVal)
 
Heap_float_GraphVertId_std_greater_float.Element setTopValue (self, float newVal)
 
None setValue (self, GraphVertId elemId, float newVal)
 
int size (self)
 
Heap_float_GraphVertId_std_greater_float.Element top (self)
 
float value (self, GraphVertId elemId)
 

Detailed Description

Generated from:  MR::Heap<float, MR::GraphVertId, std::greater<float>>


 \\brief stores map from element id in[0, size) to T;
 \\details provides two operations:
 1) change the value of any element;
 2) find the element with the largest value

Constructor & Destructor Documentation

◆ __init__() [1/3]

None meshlib.mrmeshpy.Heap_float_GraphVertId_std_greater_float.__init__ ( self,
int size,
float def_ = 0.0,
std_greater_float pred = 'std::greater<float>{}' )
constructs heap for given number of elements, assigning given default value to each element

◆ __init__() [2/3]

None meshlib.mrmeshpy.Heap_float_GraphVertId_std_greater_float.__init__ ( self,
std_vector_Heap_float_Id_GraphVertTag_std_greater_float_Element elms,
std_greater_float pred = 'std::greater<float>{}' )
constructs heap from given elements (id's shall not repeat and have spaces, but can be arbitrary shuffled)

◆ __init__() [3/3]

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

Member Function Documentation

◆ resize()

None meshlib.mrmeshpy.Heap_float_GraphVertId_std_greater_float.resize ( self,
int size,
float def_ = 0.0 )
increases the size of the heap by adding elements at the end

◆ setLargerValue()

None meshlib.mrmeshpy.Heap_float_GraphVertId_std_greater_float.setLargerValue ( self,
GraphVertId elemId,
float newVal )
sets new value to given element, which shall be larger/smaller than the current value

◆ setSmallerValue()

None meshlib.mrmeshpy.Heap_float_GraphVertId_std_greater_float.setSmallerValue ( self,
GraphVertId elemId,
float newVal )

◆ setTopValue()

Heap_float_GraphVertId_std_greater_float.Element meshlib.mrmeshpy.Heap_float_GraphVertId_std_greater_float.setTopValue ( self,
float newVal )
sets new value to the current top element, returning its previous value

◆ setValue()

None meshlib.mrmeshpy.Heap_float_GraphVertId_std_greater_float.setValue ( self,
GraphVertId elemId,
float newVal )
sets new value to given element

◆ size()

int meshlib.mrmeshpy.Heap_float_GraphVertId_std_greater_float.size ( self)
returns the size of the heap

◆ top()

Heap_float_GraphVertId_std_greater_float.Element meshlib.mrmeshpy.Heap_float_GraphVertId_std_greater_float.top ( self)
returns the element with the largest value

◆ value()

float meshlib.mrmeshpy.Heap_float_GraphVertId_std_greater_float.value ( self,
GraphVertId elemId )
returns the value associated with given element

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