//#define XERR
#include "incidence.ih"

void Incidence::setCarrier(size_t idx)
{
    StringVect base{ "Tumor:", "Incidence:", s_carrier[idx], "probability:" };

    Params params( idx );

    bool ok = Parser::proportion(base, params.d_prob);

    base.back() = "stdDev:";
    ok = Parser::positive(base, params.d_stdDev) and ok;

    base.back() = "lifetimeRisk:";

    ok = Parser::one(base, params.d_vsd[0]) and ok;

    base.back() = "meanAge:";

    ok = Parser::one(base, params.d_vsd[1]) and ok;

    if (ok)
        d_params.push_back(params);
}







