Loading...
Searching...
No Matches
meshkit::CoarseningQueue Class Reference

Indexed binary min-heap holding at most one entry per vertex for resolution-aware coarsening. More...

#include <meshkit/coarseningqueue.hpp>

Collaboration diagram for meshkit::CoarseningQueue:

Classes

struct  Entry
 One vertex's removal priority. More...
 

Public Member Functions

 CoarseningQueue (std::size_t vertices, std::size_t maximumEntries=0)
 Create an empty queue for vertex ids in [0, vertices).
 
bool empty () const
 True when no entry is queued.
 
std::size_t size () const
 Number of queued entries (at most one per vertex).
 
std::size_t capacityBytes () const
 Bytes of allocated heap and index storage (capacity, not size).
 
void update (Entry entry)
 Insert the vertex's entry, or replace its existing entry, and restore heap order.
 
Entry pop ()
 Remove and return the first entry in queue order.
 

Detailed Description

Indexed binary min-heap holding at most one entry per vertex for resolution-aware coarsening.

Entries are ordered by tile, then importance, then density, then vertex id, all ascending.

Constructor & Destructor Documentation

◆ CoarseningQueue()

meshkit::CoarseningQueue::CoarseningQueue ( std::size_t vertices,
std::size_t maximumEntries = 0 )
inlineexplicit

Create an empty queue for vertex ids in [0, vertices).

Parameters
[in]verticesSize of the vertex-to-slot index (one int per vertex).
[in]maximumEntriesHeap capacity to reserve, capped at vertices; 0 reserves none.

Member Function Documentation

◆ capacityBytes()

std::size_t meshkit::CoarseningQueue::capacityBytes ( ) const
inline

Bytes of allocated heap and index storage (capacity, not size).

◆ empty()

bool meshkit::CoarseningQueue::empty ( ) const
inline

True when no entry is queued.

Here is the caller graph for this function:

◆ pop()

Entry meshkit::CoarseningQueue::pop ( )
inline

Remove and return the first entry in queue order.

Returns
The removed entry; the queue must not be empty (unchecked).
Here is the caller graph for this function:

◆ size()

std::size_t meshkit::CoarseningQueue::size ( ) const
inline

Number of queued entries (at most one per vertex).

Here is the caller graph for this function:

◆ update()

void meshkit::CoarseningQueue::update ( Entry entry)
inline

Insert the vertex's entry, or replace its existing entry, and restore heap order.

Parameters
[in]entryNew priority; entry.vertex must lie in [0, vertices) (unchecked).
Here is the caller graph for this function:

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