34 idNode downNodeId_, upNodeId_;
40 bool overlapBelow_, overlapAbove_;
54 std::vector<std::pair<SimplexId, bool>> vertices_;
72 std::pair<SimplexId, bool> *vertList_;
75#ifndef TTK_ENABLE_KAMIKAZE
88 const unsigned char &ctd = 0,
89 const unsigned char &ctu = 0,
90 const size_t &resv = 0ul,
92 : downNodeId_(d), upNodeId_(u), downCT_(ctd), upCT_(ctu),
93 overlapBelow_(overB), overlapAbove_(overA), lastVisited_(nullVertex),
94 state_(state), replacantId_(nullSuperArc), vertList_(nullptr),
96 vertices_.reserve(resv);
121 downNodeId_ = downId;
146 return overlapAbove_;
150 return overlapBelow_;
154 return overlapBelow_ || overlapAbove_;
158 overlapAbove_ = local_overlapAbove;
162 overlapBelow_ = local_overlapBelow;
174 lastVisited_ = vertId;
175 vertices_.emplace_back(vertId,
false);
195 return downCT_ != upCT_;
207 replacantCT_ = (ct == 255) ? upCT_ : ct;
237 return vertList_[v].second;
243 return vertices_.size();
254 if(sizeVertList_ == -1) {
255 vertList_ = vertices_.data();
256 sizeVertList_ = vertices_.size();
262 if(sizeVertList_ == -1) {
263 vertList_ = vertices_.data();
264 sizeVertList_ = vertices_.size();
266 return sizeVertList_;
270 vertList_[v].second =
true;
285 const std::list<std::pair<SimplexId, bool> *> &vertLists,
286 std::list<SimplexId> vertSizes,
287 std::list<std::vector<std::pair<SimplexId, bool>>> &storage,
295 newSize += totalSize;
298 std::pair<SimplexId, bool> *tmpVert{};
299#ifdef TTK_ENABLE_OPENMP
303 storage.emplace_back(newSize);
304 tmpVert = storage.back().data();
309 for(
SimplexId i = 0; i < sizeVertList_; ++i) {
310 tmpVert[pos++] = vertList_[i];
314 for(std::pair<SimplexId, bool> *vertices : vertLists) {
315 const SimplexId size = vertSizes.front();
316 vertSizes.pop_front();
318 tmpVert[pos++] = vertices[i];
324 sizeVertList_ = newSize;
332#ifndef TTK_ENABLE_KAMIKAZE
335 if(sizeVertList_ + size >= allocSgm_) {
336 std::cerr <<
"SEGMENTATION SIZE PROBLEM :" << std::endl;
337 std::cerr <<
"alloc : " << allocSgm_ << std::endl;
338 std::cerr <<
"size : " << sizeVertList_ << std::endl;
339 std::cerr <<
"add : " << size << std::endl;
347 vertList_[sizeVertList_++] = arr[v];
356 const std::vector<std::pair<SimplexId, bool>> &other) {
357 vertices_.insert(vertices_.end(), other.begin(), other.end());
363 std::vector<std::pair<SimplexId, bool>>::iterator b) {
365 vertices_.end(), make_move_iterator(a), make_move_iterator(b));
370 vertList_[sizeVertList_++] = std::make_pair(v,
false);
395 std::list<std::vector<std::pair<SimplexId, bool>>> &storage) {
396#ifdef TTK_ENABLE_OPENMP
400 storage.emplace_back(size);
401 vertList_ = storage.back().data();
404#ifndef TTK_ENABLE_KAMIKAZE
411 if(sizeVertList_ != -1) {
413 vertices_.reserve(sizeVertList_ + 1);
idPartition getDownCT() const
bool isMasqued(const SimplexId &v) const
const idNode & getUpNodeId() const
SimplexId getSegmentationSize() const
void setOverlapBelow(const bool local_overlapBelow)
void setUpCT(decltype(upCT_) &ct)
const SimplexId & getVertSize()
SimplexId getNumberOfRegularNodes()
const SimplexId & getRegularNodeId(const SimplexId &idx)
void setVertices(std::vector< std::pair< SimplexId, bool > >::iterator &a, std::vector< std::pair< SimplexId, bool > >::iterator b)
int addSegmentationGlobal(const std::pair< SimplexId, bool > *arr, const SimplexId &size)
void appendSegmentation(const std::vector< std::pair< SimplexId, bool > > &other)
void setOverlapAbove(const bool local_overlapAbove)
void setLastVisited(const SimplexId &vertId)
idPartition getReplacantCT() const
std::vector< std::pair< SimplexId, bool > > & getSegmentation()
void setMasqued(const SimplexId &v)
void setDownNodeId(const idNode &downId)
std::pair< SimplexId, bool > * getVertList()
const SimplexId & getLastVisited() const
void merge(const idSuperArc &arc, const idPartition ct=255)
bool getOverlapBelow() const
void addFuturReserve(const SimplexId &nb)
void makeAllocGlobal(const SimplexId &size, std::list< std::vector< std::pair< SimplexId, bool > > > &storage)
void setVertList(std::pair< SimplexId, bool > *vl)
void appendVertLists(const std::list< std::pair< SimplexId, bool > * > &vertLists, std::list< SimplexId > vertSizes, std::list< std::vector< std::pair< SimplexId, bool > > > &storage, const SimplexId &totalSize)
void addSegmentationGlobal(const SimplexId &v)
void setVertSize(const SimplexId &s)
const idSuperArc & getReplacantArcId() const
const idNode & getDownNodeId() const
void setUpNodeId(const idNode &upId)
idPartition getUpCT() const
bool getOverlapAbove() const
SuperArc(const idNode &d, const idNode &u, const bool overB, const bool overA, const unsigned char &ctd=0, const unsigned char &ctu=0, const size_t &resv=0ul, const ComponentState &state=ComponentState::Visible)
long unsigned int idSuperArc
SuperArc index in vect_superArcs_.
unsigned int idNode
Node index in vect_nodes_.
int SimplexId
Identifier type for simplices of any dimension.