File: classes

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 (213 lines) | stat: -rw-r--r-- 7,832 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
    /Beir7           - handles Beir7 parameter specifications (no refresh,
    ======             because no 'value' data member)

        double beta() Beir7's beta, eta, spread and dist parameter values
        double eta()
        double spread()
        uint16_t dist()

        settings(out)   - write settings to out



    /ConfFile       - derived from Conifg, handles ConfigInfo and Options
    =========         see Config's public interface

        LineVect lines(char const *id)  - configuration file lines matching id

        const_iter end()                - end-iterator for find()
        const_iter find(char const *id) - 1st configuration file line matching
                                          id

        size_t value(char const *id)    - numeric value on the first 'id' line
                                          (0 if no 'id' line)

        ofstream settingsFile(isze_t iter)  - file to contain the settings
        ofstream dataFile(isze_t iter)      - file to contain the data
        ofstream roundsFile(isze_t iter)    - file to contain the rounds info
        ofstream sensitivityFile(isze_t iter) - file to contain the
                                                sensitivity info

    /Costs          - Costs parameters and processing
    ======

    /Densities       - Config file breast density parameters
    ==========
        DensityVect densities() - vector with density parameters:
            uint16_t  beginAge(), endAge(),
            double birads(size_t idx)

        Uint16Vect indices(Uint16Vect ages) - indices of birads to use
                                                  for each (Screening) age

    /Globals         - Fixed constants / enum values / typedefs / free
    ========           functions used by many parts of the program


    /Growth          - Tumor growth parameters
    =======
        AgeGroup group(idx)    - ageGroup[idx]:
                              uint16_t beginAge(), endAge();
                              VSD  mean(), stdDev();

        void refresh()              - random noise to selfMu and ageGroups

        VSD start()                 - start diameter
        VSD selfMu()                - self detect mu
        VSD selfSigma()             - self detect sigma

        settings(out)   - write settings to out

    /Incidence       - used by TumorInfo to store the TumorIncidence (carrier)
    ==========         info

        params() - vector of carrier parameter values
        Carrierspecifications: params() offer vector of Params:
                idx(): carrier index
                prob(): carrier probability
                risk():   VSD lifetime risk
                mean():   VSD mean age
                stdDev(): VSD std. dev.

        DoubleVect2 tumorRisk():  vector of [END_CARRIERS][END_AGE]
        DoubleVect  tumorRisk(size_t idx):  vector [idx]

        void refresh() - add random noise to the values returned by
                         VSD value()

        uint16_t carrier() - randomly selected carrier index

        settings(out)   - write settings to out

    /Loop            - perform one analysis
    =====

    /Modalities      - Config file modality parameters
    ===========
        operator[] - vector<Params>, [XRAY][MAMMO,TOMO]
                        uint16_t dose(size_t idx),
                        double   sens[size_t idx),
                        Specificity const &operator[]

        Params mammoParams()  =     [XRAY][MAMMO]
        Params tomoParams()   =     [XRAY][TOMO]

        Specificity:    uint16_t: beginAge(), endAge()
                        double:   value()

        settings(out)   - write settings to out

    /Options,        - prepare direct access of processed arguments
    =========

    /Random          - Singleton encapsulating statistical distributions
    =======
        void reset(size_t seed);

        double uniform();       - {0, 1 }: random values from their
        double normal();        - {0, 1 }  statistical distributions
        double logNormal(double mean, double stdDev);  - {0, 1 }
        double exponential(double mean);    - { 1 }

        static size_t nowSeed(); - random seed conform simrisc < V 12.00.00


    /Scenario        - Parameters for a single simulation
    =========
        RoundVect rounds()    - vector of Round sreening rounds:
                                uint16_t age(), mammo() tomo()
        Uint16Vect ages() - vector of ages of the rounds

        Round rounds(idx)    - Rounds by index
        uint16_t age(idx)   - age by idx

        bool spread()        - true: apply variations to configuration
                                            parameters

        size_t iterations();        - #iterations to perform
        size_t seed()               - intial seed
        size_t nWomen()             - #women to use
        size_t discountAge()        - discountReferenceAge

    /Screening       - Config file screening parameters
    ==========
        Spec error(), rate()  - systematicError, attendanceRate:
                                double value(), uint16_t dist()

        DoubleVect const &setRadiationRisk(
                        Scenario::RoundVect const &rounds,
                        Uint16Vect const &indices,
                        double beta, double eta)

        DoubleVect const &radiationRisk();

        void beir7dose(uint16_t const *)   - beir7 dose vector to use

        settings(out)   - write settings to out

    /Simulator       - run the analyses
    ==========
        run()       - runs the analyses for each of the Scenarios

    /Spread          - Classes supporting parameter spreading may derive from
    =======            this class for handling spreading.

        double refresh(double orgValue, double orgSpread, uint16_t distrib);

    /Survival        - interfaces to all Survival data
    =========
        VSD operator[]    - vector of survival VSD parameter values:
                                [0] = type 'a' .. [3] = type 'd'

        void refresh()          adds random noise to the vsd fields of the
                                parameters

        settings(out)   - write settings to out

    /Tumor              - Tumor handling object
    ======

        reset()             - reset the tumor's variables for the next
                              analysis.

                                            // cpt the tumor's characteristics
        void characteristics(uint16_t age); // at 'age'

        operator bool()     - true when the tumor is active

        uint16_t age()      - age at which the tumor appears
        selfDetectAge();    - age at which the tumor is self-detected


    /TumorInfo       - interface to the tumor config parameters
    ==========         (Incidence, Survival, Growth, Beir7)

        void refresh();     - optionally adds random noise to VSD values

        void cptRisk();     - compute the carrier/age risk values

        bool spread();      - true: apply variations to configuration

        Incidence incidence() - returns the Incidence (carriers) object;

        uint16_t  induction();   - beir model to use

        Beir7     beir7();      - returns the beir7 object;
        Growth    growth();     - returns the growth object;
        Survival  survival();   - returns the survival object;

        DoubleVect cumTotalRisk()   - returns the cum. total risk vector

        void cumTotalRisk(uint16_t carrierIdx,
                          DoubleVect const &radiationRisk);

    /VSD             - ValueSpreadDistribution: storage class storing a
    ====               value, spread and distribution

        extracts values from an istream

        double value()
        double spread()
        uint16_t dist()

        void refresh() - add random noise to the values returned by value()