File: tableparams.h

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 (36 lines) | stat: -rw-r--r-- 906 bytes parent folder | download | duplicates (2)
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
#ifndef INCLUDED_TABLEPARAMS_
#define INCLUDED_TABLEPARAMS_

// the Parser has already confirmed that 'riskTable:' was used
// (cf. incidence/setincidence2.cc)


#include "../params/params.h"
#include "../typedefs/typedefs.h"

class TableParams: public Params
{
    bool d_error;
    Double2Vect d_riskTable;        // first: age, second: cumprob for age

    public:
        TableParams(StringVect &base, size_t idx, bool setProb);

    private:
        void fillRiskTable(StringVect &base);
        bool appendPair(std::string const &line);
        void checkTable();
        void checkIncreasing();
        static double linear(double age, 
                        DoublePair const &from, DoublePair const &to);

        void v_cptTumorRisk(DoubleVect &ageValues) override;
        void v_vary(std::ostream &out) override;
        void v_writeParameters(std::ostream &out) const;

};
        
#endif