5 const std::vector<std::pair<polarity, polarity>> &vlp,
7 std::vector<polarity> &toPropagateMin,
8 std::vector<polarity> &toPropagateMax,
9 std::vector<std::vector<SimplexId>> &saddleCCMin,
10 std::vector<std::vector<SimplexId>> &saddleCCMax)
const {
12 const auto nbCC = link.
getNbCC();
15 saddleCCMin[vertexId].clear();
16 saddleCCMax[vertexId].clear();
19 std::vector<size_t> CCIds;
22 for(
size_t i = 0; i < CCIds.size(); i++) {
24 const polarity isUpper = vlp[neighbor].first;
26 saddleCCMax[vertexId].emplace_back(neighbor);
29 saddleCCMin[vertexId].emplace_back(neighbor);
35 toPropagateMin[vertexId] = 255;
37 saddleCCMin[vertexId].clear();
38 toPropagateMin[vertexId] = 0;
41 toPropagateMax[vertexId] = 255;
43 saddleCCMax[vertexId].clear();
44 toPropagateMax[vertexId] = 0;
48 toPropagateMax[vertexId] = 0;
49 toPropagateMin[vertexId] = 0;
56 const auto bid = multiresTriangulation_.getVertexBoundaryIndex(vertexId);
57 const auto nneigh = multiresTriangulation_.getVertexNeighborNumber(vertexId);
58 vlbt[bid].reserve(nneigh);
62 multiresTriangulation_.getVertexNeighbor(vertexId, i, n0);
63 for(
SimplexId j = i + 1; j < nneigh; j++) {
65 multiresTriangulation_.getVertexNeighbor(vertexId, j, n1);
66 if(multiresTriangulation_.areVerticesNeighbors(n0, n1)) {
67 vlbt[bid].emplace_back(i, j);
75 std::vector<triplet> &triplets,
76 const std::vector<std::vector<SimplexId>> &vertexReps)
const {
78 const auto &reps = vertexReps[vertexId];
80#ifndef TTK_ENABLE_KAMIKAZE
81 const auto &repsm = vertexReps[m];
82 if(m == -1 || repsm.empty() || repsm[0] != m) {
83 this->printErr(
"HERE PROBLEM");
86 for(
size_t i = 1; i < reps.size(); i++) {
88#ifndef TTK_ENABLE_KAMIKAZE
89 const auto &repsn = vertexReps[n];
90 if(n == -1 || repsn.empty() || repsn[0] != n) {
91 this->printErr(
"HERE2 PROBLEM");
94 triplets.emplace_back(vertexId, m, n);
99 const std::vector<std::pair<polarity, polarity>> &vlp,
102 const auto nbCC = link.
getNbCC();
104 int const dimensionality = multiresTriangulation_.getDimensionality();
105 SimplexId downValence = 0, upValence = 0;
107 std::vector<size_t> CCIds;
110 for(
size_t i = 0; i < CCIds.size(); i++) {
112 const polarity isUpper = vlp[neighbor].first;
120 if(downValence == -1 && upValence == -1) {
122 }
else if(downValence == 0 && upValence == 1) {
124 }
else if(downValence == 1 && upValence == 0) {
126 }
else if(downValence == 1 && upValence == 1) {
131 if(dimensionality == 2) {
132 if((downValence == 2 && upValence == 1)
133 || (downValence == 1 && upValence == 2)
134 || (downValence == 2 && upValence == 2)) {
145 }
else if(dimensionality == 3) {
146 if(downValence == 2 && upValence == 1) {
148 }
else if(downValence == 1 && upValence == 2) {
void getValencesFromLink(const SimplexId vertexId, const std::vector< std::pair< polarity, polarity > > &vlp, DynamicTree &link, std::vector< polarity > &toPropagateMin, std::vector< polarity > &toPropagateMax, std::vector< std::vector< SimplexId > > &saddleCCMin, std::vector< std::vector< SimplexId > > &saddleCCMax) const