33 std::vector<idSuperArc> vect_downSuperArcList_, vect_upSuperArcList_;
41 Node() : vertexId_(nullVertex), linkedNode_(nullNodes) {
45 : vertexId_(id), linkedNode_(linked) {
83 return vect_downSuperArcList_.size();
87 return vect_upSuperArcList_.size();
91 return vect_upSuperArcList_.size() + vect_downSuperArcList_.size();
95#ifndef TTK_ENABLE_KAMIKAZE
96 if(neighborId >= vect_downSuperArcList_.size()) {
97 std::cerr <<
"[Merge Tree:Node] get down on bad neighbor !";
98 std::cerr << std::endl;
102 return vect_downSuperArcList_[neighborId];
106#ifndef TTK_ENABLE_KAMIKAZE
107 if(neighborId >= vect_upSuperArcList_.size()) {
108 std::cerr <<
"[FTMTree_MT:Node] No SuperArc to access "
109 <<
static_cast<unsigned>(neighborId);
110 std::cerr << std::endl;
113 if(vect_upSuperArcList_.size() == 0) {
116 return vect_upSuperArcList_[neighborId];
120 vect_downSuperArcList_.emplace_back(downSuperArcId);
124 vect_upSuperArcList_.emplace_back(upSuperArcId);
128 idSuperArc const s = vect_downSuperArcList_.size();
129 vect_downSuperArcList_.clear();
134 idSuperArc const s = vect_upSuperArcList_.size();
135 vect_upSuperArcList_.clear();
141 vect_downSuperArcList_[i] = vect_downSuperArcList_.back();
142 vect_downSuperArcList_.pop_back();
147 for(
idSuperArc i = 0; i < vect_downSuperArcList_.size(); ++i) {
148 if(vect_downSuperArcList_[i] == idSa) {
149 vect_downSuperArcList_[i] = vect_downSuperArcList_.back();
150 vect_downSuperArcList_.pop_back();
159 for(
idSuperArc i = 0; i < vect_upSuperArcList_.size(); ++i) {
160 if(vect_upSuperArcList_[i] == idSa) {
161 vect_upSuperArcList_[i] = vect_upSuperArcList_.back();
162 vect_upSuperArcList_.pop_back();
171 sort(vect_upSuperArcList_.begin(), vect_upSuperArcList_.end(), comp);
177 vect_downSuperArcList_.begin(), vect_downSuperArcList_.end(), comp);
void removeDownSuperArcPos(idSuperArc i)
void sortDownArcs(const std::function< bool(const idSuperArc, const idSuperArc)> &comp)
idSuperArc getUpSuperArcId(idSuperArc neighborId) const
idSuperArc clearUpSuperArcs()
idSuperArc getNumberOfSuperArcs() const
void addDownSuperArcId(idSuperArc downSuperArcId)
SimplexId getTermination() const
Node(SimplexId id, SimplexId linked)
idSuperArc getNumberOfDownSuperArcs() const
idSuperArc getDownSuperArcId(idSuperArc neighborId) const
void removeUpSuperArc(idSuperArc idSa)
idSuperArc clearDownSuperArcs()
void setOrigin(SimplexId linked)
void removeDownSuperArc(idSuperArc idSa)
void addUpSuperArcId(idSuperArc upSuperArcId)
SimplexId getVertexId() const
void setVertexId(SimplexId vertexId)
void setTermination(SimplexId linked)
void sortUpArcs(const std::function< bool(const idSuperArc, const idSuperArc)> &comp)
SimplexId getOrigin() const
idSuperArc getNumberOfUpSuperArcs() const
long unsigned int idSuperArc
SuperArc index in vect_superArcs_.
int SimplexId
Identifier type for simplices of any dimension.