18 void *
const quadCells) {
19 this->nCells_ = cellNumber;
20 this->cells_ =
static_cast<const Quad *
>(quadCells);
24 void *
const pointCoords) {
25 this->nVerts_ = pointNumber;
26 this->vertCoords_ =
static_cast<const Point *
>(pointCoords);
30 const size_t ordinary_valence{4};
31 return this->vertexNeighbors_[v].
size() != ordinary_valence;
36 const auto &c{this->vertCoords_[v]};
44 v = this->cells_[c][l];
48 return this->vertexNeighbors_[v].
size();
52 n = this->vertexNeighbors_[v][l];
56 return this->vertexStars_[v].
size();
59 return this->vertexStars_[v][l];
63 vs = this->vertexStars_[v][l];
67 return this->edgeStars_[e].
size();
70 return this->edgeStars_[e][l];
74 return this->quadEdges_[c][l];
78 return this->edges_[e];
94 return this->edges_.size();
99 float &deformity)
const {
100 auto minDist{std::numeric_limits<float>::max()};
101 auto maxDist{std::numeric_limits<float>::lowest()};
102 const auto &pi{this->vertCoords_[v]};
103 for(
const auto j : this->vertexNeighbors_[v]) {
104 const auto &pj{this->vertCoords_[j]};
106 minDist = std::min(minDist, dist);
107 maxDist = std::max(maxDist, dist);
109 density = std::exp(-minDist);
110 deformity = std::exp(-minDist / maxDist);
114 std::vector<float> &vertsDensity,
115 std::vector<float> &vertsDifformity,
116 std::vector<float> &quadArea,
117 std::vector<float> &quadDiagsRatio,
118 std::vector<float> &quadEdgesRatio,
119 std::vector<float> &quadAnglesRatio)
const;
124 using Quad = std::array<ttk::LongSimplexId, 4>;
133 const Point *vertCoords_{};
134 const Quad *cells_{};
137 FlatJaggedArray vertexNeighbors_{};
138 FlatJaggedArray vertexStars_{};
139 std::vector<std::array<SimplexId, 2>> edges_{};
140 FlatJaggedArray edgeStars_{};
141 std::vector<std::array<SimplexId, 4>> quadEdges_{};
142 std::vector<LongSimplexId> quadOffsets_{};
#define ttkNotUsed(x)
Mark function/method parameters that are not used in the function body at all.
CellArray generic array of cells
Minimalist debugging class.
SimplexId size(SimplexId id) const
Get the size of a particular sub-vector.
SimplexId getEdgeStar(const SimplexId e, const int l) const
~Quadrangulation() override=default
int isVertexExtraordinary(const SimplexId v)
void getVertexStar(const SimplexId v, const int l, SimplexId &vs) const
SimplexId getCellVertexNumber(const SimplexId ttkNotUsed(c)) const
SimplexId getVertexStar(const SimplexId v, const int l) const
const std::array< SimplexId, 2 > & getEdge(const SimplexId e) const
int preconditionVertexNeighbors()
void getVertexPoint(const SimplexId v, float &x, float &y, float &z) const
int preconditionVertexStars()
std::array< ttk::LongSimplexId, 4 > Quad
Ad-hoc quad data structure (4 vertex ids)
SimplexId getEdgeStarNumber(const SimplexId e) const
int getDimensionality() const
SimplexId getNumberOfEdges() const
const SimplexId & getNumberOfVertices() const
void computeDensityAndDeformity(const SimplexId v, float &density, float &deformity) const
void computeStatistics(std::vector< SimplexId > &vertsValence, std::vector< float > &vertsDensity, std::vector< float > &vertsDifformity, std::vector< float > &quadArea, std::vector< float > &quadDiagsRatio, std::vector< float > &quadEdgesRatio, std::vector< float > &quadAnglesRatio) const
SimplexId getVertexNeighborNumber(const SimplexId v) const
void getCellVertex(const SimplexId c, const int l, SimplexId &v) const
const SimplexId & getNumberOfCells() const
void setInputCells(const SimplexId cellNumber, void *const quadCells)
SimplexId getVertexStarNumber(const SimplexId v) const
void setInputPoints(const SimplexId pointNumber, void *const pointCoords)
SimplexId getCellEdge(const SimplexId c, const int l)
void getVertexNeighbor(const SimplexId v, const int l, SimplexId &n) const
T distance(const T *p0, const T *p1, const int &dimension=3)
int SimplexId
Identifier type for simplices of any dimension.