[med-svn] [Git][med-team/simrisc][debian/latest] 3 commits: Ready for simrisc 16.06.00-1

Frank B. Brokken (@fbb-guest) gitlab at salsa.debian.org
Fri Jan 23 13:16:02 GMT 2026



Frank B. Brokken pushed to branch debian/latest at Debian Med / simrisc


Commits:
daec96b7 by Frank B. Brokken at 2026-01-23T14:15:28+01:00
Ready for simrisc 16.06.00-1

- - - - -
493fb737 by Frank B. Brokken at 2026-01-23T14:15:34+01:00
New upstream version 16.06.00
- - - - -
d2477da2 by Frank B. Brokken at 2026-01-23T14:15:38+01:00
Update upstream source from tag 'upstream/16.06.00'

Update to upstream version '16.06.00'
with Debian dir 2b5d6119a94ca4f06416e098007e4490c2c7f138
- - - - -


30 changed files:

- VERSION
- changelog
- debian/changelog
- debian/control
- debian/tests/run-unit-test
- debian/tests/simrisc-test1.expected.gz
- debian/tests/simrisc-test2.expected.gz
- documentation/man/simrisc.yo
- documentation/manual/simrisc.yo
- − loop/README
- loop/caseinit.cc
- loop/gencases.cc
- loop/headerdata.cc
- loop/intervalcancer.cc
- loop/leaving.cc
- loop/left.cc
- loop/loop.h
- loop/loop.ih
- loop/maybefalsenegative.cc
- loop/screen.cc
- loop/writedata.cc
- modalities/addmod.cc
- + modalities/legend.cc
- modalities/modalities.h
- modalities/modalities.ih
- + modbase/data.cc
- modbase/modbase.f
- modbase/modbase.h
- modbase/modbase1.cc
- − simrisc


Changes:

=====================================
VERSION
=====================================
@@ -1,3 +1,3 @@
 #define AUTHOR  "Frank B. Brokken (f.b.brokken at rug.nl)";
-#define VERSION "16.05.00"
-#define YEARS "2020-2025"
+#define VERSION "16.06.00"
+#define YEARS "2020-2026"


=====================================
changelog
=====================================
@@ -1,3 +1,11 @@
+simrisc (16.06.00)
+
+  * The generated data files (like data-0.txt) contains a new column 'detected
+    by' specifying which modality detected a tumor. The simrisc man-page was
+    updated accordingly.
+
+ -- Frank B. Brokken <f.b.brokken at rug.nl>  Fri, 23 Jan 2026 10:52:49 +0100
+
 simrisc (16.05.00)
 
   * Option -S (--sensitivity) was dropped. The sensitivity.txt file is not


=====================================
debian/changelog
=====================================
@@ -1,3 +1,11 @@
+simrisc (16.06.00-1) unstable; urgency=medium
+
+  * The generated data files (like data-0.txt) contains a new column 'detected
+    by' specifying which modality detected a tumor. The simrisc man-page was
+    updated accordingly.
+
+ -- Frank B. Brokken <f.b.brokken at rug.nl>  Fri, 23 Jan 2026 10:53:15 +0100
+
 simrisc (16.05.00-1) unstable; urgency=medium
 
   [ Frank B. Brokken ]


=====================================
debian/control
=====================================
@@ -3,7 +3,6 @@ Maintainer: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.
 Uploaders: tony mancill <tmancill at debian.org>,
            Frank B. Brokken <f.b.brokken at rug.nl>
 Section: science
-Priority: optional
 Build-Depends: debhelper-compat (= 13),
                ghostscript,
                icmake (>= 13.00.03),
@@ -13,7 +12,7 @@ Build-Depends: debhelper-compat (= 13),
                texlive-latex-recommended,
                texlive-plain-generic,
                yodl
-Standards-Version: 4.7.2
+Standards-Version: 4.7.3
 Vcs-Browser: https://salsa.debian.org/med-team/simrisc
 Vcs-Git: https://salsa.debian.org/med-team/simrisc.git
 Homepage: https://fbb-git.gitlab.io/simrisc/


=====================================
debian/tests/run-unit-test
=====================================
@@ -1,6 +1,9 @@
 #!/bin/bash
 set -e
 
+# called from the .../simrisc-VERSION directory after building a new
+# version.
+
 if [ -z "${AUTOPKGTEST_TMP}" ] || [ ! -d "${AUTOPKGTEST_TMP}" ]; then
     AUTOPKGTEST_TMP=$(mktemp --directory)
 fi


=====================================
debian/tests/simrisc-test1.expected.gz
=====================================
Binary files a/debian/tests/simrisc-test1.expected.gz and b/debian/tests/simrisc-test1.expected.gz differ


=====================================
debian/tests/simrisc-test2.expected.gz
=====================================
Binary files a/debian/tests/simrisc-test2.expected.gz and b/debian/tests/simrisc-test2.expected.gz differ


=====================================
documentation/man/simrisc.yo
=====================================
@@ -348,7 +348,7 @@ The first lines of the generated files contain time stamps showing the date
 and time when the files were written and the used tt(SimRisc) version. Here is
 an example, following the RFC 2822 format for the timestamp:
     verb(
-    Mon, 14 Nov 2022 15:30:26 +0100 (SimRisc V. 15.00.00)
+    Fri, 23 Jan 2026 10:30:26 +0100 (SimRisc V. 16.06.00)
     )
     If tt(label:) lines are used then the time stamp is followed by the label
 specifications, which is then followed by an empty line. After this header the
@@ -418,6 +418,18 @@ file (one line of comma-separated values per simulated case):
     itt(costs biop:) the costs of a performed biopsy;
     itt(detected self): 1 if the tumor was self-detected, 0 if not
         (also if there's no tumor);
+    itt(detected by): the modalities defined in the configuration file are
+        associated with subsequent powers of two id-numbers. The numbers used
+        for the various modalities are listed in a legenda just above the
+        beginning of the data table. E.g.,
+       verb(    'detected by' legend:
+        1: Mammo
+        2: Tomo
+        4: MRI)
+       The `detected by' column shows the id-number of the modality that
+        detected the tumor. Value 0 is used when no tumor was present or was
+        not detected by a modality (e.g., the tumor was self-detected or the
+        case died before the tumor was detected).
     itt(detected round): round number at which a tumor was detected, using
         the following values (assuming tt(N) screening rounds were
         specified):nl()


=====================================
documentation/manual/simrisc.yo
=====================================
@@ -33,7 +33,7 @@ includefile(abstract.yo)
 
 affiliation(University of Groningen)
 
-report(Simrisc Manual)(Frank B. Brokken)(November 23, 2025)())
+report(Simrisc Manual)(Frank B. Brokken)(January 23, 2026)())
 
 chapter(Introduction)
 includefile(intro/intro.yo)


=====================================
loop/README deleted
=====================================
@@ -1,103 +0,0 @@
-iterate:    
-    At each iteration:
-        reinit the random generator
-        maybe vary variable modality/tumorinfo parameters
-        reset iteration specific variables
-        perform case simulations                                (genCases)
-
-genCases:
-    For each case:
-        initialize case-specific variables
-        perform screening rounds                                (screening)
-        perform post-screening                                  (postScreen)
-
-screening:
-    For each screening round:
-        stop if the case is no longer present
-        determine the screening age of the current round
-        stop if the case died or self-detected a tumor          (leaving)
-        perform the screening at the current screening age      (screen)
-
-leaving:
-        before1stRound: true if no screening has as yet been performed (i.e.,
-        screen hasn't yet been called for the 1st time)
-        if no tumor exists at this age:
-            if the natural death age is at most equal to the current screening
-            age then
-                if before1stRound then 
-                    the case leaves with status NATURAL_PRE
-                else
-                    the case leaves with status NATURAL_DURING
-            else 
-                done here
-        else (there s a tumor):
-
-        if the natural death age is before the screening age but the tumor
-        isn't self-detected before the screening age then
-            determine the tumor characteristics at the nat. death age
-            if before1stRound then 
-                the case leaves with status UNDETECTED_PRE
-            else
-                the case leaves with status UNDETECTED_DURING
-
-        else if the tumor is self-detected before the screening age then
-            determine the tumor characteristics at the self-detect age
-            add the treatmentCosts at the self-detect age to the costs for
-            this case (treatmentCosts: using tumor diameter with BC and tumor
-                metastasis with LC) 
-            if before1stRound then 
-                the case leaves with status SELF_PRE at the lowest age of
-                    the nat. death age and the tumor causes death age
-            else (intervalCancer)
-                [update summary variables]
-                the case leaves with status SELF_DURING at the lowest age of
-                    the nat. death age and the tumor caused death age
-        
-        else done here.
-
-            
-screen:
-    for each of the used modalities:
-        compute and update the screening costs variables
-        if there's no tumor at the screening age:
-            (maybeFalsePositive)
-            randomly determine using the modality's specificity at the
-                screening age whether there's a false positive.
-            if not: 
-                done here
-            else
-                add the biop costs and update summary variables
-        else
-            (maybeFalseNegative)
-            determine the tumor characteristics at the screening age
-                (falseNegative)
-                randomly determine using the modality's sensitivity at the
-                screening age whether there's a false false negative.
-            if so then 
-                update summary variables
-            else
-                (tumorDetected)
-                a tumor has been detected: update counting variables
-                the case leaves with status SCREEN_DETECTED at the lowest
-                age of the nat. death age and the tumor caused death age
-    
-postscreen:
-    if the case is no longer present then
-        done here
-
-    if no tumor has developed after the last screening age then
-        the case leaves with status NATURAL_POST at the natural death age
-    else
-        determine the tumor's characteristics at the self-detect age
-        and set the tumor's deathAge
-
-        if self-detection before the natural death age then
-            update the treatmentCosts using the tumor's selfDetectAge
-
-        the case leaves with status UNDETECTED_POST at the lowest age of the
-        natural death age and the tumor caused death age
-
-        
-        
-        
-


=====================================
loop/caseinit.cc
=====================================
@@ -1,12 +1,13 @@
 #define XERR
 #include "loop.ih"
 
-extern size_t g_caseIdx;
+    // by gencases.cc
 
 void Loop::caseInit()
 {
     g_log << "\nLoop::caseInit\n";
 
+    d_modValue = 0;                         // value of the used modality/ies
     d_caseCost = 0;                         // org: womenCosts
     d_roundDetected = -1;                   // org: roundDetected
     d_roundInfo.assign(d_nRounds, '0');     // attendance info per round per


=====================================
loop/gencases.cc
=====================================
@@ -1,8 +1,7 @@
 #define XERR
 #include "loop.ih"
 
-size_t g_caseIdx;           // -> loop.ih       if (caseIdx > 24842)
-size_t g_err = 14;
+// size_t g_err = 14;
 
     // by iterate.cc
 
@@ -13,24 +12,19 @@ void Loop::genCases(size_t iter, size_t nCases)
     bool showAll = not d_options.specificAges() and d_options.lastCase() == 0;
 
                                         // perform 'nCases' simulations
-    for (size_t caseIdx = 0; caseIdx != nCases; ++caseIdx)
+    for (size_t d_caseIdx = 0; d_caseIdx != nCases; ++d_caseIdx)
     {
-        g_caseIdx = caseIdx;
-
-        g_log.caseIdx(caseIdx);
+        g_log.caseIdx(d_caseIdx);
         caseInit();             // initialize the data for this case
 
         screening();        // no action unless screening rounds are specified
 
         postScreen();
 
-//FBB        d_sumDeathAge += d_deathAge;
-//FBB        d_totalCost += d_caseCost;
-
-        if (dataTable.stream() and (showAll or caseIdx + 1 == nCases))
+        if (dataTable.stream() and (showAll or d_caseIdx + 1 == nCases))
         {
             d_tumor.checkDeath(d_naturalDeathAge);
-            writeData(dataTable, caseIdx);
+            writeData(dataTable, d_caseIdx);
         }
     }
 


=====================================
loop/headerdata.cc
=====================================
@@ -25,16 +25,20 @@ CSVTable Loop::headerData(size_t iter) const
     for (size_t status = NATURAL_PRE; status != Status_END; ++status)
         out << setw(5) << status << ": " << s_status[status] << '\n';
 
+    out << "'detected by' legend:\n";
+    d_modalities.legend(out);
+
         // the fmt() insertions define the widths of the columns, 
         // not their header labels. Blanks are ignored, hence 'costs67890'
         // case  cause  age  natural  status  present  detected  interval
         // 1     2      3    4        4       6        7         8
         // diameter days  period  onset  self-detect  death
         // 9        10    11      12     13           14
-        // costs  self  round  rounds  TNM
-        // 15     16    17     18      19 
+        // costs  self  by  round  rounds  TNM
+        // 15     16    17  18     19      20 
         //              **
 
+        // define the 20 fields of the table
     tab.fmt() <<  right(7) <<                                   //  1
                   "Natural" << right("100.12", 2) <<            //  2 -  3
                   "natural" << "status" <<                      //  4 -  5
@@ -43,33 +47,38 @@ CSVTable Loop::headerData(size_t iter) const
 
                                            //  death:
                   "onset" << "self-detect" << "100.00" <<       // 12 - 14
-                "costs67890" <<                                 // 15
-                "biop567" << "self" << "round" <<               // 15-pre - 17
-                    right(d_nRounds > 10 ? d_nRounds : 10) <<   // 18
-                    right(5);                                   // 19
+                  "costs67890" <<                               // 15
+
+                "biop567" << "self" << "by" << "round" <<       // 15-pre - 18
+                    right(d_nRounds > 10 ? d_nRounds : 10) <<   // 19
+                    right(5);                                   // 20
 
+        // the top ine
     tab << hline();
-                                                                // 6 - 14 + hline
-    tab.row(5) << join(9, FMT::CENTER) << "tumor";
+
+        // the 1st text line + covering hline                   // 6 - 14
     tab.row(5) << hline(9);
 
+        // the 2nd text line + covering hlines
     tab.row(1) <<                                               //  1
             join(4, FMT::CENTER) << "death" <<                  //  2 -  5
             join(6, FMT::RIGHT) << ' ' <<                       //  6 -  11
             ' ' <<                                              // 12
             join(2, FMT::CENTER) << "age" <<                    // 13 - 14
-            join(2, FMT::CENTER) << "costs" <<                  // 15-pre 15
-            join(2, FMT::CENTER) << "detected";                 // 16 - 17
+            join(2, FMT::CENTER) << "costs" <<                  // 15 15-pre
+            join(3, FMT::CENTER) << "detected";                 // 16 - 18
 
 
+        // the 3rd text line + covering hlines
     tab.row(1) <<                                               //  1
             hline(4) <<                                         //  2 -  5
             join(4, FMT::RIGHT) << ' ' <<                       //  6 -  9
             "doubling" << "preclinical" << ' ' <<               // 10 - 12
             hline(2) <<                                         // 13 - 14
-            hline(2) <<                                         // 15-pre 15
-            hline(2) << "screening";                            // 16 - 18
+            hline(2) <<                                         // 15 15-pre 
+            hline(3) << "screening";                            // 16 - 18
 
+        // the 4th text line
     tab << "case" <<                                            //  1
             "cause" << "age" <<                                 //  2 -  3
             "natural" << "status" <<                            //  4 -  5
@@ -77,10 +86,10 @@ CSVTable Loop::headerData(size_t iter) const
             "diameter" << "days" << "period" <<                 //  9 - 11
             "onset" << "self-detect" << "death" <<              // 12 - 14
             "screening" <<                                      // 15
-            "biop" <<                                       // 15-pre
-            "self" << "round" << "rounds" <<  "TNM";            // 16 - 19
-
+            "biop" <<                                           // 15-pre
+            "self" << "by" << "round" << "rounds" <<  "TNM";    // 16 - 20
 
+        // the bottom hline
     tab << hline();
 
     tab.sep(", ");
@@ -107,8 +116,9 @@ CSVTable Loop::headerData(size_t iter) const
 // 14          "death status, "
 // 15          "costs, "
 // 16          "self detected, "
-// 17          "round detected, "
-// 18          "screening rounds, "
-// 19          "TNM, "
+// 17          "by detected, "
+// 18          "round detected, "
+// 19          "screening rounds, "
+// 20          "TNM, "
 //             "\n";
 //     }


=====================================
loop/intervalcancer.cc
=====================================
@@ -6,6 +6,8 @@
     // the tumor characteristics (at self-detection age) have already been
     // determined in loop/leaving.cc.
 
+    // by leaving.cc
+
 bool Loop::intervalCancer() // (double screeningAge)
 {
     d_tumor.intervalCancer();               // sets d_interval true
@@ -14,12 +16,6 @@ bool Loop::intervalCancer() // (double screeningAge)
     if (d_screening.attend(d_round))
         ++d_nTrueIntervals[d_round];
 
-        // treat the tumor and determine the death-age of the women
-        // since the tumor is present, no need to call diameterCheck()
-//    addCost(treatmentCosts(d_tumor.selfDetectAge()));
-
-//    d_tumor.setDeathAge();
-
-    return left(SELF_DURING, 
-                min(d_naturalDeathAge, d_tumor.deathAge()));
+    return left(SELF_DURING, min(d_naturalDeathAge, d_tumor.deathAge()));
 }
+


=====================================
loop/leaving.cc
=====================================
@@ -3,6 +3,8 @@
 
     // true: the case has died or detected a tumor
 
+    // by screening.cc
+
 bool Loop::leaving(double screeningAge)
 {
     bool before1stRound = screeningAge == d_firstRoundAge;


=====================================
loop/left.cc
=====================================
@@ -1,6 +1,8 @@
 #define XERR
 #include "loop.ih"
 
+    // by intervalcancer.cc, tumordetected.cc, postscreen.cc, leaving.cc
+
 bool Loop::left(Status status, double deathAge)
 {
     d_status = status;


=====================================
loop/loop.h
=====================================
@@ -58,6 +58,9 @@ class Loop: public Globals
         N_RESULTS = 13              // weird... used in results()
     };
 
+    static StringSet s_availableFiles;
+    static char const *s_status[];
+
     Options const &d_options;
     Status d_status = PRESENT;
 
@@ -71,15 +74,14 @@ class Loop: public Globals
     Modalities d_modalities;
     Screening d_screening;
 
-    int16_t d_roundDetected;        // -1: no detection
+    int16_t d_roundDetected;            // -1: no detection
+    uint16_t d_modValue;                // value of the used modality/ies
 
             // Analysis &d_analysis;
 
             // Beir7 const &d_beir7;
             // Incidence const &d_incidence;
 
-//FBB    double d_sumDeathAge = 0;
-
     double d_naturalDeathAge = 0;      // dying age w/o tumor
     double d_deathAge = 0;             // actual dying age
 
@@ -110,8 +112,6 @@ class Loop: public Globals
     double d_biopCosts;                 // sum of biop costs per case
     DoubleVect d_roundBiopCosts;        // and per round
 
-//FBB    double d_totalCost;
-
     DoubleVect d_roundCost;             // sum of costs over all scr. rounds
                                         // (org: screeningRoundCosts)
 
@@ -129,8 +129,7 @@ class Loop: public Globals
                                             // probGroup::Vector to use when
                                             // constructing d_indices
 
-    static StringSet s_availableFiles;
-    static char const *s_status[];
+    size_t d_caseIdx;               // case idx currently used by genCases
 
     public:
         Loop(StringVect const &labels);
@@ -146,11 +145,12 @@ class Loop: public Globals
         Uint16Vect cptIndices() const;          // cpt d_indices
         static void fillTNM(std::ostream &out);
         static void fillZeroes(std::ostream &out, size_t idx);
-        void genCases(size_t iter, size_t nCases);
+
+        void genCases(size_t iter, size_t nCases);      // generates the
+                                                        // data matrix
 
         FBB::CSVTable headerData(size_t iter) const;
         FBB::CSVTable headerRounds(size_t iter) const;
-//FBB        FBB::CSVTable headerSensitivity() const;
 
         bool intervalCancer();
 
@@ -199,18 +199,6 @@ class Loop: public Globals
         void writeData(FBB::CSVTable &dataTable, size_t idx) const;
         void writeParameters(size_t iter) const;    // also opens the file
         void writeRounds(FBB::CSVTable &roundTable) const;
-//FBB        void writeSensitivity(FBB::CSVTable &sensTable, size_t iter) const;
 };
 
-
-// OBSOLETE
-//        void characteristics(Status natural, Status tumor);
-//        void preTumorDeath();   // early natural death
-//        void preScreen();
-        void preSelfDetected();     // self detected tumor pre-screening
-// covered by 'left(...)'
-//      void setStatus(Status status, double age);  // only sets the d_ vars.
-//        void removeCase(double screeningAge, double selfDetectAge);
-
-
 #endif


=====================================
loop/loop.ih
=====================================
@@ -14,8 +14,7 @@
 #include "../modbase/modbase.h"
 #include "../log/log.h"
 
-extern size_t g_caseIdx;
-extern size_t g_err;
+// extern size_t g_err;             // not used, see gencases.cc
 
 namespace Icmake
 {


=====================================
loop/maybefalsenegative.cc
=====================================
@@ -1,11 +1,11 @@
 #define XERR
 #include "loop.ih"
 
-extern size_t g_caseIdx;
-
     // tumor does exist, but the screening may be negative: false negative
     //                   otherwise: true positive
 
+extern size_t g_caseIdx;
+
         // by screen.cc
 
 void Loop::maybeFalseNegative(ModBase *modBase, double screeningAge)
@@ -19,7 +19,11 @@ void Loop::maybeFalseNegative(ModBase *modBase, double screeningAge)
     {
         tumorDetected(modBase, screeningAge);
         // ++d_nRoundTP[d_round];
+
         modBase->addTruePositive(d_round);
+
+        d_modValue += modBase->value();         // true positive detection
+                                                // by *modBase
     }
 }
 


=====================================
loop/screen.cc
=====================================
@@ -1,8 +1,6 @@
 #define XERR "loop"
 #include "loop.ih"
 
-extern size_t g_caseIdx;
-
 // perform a screening
 
     // by screening.cc
@@ -29,7 +27,7 @@ void Loop::screen(double screeningAge)
         double cost = d_costs.screening(screeningAge, modBase->cost());
         d_caseCost += cost;
         g_log << "Screening costs, round " << (d_round + 1) << 
-                ", case " << (g_caseIdx + 1) << 
+                ", case " << (d_caseIdx + 1) << 
                 ": cost: " << cost <<
                 ", old sum: " << d_roundCost[d_round] <<
                 ", new sum: ";


=====================================
loop/writedata.cc
=====================================
@@ -1,6 +1,8 @@
 #define XERR
 #include "loop.ih"
 
+    // by gencases.cc
+
 void Loop::writeData(CSVTable &tab, size_t idx) const
 {
     static Status detection[] = { SELF_PRE, SELF_DURING, SELF_POST };
@@ -22,16 +24,14 @@ void Loop::writeData(CSVTable &tab, size_t idx) const
         out << rowCol.first << ',' << rowCol.second;    // row is bc: TNM, col
     }                                                   // = 0 (via Survival::
                                                         // setVSD
-        // self  round
-        // 16    17
-        //       **
     tab << 
-            static_cast<size_t>(round(d_caseCost)) <<                // 15
-            static_cast<size_t>(round(d_biopCosts)) <<            // 15-pre
+            static_cast<size_t>(round(d_caseCost)) <<               // 15
+            static_cast<size_t>(round(d_biopCosts)) <<              // 15-pre
            (find(detection, detection + size(detection), d_status) != 
                           detection + size(detection)) <<           // 16
-           showRound() << d_roundInfo <<                            // 17 - 18
-           out.str();                                               // 19
+
+           to_string(d_modValue) << showRound() << d_roundInfo <<   // 17 - 19
+           out.str();                                               // 20
 }
 
 


=====================================
modalities/addmod.cc
=====================================
@@ -1,6 +1,8 @@
 //#define XERR
 #include "modalities.ih"
 
+    // by modalities1.cc
+
 void Modalities::addMod(ModBase *modBase)   // d_base in ModBase, initialized
 {                                           // to { modName, "costs:" },
                                             // read by costs/costs1.cc


=====================================
modalities/legend.cc
=====================================
@@ -0,0 +1,10 @@
+//#define XERR
+#include "modalities.ih"
+
+    // by loop/headerdata.cc
+
+void Modalities::legend(ostream &out) const
+{
+    for (ModBase const *modPtr: d_modBaseVect)
+        out << setw(5) << modPtr->value() << ": " << modPtr->id() << '\n';
+}


=====================================
modalities/modalities.h
=====================================
@@ -21,7 +21,6 @@ class Modalities
 {
     Tumor const &d_tumor;               // used by Mammo and CT
 
-
     std::vector<ModBase *> d_modBaseVect;   // defined modalities
     StringVect d_modalityIDs;               // and their IDs
     StringSet d_active;                     // the active modalities
@@ -47,6 +46,8 @@ class Modalities
 
         void vary(std::ostream &out);
 
+        void legend(std::ostream &out) const;
+
         void writeParameters(std::ostream &out) const;
 
                                                         // determine the Mod. 


=====================================
modalities/modalities.ih
=====================================
@@ -1,6 +1,7 @@
 #include "modalities.h"
 #include "../xerr/xerr.ih"
 
+#include <iostream>
 #include <algorithm>
 #include <set>
 
@@ -12,7 +13,5 @@
 #include "../mri/mri.h"
 #include "../ct/ct.h"
 
-#ifndef SPCH_
 using namespace std;
 using namespace FBB;
-#endif


=====================================
modbase/data.cc
=====================================
@@ -0,0 +1,5 @@
+//#define XERR
+#include "modbase.ih"
+
+uint16_t ModBase::s_nextValue = 1;  // bit value of the next defined module
+


=====================================
modbase/modbase.f
=====================================
@@ -64,6 +64,11 @@ inline std::string const &ModBase::id() const
     return d_id;
 }
 
+inline uint16_t ModBase::value() const
+{
+    return d_value;
+}
+
 inline double ModBase::dose(uint16_t idx) const
 {
     return vDose(idx);


=====================================
modbase/modbase.h
=====================================
@@ -14,13 +14,16 @@ class ModBase
 {
     friend std::ostream &operator<<(std::ostream &, ModBase const &);
 
+    static uint16_t s_nextValue;            // next bit value
+
     StringVect d_base;
 
     std::string const d_id;
+    uint16_t d_value;                       // bit value of the defined Module
 
     bool d_defined;
 
-    size_t d_cost = 0;                        // cost of using th modality
+    size_t d_cost = 0;                      // cost of using th modality
     SizeVect d_count;
 
     SizeVect d_truePositives;               // separate counts for each
@@ -49,6 +52,7 @@ class ModBase
         size_t falseNegative(size_t round) const;                   // .f
 
         std::string const &id() const;                              // .f
+        uint16_t value() const;                                     // .f
         size_t operator[](size_t round) const;                      // .f
         void resetCounters(size_t nRounds);
         double sensitivity(size_t idx) const;                       // .f


=====================================
modbase/modbase1.cc
=====================================
@@ -5,8 +5,12 @@ ModBase::ModBase(string const &id)
 :
     d_base{ id + ':', "costs:" },
     d_id(id),
+    d_value(s_nextValue),
     d_defined(Parser::hasSection(d_base))
 {
+    s_nextValue <<= 1;
+
     if (d_defined)
         Parser::nonNegative(d_base, d_cost);
+    
 }


=====================================
simrisc deleted
=====================================
@@ -1 +0,0 @@
-simrisc
\ No newline at end of file



View it on GitLab: https://salsa.debian.org/med-team/simrisc/-/compare/7e780b7bc933e3d575c793511486cfe93dad0cd6...d2477da258c02848238fedf9e6904015e1bbbc33

-- 
View it on GitLab: https://salsa.debian.org/med-team/simrisc/-/compare/7e780b7bc933e3d575c793511486cfe93dad0cd6...d2477da258c02848238fedf9e6904015e1bbbc33
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20260123/a9d3f9ac/attachment-0001.htm>


More information about the debian-med-commit mailing list