TTK
Loading...
Searching...
No Matches
DeprecatedSegmentation.h
Go to the documentation of this file.
1
2//
16
17#pragma once
18
19#include <forward_list>
20#include <vector>
21
22#include "DeprecatedDataTypes.h"
24
25namespace ttk {
26 namespace cf {
27
28 // one segment: like a std::vector<vertex>
29 class Segment {
30 public:
31 Segment(const bool order = true);
32
33 bool isAscending() const;
34
35 void sort(const Scalars *s);
36
37 // std::vector like
38 void emplace_back(const SimplexId &v);
39 void clear();
41
42 SimplexId &operator[](size_t idx);
43 const SimplexId &operator[](size_t idx) const;
44
45 // custom iterator to cross the segment in sorted order
48
49 private:
50 std::vector<vertex> vertices_;
51 bool ascendingOrder_;
52 };
53
54 // All the segments of the mesh, like a std::vector<Segment>
55 class Segments {
56 public:
57 idSegment size() const;
58 void clear();
59 Segment &operator[](size_t idx);
60 const Segment &operator[](size_t idx) const;
61
62 private:
63 std::vector<Segment> segments_;
64 };
65
66 // The segmentation of one arc is a list of segment
67 class ArcRegion {
68 public:
69 // create a new arc region with the associated Segment in Segments
70 ArcRegion(const segmentIterator &s);
71
72 // During combinations: concat some segmentations
74
75 // Put all segments in one std::vector in the arc
76 void createSegmentation(const idSuperArc &thisArc);
77
78 private:
79 // list of segment composing this segmentation and for each segment
80 // the begin and the end inside it (as a segment may be subdivided)
81 std::forward_list<Region> segmentsIn_;
82 // when and how to compact ?
83 std::vector<vertex> segmentation_; // SimplexId only ?
84 };
85 } // namespace cf
86} // namespace ttk
void addSegment(const segmentIterator &begin, const segmentIterator &end)
void createSegmentation(const idSuperArc &thisArc)
void sort(const Scalars *s)
void norm_next(segmentIterator &it)
SimplexId & operator[](size_t idx)
void emplace_back(const SimplexId &v)
Segment & operator[](size_t idx)
idSuperArc idSegment
for the segmentation, we have an array of segment containing area of the mesh
std::vector< vertex >::iterator segmentIterator
long unsigned int idSuperArc
SuperArc index in vect_superArcs_.
The Topology ToolKit.
int SimplexId
Identifier type for simplices of any dimension.
Definition DataTypes.h:22
T end(std::pair< T, T > &p)
Definition ripserpy.cpp:472
T begin(std::pair< T, T > &p)
Definition ripserpy.cpp:468