23#include <boost/heap/fibonacci_heap.hpp>
27#include <unordered_map>
43 boost::heap::fibonacci_heap<idVertex, boost::heap::compare<VertCompFN>>
51 : curVert_{nullVertex}, nbArcs_{1}, comp_{vertComp}, goUp_{up},
52 propagation_{vertComp}, id_{this} {
53 propagation_.emplace(startVert);
91 curVert_ = propagation_.top();
97#ifndef TTK_ENABLE_KAMIKAZE
98 if(propagation_.empty()) {
99 std::cerr <<
"[FTR]: Propagation get next on empty structure"
104 return propagation_.top();
108 while(!propagation_.empty() && propagation_.top() == d) {
114 while(!propagation_.empty() && comp(propagation_.top(), d)) {
120 propagation_.emplace(v);
126 propagation_.merge(other.propagation_);
128 nbArcs_ += other.nbArcs_;
136 return propagation_.empty();
140 propagation_.clear();
163 return std::find(propagation_.begin(), propagation_.end(), v)
164 != propagation_.end();
168 return propagation_.size();
172 std::stringstream res;
173 res <<
" localProp " << curVert_ <<
" : ";
176 boost::heap::fibonacci_heap<idVertex, boost::heap::compare<VertCompFN>>
178 while(!tmp.empty()) {
179 res << tmp.top() <<
" ";
Union find compliant with parallel find and maintaining the current local propagation inspired by ttk...
void setPropagation(Propagation *const p)
static AtomicUF * makeUnion(AtomicUF *uf0, AtomicUF *uf1)
TTK fTRGraph propagation management with Fibonacci heaps.
idVertex getNextVertex() const
void setCurvert(const idVertex v)
Propagation(const Propagation &other)=delete
idSuperArc getNbArcs() const
void moreArc(const idSuperArc a=1)
void removeBelow(const idVertex d, const VertCompFN &comp)
idVertex getCurVertex() const
void addNewVertex(const idVertex v)
bool compare(const idVertex a, const idVertex b) const
void removeDuplicates(const idVertex d)
std::string print() const
Propagation(idVertex startVert, const VertCompFN &vertComp, bool up)
bool find(idVertex v) const
void lessArc(const idSuperArc a=1)
void merge(Propagation &other)
std::function< bool(const idVertex, const idVertex)> VertCompFN
long unsigned int idSuperArc
SuperArc index in vect_superArcs_.
SimplexId idVertex
Vertex index in scalars_.