File: writerounds.cc

package info (click to toggle)
simrisc 16.05.00-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,568 kB
  • sloc: cpp: 6,877; fortran: 665; makefile: 112; ansic: 112; sh: 107
file content (35 lines) | stat: -rw-r--r-- 1,078 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#define XERR "loop"
#include "loop.ih"

// headers by headerrounds.cc

    // by iterate.cc

void Loop::writeRounds(CSVTable &tab) const
{
    if (not tab.stream() or d_nRounds == 0)
        return;

    std::vector<ModBase *> const &modBase = d_modalities.activeMods();

    for (size_t rnd = 0; rnd != d_nRounds; ++rnd)
    {
        tab.more() << (rnd + 1);          // rounds.txt: natural round nrs

        for (ModBase const *ptr: modBase)
            tab.more() << ptr->truePositive(rnd) << ptr->falsePositive(rnd) << 
                          ptr->trueNegative(rnd) << ptr->falseNegative(rnd);
//                      d_nRoundTP[rnd] << d_nRoundFP[rnd] <<
//                      d_nRoundTN[rnd] << d_nRoundFN[rnd] <<

        tab.more() << d_nDetections[rnd] << 
                      d_nIntervals[rnd] << d_nTrueIntervals[rnd] << 
                      static_cast<size_t>(round(d_roundCost[rnd])) <<
                      static_cast<size_t>(round(d_roundBiopCosts[rnd]));

        d_modalities.writeRounds(tab, rnd);
        tab.row();
    }

    tab << hline();
}