39 std::vector<idSuperArc> vect_downSuperArcList_, vect_upSuperArcList_;
43 std::tuple<idSuperArc, idSuperArc> valence_;
52 : vertexId_(id), linkedNode_(linked), hidden_(false), valence_(0, 0) {
97 return vect_downSuperArcList_.size();
101 return vect_upSuperArcList_.size();
105 return vect_upSuperArcList_.size() + vect_downSuperArcList_.size();
109#ifndef TTK_ENABLE_KAMIKAZE
110 if(neighborId >= vect_downSuperArcList_.size()) {
111 std::cerr <<
"[Merge Tree:Node] get down on bad neighbor !";
112 std::cerr << std::endl;
116 return vect_downSuperArcList_[neighborId];
120#ifndef TTK_ENABLE_KAMIKAZE
121 if(neighborId >= vect_upSuperArcList_.size()) {
122 std::cerr <<
"[MergeTree:Node] No SuperArc to access "
123 <<
static_cast<unsigned>(neighborId);
124 std::cerr << std::endl;
127 if(vect_upSuperArcList_.size() == 0) {
130 return vect_upSuperArcList_[neighborId];
134 vect_downSuperArcList_.emplace_back(downSuperArcId);
138 vect_upSuperArcList_.emplace_back(upSuperArcId);
142 const idSuperArc s = vect_downSuperArcList_.size();
143 vect_downSuperArcList_.clear();
148 const idSuperArc s = vect_upSuperArcList_.size();
149 vect_upSuperArcList_.clear();
155 vect_downSuperArcList_[i] = vect_downSuperArcList_.back();
156 vect_downSuperArcList_.pop_back();
163 for(
idSuperArc i = 0; i < vect_downSuperArcList_.size(); ++i) {
164 if(vect_downSuperArcList_[i] == idSa) {
165 vect_downSuperArcList_[i] = vect_downSuperArcList_.back();
166 vect_downSuperArcList_.pop_back();
176 for(
idSuperArc i = vect_downSuperArcList_.size() - 1;; --i) {
177 if(vect_downSuperArcList_[i] == idSa) {
178 vect_downSuperArcList_[i] = vect_downSuperArcList_.back();
179 vect_downSuperArcList_.pop_back();
192 for(
idSuperArc i = 0; i < vect_upSuperArcList_.size(); ++i) {
193 if(vect_upSuperArcList_[i] == idSa) {
194 vect_upSuperArcList_[i] = vect_upSuperArcList_.back();
195 vect_upSuperArcList_.pop_back();
205 for(
idSuperArc i = vect_upSuperArcList_.size();; --i) {
206 if(vect_upSuperArcList_[i] == idSa) {
207 vect_upSuperArcList_[i] = vect_upSuperArcList_.back();
208 vect_upSuperArcList_.pop_back();
236 hidden_ = local_hidden;
244 return std::get<1>(valence_);
248 return std::get<0>(valence_);
252 return std::get<0>(valence_) + std::get<1>(valence_);
256 std::get<1>(valence_) = v;
260 std::get<0>(valence_) = v;
264 ++std::get<1>(valence_);
268 ++std::get<0>(valence_);
272 --std::get<1>(valence_);
276 --std::get<0>(valence_);
SimplexId getVertexId() const
idSuperArc clearUpSuperArcs()
idSuperArc getNumberOfSuperArcs() const
const SimplexId & getOrigin() const
idSuperArc clearDownSuperArcs()
void removeDownSuperArcFromLast(const idSuperArc &idSa)
const SimplexId & getTermination() const
void removeDownSuperArc(const idSuperArc &idSa)
void addUpSuperArcId(const idSuperArc &upSuperArcId)
void addDownSuperArcId(const idSuperArc &downSuperArcId)
idSuperArc getDownSuperArcId(const idSuperArc &neighborId) const
void setVertexId(const SimplexId &vertexId)
Node(const SimplexId &id, const SimplexId &linked)
idSuperArc getDownValence() const
idSuperArc getNumberOfUpSuperArcs() const
void setTermination(const SimplexId &linked)
void removeUpSuperArcFromLast(const idSuperArc &idSa)
void setOrigin(const SimplexId &linked)
void setUpValence(const idSuperArc &v)
void removeUpSuperArc(const idSuperArc &idSa)
idSuperArc getUpSuperArcId(const idSuperArc &neighborId) const
void setDownValence(const idSuperArc &v)
void removeDownSuperArcPos(const idSuperArc &i)
idSuperArc getUpValence() const
idSuperArc getNumberOfDownSuperArcs() const
idSuperArc getValence() const
void setHidden(const bool local_hidden)
long unsigned int idSuperArc
SuperArc index in vect_superArcs_.
int SimplexId
Identifier type for simplices of any dimension.