14 auto sortedDiagram{diagram};
16 TTK_PSORT(this->threadNumber_, sortedDiagram.begin(), sortedDiagram.end(),
18 return a.persistence() < b.persistence();
21 for(
const auto &pair : sortedDiagram) {
23 plots[pair.dim].emplace_back(
24 std::max(pair.persistence(), epsilon), plots[pair.dim].size());
26 plots[3].emplace_back(
27 std::max(pair.persistence(), epsilon), plots[3].size());
30 for(
auto &plot : plots) {
31 for(
auto &el : plot) {
32 el.second = plot.size() - el.second;
37 const auto firstPairDim1 = std::find_if(
38 diagram.begin(), diagram.end(),
43 const auto datasetIs2D
44 = firstPairDim1 != diagram.end()
49 plots[2] = std::move(plots[1]);