35 std::vector<SimplexId> lowerOverlap_;
36 std::vector<SimplexId> upperOverlap_;
56 return upperOverlap_.size();
60 return lowerOverlap_.size();
68 upperOverlap_.emplace_back(lb);
72 lowerOverlap_.emplace_back(lb);
76 upperOverlap_.reserve(u);
80 lowerOverlap_.reserve(l);
83 inline void appendUpper(
const std::vector<SimplexId> &vertices) {
85 upperOverlap_.end(), vertices.cbegin(), vertices.cend());
88 inline void appendLower(
const std::vector<SimplexId> &vertices) {
90 lowerOverlap_.end(), vertices.cbegin(), vertices.cend());
93 inline void swapUpper(std::vector<SimplexId> &verts) {
94 upperOverlap_.swap(verts);
97 inline void swapLower(std::vector<SimplexId> &verts) {
98 lowerOverlap_.swap(verts);
114 std::vector<ContourForestsTree>
trees;
126 std::list<std::vector<std::pair<SimplexId, bool>>> storage_;
155 inline std::tuple<SimplexId, SimplexId>
167 return std::make_tuple(start,
end);
170 inline std::tuple<SimplexId, SimplexId>
183 return std::make_tuple(start,
end);
186 inline std::tuple<SimplexId, SimplexId>
198 return std::make_tuple(seed0, seed1);
201 inline std::tuple<std::vector<SimplexId>, std::vector<SimplexId>>
203 const std::vector<SimplexId> &lower
204 = (i == 0) ? std::vector<SimplexId>()
207 const std::vector<SimplexId> &upper
209 ? std::vector<SimplexId>()
212 return std::make_tuple(lower, upper);
223 template <
typename triangulationType>
232 template <
typename scalarType,
typename triangulationType>
233 int build(
const triangulationType &mesh);
235 template <
typename scalarType,
typename triangulationType>
237 parallelBuild(std::vector<std::vector<ExtendedUnionFind *>> &baseUF_JT,
238 std::vector<std::vector<ExtendedUnionFind *>> &baseUF_ST,
239 const triangulationType &mesh);
Legacy backward compatibility.
static int getNumberOfCores()
void setPartitionNum(int p)
~ContourForests() override
std::tuple< SimplexId, SimplexId > getSTRange(const idPartition &i) const
int parallelBuild(std::vector< std::vector< ExtendedUnionFind * > > &baseUF_JT, std::vector< std::vector< ExtendedUnionFind * > > &baseUF_ST, const triangulationType &mesh)
int build(const triangulationType &mesh)
void setLessPartition(bool l)
int setThreadNumber(const int nbThread) override
void stitchTree(const char tree)
idPartition vertex2partition(const SimplexId &v)
void initOverlap(const triangulationType &mesh)
std::tuple< SimplexId, SimplexId > getJTRange(const idPartition &i) const
void printDebug(DebugTimer &timer, const std::string &str)
void unifyTree(const char treetype)
std::tuple< SimplexId, SimplexId > getSeedsPos(const idPartition &i) const
std::tuple< std::vector< SimplexId >, std::vector< SimplexId > > getOverlaps(const idPartition &i)
void upReserve(const SimplexId &u)
void swapLower(std::vector< SimplexId > &verts)
void addLower(const SimplexId &lb)
void setSeed(const SimplexId &local_seed)
void addUpper(const SimplexId &lb)
const SimplexId & getSeed() const
SimplexId getNbLower() const
void swapUpper(std::vector< SimplexId > &verts)
void loReserve(const SimplexId &l)
std::vector< SimplexId > & getUpper()
SimplexId getNbUpper() const
std::vector< SimplexId > & getLower()
void appendLower(const std::vector< SimplexId > &vertices)
void appendUpper(const std::vector< SimplexId > &vertices)
std::shared_ptr< Scalars > scalars_
numThread idInterface
index of the interface/partition in vect_interfaces_
ThreadId numThread
type use to store threads related numbers
int SimplexId
Identifier type for simplices of any dimension.
T end(std::pair< T, T > &p)
std::vector< Interface > interfaces
std::vector< ContourForestsTree > trees