13#ifndef TTK_ENABLE_KAMIKAZE
32 std::vector<SimplexId> vertices_;
39 std::list<std::vector<SimplexId>> ®ularsList,
55 std::vector<Segment> segments_;
69 void resize(
const std::vector<SimplexId> &sizes);
78 inline std::string
print()
const {
79 std::stringstream res;
80 res <<
"{" << std::endl;
81 for(
const auto &s : segments_) {
83 res << s[0] <<
" " << s[s.size() - 1] <<
" : " << s.size()
87 res <<
"}" << std::endl;
97 std::list<Region> segmentsIn_;
99 std::vector<SimplexId> segmentation_;
101#ifndef TTK_ENABLE_KAMIKAZE
123 const std::vector<idCorresp> &vert2treeOther
124 = std::vector<idCorresp>())
const;
136 segmentation_.clear();
148 for(
const auto ® : segmentsIn_) {
149 res += std::abs(distance(reg.segmentBegin, reg.segmentEnd));
155 std::stringstream res;
157 for(
const auto ® : segmentsIn_) {
158 res <<
" " << *reg.segmentBegin;
159 res <<
"-" << *(reg.segmentEnd - 1);
182#ifndef TTK_ENABLE_KAMIKAZE
184 std::cerr <<
"Needs to create segmentation before size" << std::endl;
186 return segmentation_.size();
190#ifndef TTK_ENABLE_KAMIKAZE
193 <<
"Needs to create segmentation before getting segmentation"
196 return segmentation_[v];
200#ifndef TTK_ENABLE_KAMIKAZE
203 <<
"Needs to create segmentation before getting segmentation"
206 return segmentation_[v];
209 decltype(segmentation_)::iterator
begin() {
210 return segmentation_.begin();
213 decltype(segmentation_)::iterator
end() {
214 return segmentation_.end();
std::string print() const
bool merge(const ArcRegion &r)
decltype(segmentation_) ::iterator end()
SimplexId & operator[](SimplexId v)
std::tuple< SimplexId, ArcRegion > splitFront(SimplexId v, const Scalars *s)
SimplexId findBelow(SimplexId v, const Scalars *s, const std::vector< idCorresp > &vert2treeOther=std::vector< idCorresp >()) const
decltype(segmentsIn_) & getRegions()
void createSegmentation(const Scalars *s)
SimplexId operator[](SimplexId v) const
void concat(const segm_it &begin, const segm_it &end)
decltype(segmentation_) ::iterator begin()
std::tuple< SimplexId, ArcRegion > splitBack(SimplexId v, const Scalars *s)
const decltype(segmentsIn_) & getRegions() const
segm_const_it begin() const
SimplexId operator[](const size_t &idx) const
void createFromList(const Scalars *s, std::list< std::vector< SimplexId > > ®ularsList, const bool reverse)
segm_const_it end() const
void sort(const Scalars *s)
std::tuple< segm_it, segm_it > addLateSimpleSegment(SimplexId v)
std::string print() const
void sortAll(const Scalars *s)
Segment & operator[](const size_t &idx)
Segments(const Segment &)=delete
void resize(const std::vector< SimplexId > &sizes)
idSuperArc idSegment
for the segmentation, we have an array of segment containing area of the mesh
std::vector< SimplexId >::iterator segm_it
std::vector< SimplexId >::const_iterator segm_const_it
int SimplexId
Identifier type for simplices of any dimension.