[med-svn] [Git][med-team/simrisc][master] 4 commits: Ready for simrisc 14.03.00-1

Frank B. Brokken gitlab at salsa.debian.org
Sun Feb 21 13:07:03 GMT 2021



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


Commits:
508bf107 by Frank B. Brokken at 2021-02-21T14:00:29+01:00
Ready for simrisc 14.03.00-1

- - - - -
7f401c7a by Frank B. Brokken at 2021-02-21T14:00:30+01:00
New upstream version 14.03.00
- - - - -
c912c40e by Frank B. Brokken at 2021-02-21T14:00:32+01:00
Update upstream source from tag 'upstream/14.03.00'

Update to upstream version '14.03.00'
with Debian dir 90dfe1f8c58351c8d2d660629ed5504a0fe19931
- - - - -
4f0f77c1 by Frank B. Brokken at 2021-02-21T14:02:39+01:00
Merge branch 'master' of salsa.debian.org:med-team/simrisc

- - - - -


17 changed files:

- − TODO
- VERSION
- changelog
- debian/changelog
- documentation/man/simriscparams.yo
- err/data.cc
- err/err.h
- err/reset.cc
- loop/headerrounds.cc
- loop/writerounds.cc
- + round/opextract.cc
- round/round.h
- round/round.ih
- screening/addround.cc
- screening/screening.h
- screening/setrounds.cc
- stdconfig/simrisc


Changes:

=====================================
TODO deleted
=====================================
@@ -1 +0,0 @@
-


=====================================
VERSION
=====================================
@@ -1,3 +1,3 @@
 #define AUTHOR  "Frank B. Brokken (f.b.brokken at rug.nl)";
-#define VERSION "14.02.00"
+#define VERSION "14.03.00"
 #define YEARS "2020-2021"


=====================================
changelog
=====================================
@@ -1,3 +1,10 @@
+simrisc (14.03.00)
+
+  * To specify no screening round ages 'round: none' should be specified. When
+    'round: none' is specified then the rounds file is not written.
+
+ -- Frank B. Brokken <f.b.brokken at rug.nl>  Sun, 21 Feb 2021 13:30:38 +0100
+
 simrisc (14.02.00)
 
   * Option --cases was renamed to --last-case (-l) to avoid confusion with


=====================================
debian/changelog
=====================================
@@ -1,3 +1,10 @@
+simrisc (14.03.00-1) unstable; urgency=medium
+
+  * New upstream release adds the specification 'round: none' to suppress
+    using screening round ages.
+
+ -- Frank B. Brokken <f.b.brokken at rug.nl>  Sun, 21 Feb 2021 13:33:12 +0100
+
 simrisc (14.02.00-1) unstable; urgency=medium
 
   * New upstream release updated the man-pages and requires the use of


=====================================
documentation/man/simriscparams.yo
=====================================
@@ -242,11 +242,16 @@ manpagesection(The Screening section)
 
 This section starts with a line containing tt(Screening:) and it defines the
 ages at which screenings are performed as well as the screenings attendance
-rate. Each screening round is defined by the keyword tt(round:) followed by an
-age which in turn is followed by a list of at least one space delimited
-modality specification (currently tt(Mammo, Tomo) and tt(MRI)). The default
-configuration file contains (below the line tt(Screening:)) the following
-specifications:
+rate. If no screening rounds should be used then specify a single
+round-specification line
+        verb(
+    round: none
+        ) 
+    Otherwise, each screening round is defined by the keyword tt(round:)
+followed by an age which in turn is followed by a list of at least one space
+delimited modality specification (currently tt(Mammo, Tomo) and tt(MRI)). The
+default configuration file contains (below the line tt(Screening:)) the
+following specifications:
        verb(
     round:     50  Mammo 
     round:     52  Mammo 
@@ -261,7 +266,12 @@ specifications:
     round:     70  Mammo 
     round:     72  Mammo 
     round:     74  Mammo 
+    )
 
+In addition to the tt(round) specification line(s) the tt(Screening) section
+specifies the attendance rate proportion. The default configuration file
+specifies:
+    verb(
     #                   proportion:
     attendanceRate:     .8     
         )


=====================================
err/data.cc
=====================================
@@ -34,6 +34,8 @@ char const *Err::s_context[]            // line context available
     "proportions must sum to 1"             , // PROB_SUM,
     "parameter(s) must lie within 0..1"     , // RANGE_0_1
     "screening round ages don't increment"  , // ROUND_AGES_DONT_INC
+    "`round: none' conflicts with "  
+              "`round: age' specifications" , // ROUND_NONE
     "specification error"                   , // SPEC_ERROR
     "undefined distribution"                , // UNDEFINED_DIST
     "undefined modality"                    , // UNDEFINED_MODALITY


=====================================
err/err.h
=====================================
@@ -40,6 +40,7 @@ class Err
             PROB_SUM,
             RANGE_0_1,
             ROUND_AGES_DONT_INC,
+            ROUND_NONE,
             SPEC_ERROR,
             UNDEFINED_DIST,
             UNDEFINED_MODALITY,


=====================================
err/reset.cc
=====================================
@@ -1,4 +1,4 @@
-//#define XERR
+#define XERR
 #include "err.ih"
 
 // static 


=====================================
loop/headerrounds.cc
=====================================
@@ -3,7 +3,8 @@
 
 CSVTable Loop::headerRounds(size_t iteration) const
 {
-   CSVTable tab{ outStream(Options::instance().roundsFile(), iteration),
+   CSVTable tab{ outStream(
+        d_nRounds == 0 ? "" : Options::instance().roundsFile(), iteration),
                  "  " };
 
 //          false        number of                   number of
@@ -11,7 +12,7 @@ CSVTable Loop::headerRounds(size_t iteration) const
 //  round  pos. neg.  tumors  interval   costs     Mammo Tomo MRI
 //  -------------------------------------------------------------
 
-    if (not tab.stream())
+    if (not tab.stream() or d_nRounds == 0)
         return tab;
 
     labels(tab.stream());        


=====================================
loop/writerounds.cc
=====================================
@@ -3,7 +3,7 @@
 
 void Loop::writeRounds(CSVTable &tab) const
 {
-    if (not tab.stream())
+    if (not tab.stream() or d_nRounds == 0)
         return;
 
     for (size_t rnd = 0; rnd != d_nRounds; ++rnd)


=====================================
round/opextract.cc
=====================================
@@ -0,0 +1,20 @@
+//#define XERR
+#include "round.ih"
+
+std::istream &operator>>(std::istream &in, Round &round)
+{
+    string specification;
+    in >> specification;
+
+    if (specification == "none")
+        round.d_age = END_AGE;
+    else
+    {
+        istringstream inStr{ specification };
+        if (not (inStr >> round.d_age))
+            in.setstate(ios::failbit);
+    }
+
+    return in;
+}
+


=====================================
round/round.h
=====================================
@@ -23,6 +23,8 @@ class Round
 
         bool add(uint16_t idx);
 
+        bool none() const;                      // true: none was specified;
+
         double age() const;
         uint16_t rndAge() const;                // rounded double age value
 
@@ -35,6 +37,11 @@ class Round
         std::ostream &insert(std::ostream &out) const;
 };
 
+inline bool Round::none() const
+{
+    return d_age == END_AGE;
+}
+
 inline Round::Round(StringVect const &modalityIDs)
 :
     d_modalityIDs(modalityIDs)
@@ -60,12 +67,6 @@ inline uint16_t Round::rndAge() const
     return round(d_age);
 }
 
-
-inline std::istream &operator>>(std::istream &in, Round &round)
-{
-    return in >> round.d_age;
-}
-
 inline std::ostream &operator<<(std::ostream &out, Round const &round)
 {
     return round.insert(out);


=====================================
round/round.ih
=====================================
@@ -3,6 +3,7 @@
 
 #include <algorithm>
 #include <ostream>
+#include <sstream>
 
 using namespace std;
 


=====================================
screening/addround.cc
=====================================
@@ -1,19 +1,28 @@
 //#define XERR
 #include "screening.ih"
 
-void Screening::addRound(LineInfo const &lineInfo)
+    // false: round: none was specified
+    // true: round: age modality/ties was specified
+
+bool Screening::addRound(LineInfo *noneLine, LineInfo const &lineInfo)
 {
     Round round(d_modalities.modalityIDs());
 
     auto in = Parser::extract(lineInfo, round);   // extracts the age
 
+    if (round.none())
+    {
+        *noneLine = lineInfo;               // save the last round: none line
+        return false;
+    }
+
     if (not in)
-        return;
+        return true;
 
     if (not increasingAge(round))
     {
         Err::msg(Err::ROUND_AGES_DONT_INC) << endl;
-        return;
+        return true;
     }
 
     string modality;
@@ -32,8 +41,9 @@ void Screening::addRound(LineInfo const &lineInfo)
         }
 
         Err::msg(context) << endl;
-        return;
+        return true;
     }
 
     d_roundVect.push_back(move(round));
+    return true;
 }


=====================================
screening/screening.h
=====================================
@@ -17,6 +17,10 @@
 //     round:     70  Mammo 
 //     round:     72  Mammo 
 //     round:     74  Mammo 
+
+//                              alternatively:
+//      round:  none
+
 // 
 //     # screening         value
 //     attendanceRate:     .8
@@ -61,7 +65,10 @@ class Screening
         void setAttendanceRate();
 
         void setRounds();
-        void addRound(LineInfo const &line);
+                                            // false: round: none, noneLine
+                                            // has the last noneLine
+        bool addRound(LineInfo *noneLine, LineInfo const &line);
+
         bool increasingAge(Round const &round) const;
 
         static double beir7Err(Round const &round, uint16_t idx, double beta, 


=====================================
screening/setrounds.cc
=====================================
@@ -7,12 +7,21 @@ void Screening::setRounds()
 
     auto lines = Parser::any(d_base);
 
+    bool useRounds = true;
+    LineInfo noneLine;
+
     while (true)
     {
         LineInfo const *line = lines.get(); 
         if (line == 0)
             break;
         
-        addRound(*line);
+        useRounds = addRound(&noneLine, *line) and useRounds;
+    }
+
+    if (d_roundVect.size() and not useRounds)
+    {
+        Err::reset(noneLine);
+        Err::msg(Err::ROUND_NONE) << noneLine.txt << endl;
     }
 }


=====================================
stdconfig/simrisc
=====================================
@@ -72,6 +72,11 @@ Screening:
 
     # round: age    space separated modalities. 
     # subsequent ages must exceed the last age by at least 1
+    # instead of specifying screening rounds by age it's also
+    # possible to use a single
+    #   round: none
+    # specification, in which case no screening rounds are used.
+
     round:     50  Mammo 
     round:     52  Mammo 
     round:     54  Mammo 



View it on GitLab: https://salsa.debian.org/med-team/simrisc/-/compare/018e87c374a3fa4ca25b9d6f2f2658b08f4cda48...4f0f77c1159cdac6510815978f2b3828ae661d05

-- 
View it on GitLab: https://salsa.debian.org/med-team/simrisc/-/compare/018e87c374a3fa4ca25b9d6f2f2658b08f4cda48...4f0f77c1159cdac6510815978f2b3828ae661d05
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/20210221/e3347be2/attachment-0001.htm>


More information about the debian-med-commit mailing list