8 const std::vector<CandidatePair> &pairs,
9 const std::array<std::vector<SimplexId>, 4> &criticalCellsByDim,
10 const std::vector<bool> &pairedMinima,
11 const std::vector<bool> &paired1Saddles,
12 const std::vector<bool> &paired2Saddles,
13 const std::vector<bool> &pairedMaxima)
const {
15 const auto dim = this->
dcvf_.getDimensionality();
18 std::vector<std::vector<std::string>> rows{
19 {
" #Min-saddle pairs",
21 std::count_if(pairs.begin(), pairs.end(),
23 {
" #Saddle-saddle pairs",
24 std::to_string(dim == 3 ? std::count_if(
25 pairs.begin(), pairs.end(),
28 {
" #Saddle-max pairs",
29 std::to_string(std::count_if(
30 pairs.begin(), pairs.end(),
31 [dim](
const CandidatePair &a) { return a.type == dim - 1; }))},
35 std::vector<size_t> nCritCells(dim + 1);
36 std::vector<size_t> nNonPairedCritCells(dim + 1);
38 for(
int i = 0; i < dim + 1; ++i) {
39 nCritCells[i] = criticalCellsByDim[i].size();
41 for(
size_t j = 0; j < criticalCellsByDim[i].size(); ++j) {
42 const auto cell = criticalCellsByDim[i][j];
43 if((i == 0 && !pairedMinima[cell]) || (i == 1 && !paired1Saddles[cell])
44 || (i == 2 && dim == 3 && !paired2Saddles[cell])
45 || (i == dim && !pairedMaxima[cell])) {
49 nNonPairedCritCells[i] = nNonPaired;
52 std::vector<std::string> critCellsLabels{
"Minima"};
54 critCellsLabels.emplace_back(
"1-saddles");
57 critCellsLabels.emplace_back(
"2-saddles");
59 critCellsLabels.emplace_back(
"Maxima");
61 for(
int i = 0; i < dim + 1; ++i) {
62 const std::string unpaired{nNonPairedCritCells[i] == 0
64 :
" (" + std::to_string(nNonPairedCritCells[i])
67 rows.emplace_back(std::vector<std::string>{
68 " #" + critCellsLabels[i], std::to_string(nCritCells[i]) + unpaired});
void displayStats(const std::vector< CandidatePair > &pairs, const std::array< std::vector< SimplexId >, 4 > &criticalCellsByDim, const std::vector< bool > &pairedMinima, const std::vector< bool > &paired1Saddles, const std::vector< bool > &paired2Saddles, const std::vector< bool > &pairedMaxima) const
Print number of pairs, critical cells per dimension & unpaired cells.
printMsg(debug::output::BOLD+" | | | | | . \\ | | (__| | / __/| |_| / __/| (_) |"+debug::output::ENDCOLOR, debug::Priority::PERFORMANCE, debug::LineMode::NEW, stream)