60 std::vector<SimplexId> &vertsValence,
61 std::vector<float> &vertsDensity,
62 std::vector<float> &vertsDeformity,
63 std::vector<float> &quadArea,
64 std::vector<float> &quadDiagsRatio,
65 std::vector<float> &quadEdgesRatio,
66 std::vector<float> &quadAnglesRatio)
const {
70 vertsValence.resize(this->nVerts_);
71 vertsDensity.resize(this->nVerts_);
72 vertsDeformity.resize(this->nVerts_);
74#ifdef TTK_ENABLE_OPENMP
75#pragma omp parallel for num_threads(this->threadNumber_)
77 for(
SimplexId i = 0; i < this->nVerts_; ++i) {
81#ifdef TTK_ENABLE_OPENMP
82#pragma omp parallel for num_threads(this->threadNumber_)
84 for(
SimplexId i = 0; i < this->nVerts_; ++i) {
85 this->computeDensityAndDeformity(i, vertsDensity[i], vertsDeformity[i]);
88 quadArea.resize(this->nCells_);
89 quadDiagsRatio.resize(this->nCells_);
90 quadEdgesRatio.resize(this->nCells_);
91 quadAnglesRatio.resize(this->nCells_);
93#ifdef TTK_ENABLE_OPENMP
94#pragma omp parallel for num_threads(this->threadNumber_)
96 for(
SimplexId i = 0; i < this->nCells_; ++i) {
97 const auto &q = this->cells_[i];
98 const auto &pi = this->vertCoords_[q[0]];
99 const auto &pj = this->vertCoords_[q[1]];
100 const auto &pk = this->vertCoords_[q[2]];
101 const auto &pl = this->vertCoords_[q[3]];
104 float area0{}, area1{};
107 quadArea[i] = area0 + area1;
112 quadDiagsRatio[i] = std::min(diag0, diag1) / std::max(diag0, diag1);
115 const std::array<float, 4> edges{
121 quadEdgesRatio[i] = *std::min_element(edges.begin(), edges.end())
122 / *std::max_element(edges.begin(), edges.end());
125 const std::array<float, 4> angles{
132 const auto min_max{std::minmax_element(angles.begin(), angles.end())};
133 quadAnglesRatio[i] = *min_max.first / *min_max.second;
140 for(
const auto a : quadArea) {
143 for(
auto &a : quadArea) {
144 a *= quadArea.size() / sumArea;
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