src/ModelParameterInfoTypes.cpp
double NumberInfo::calcParamScaleVal(double x){
    if (debug) rpt::echo<<"starting NumberInfo::calcParamScaleVal(double&) "<<this<<endl;
    double y,z;
    switch (scaleType){
        case tcsam::SCALE_ARITHM:
            z = x;
            break;
        case tcsam::SCALE_LOG:
            z = log(x);//on log scale
            break;
        case tcsam::SCALE_LOGIT:
            z = log(x/(1.0-x));//on logit scale
            break;
        default:
            cout<<"NumberInfo::calcParamScaleVal(double) "<<this<<endl;
            cout<<"Parameter scale type "<<scaleType<<" not recognized for NumberInfo!!"<<endl;
            ad_exit(1);
            break;
    }
    if (debug) rpt::echo<<"finished BoundedNumberInfo::calcParamScaleVal(double&) "<<this<<endl;
    return z;
}
/**
 * Calculate parameter-scale value corresponding to given arithmetic-scale value.
 * 
 * @param x - arithmetic-scale value
 * @return - parameter-scale value
 */
Calculate parameter-scale value corresponding to given arithmetic-scale value.

@param x - arithmetic-scale value
@return - parameter-scale value
Calculate parameter - scale value corresponding to given arithmetic - scale value . @param x - arithmetic - scale value @return - parameter - scale value
double NumberInfo::calcParamScaleVal(double x){
    if (debug) rpt::echo<<"starting NumberInfo::calcParamScaleVal(double&) "<<this<<endl;
    double y,z;
    switch (scaleType){
        case tcsam::SCALE_ARITHM:
            z = x;
            break;
        case tcsam::SCALE_LOG:
            z = log(x);
            break;
        case tcsam::SCALE_LOGIT:
            z = log(x/(1.0-x));
            break;
        default:
            cout<<"NumberInfo::calcParamScaleVal(double) "<<this<<endl;
            cout<<"Parameter scale type "<<scaleType<<" not recognized for NumberInfo!!"<<endl;
            ad_exit(1);
            break;
    }
    if (debug) rpt::echo<<"finished BoundedNumberInfo::calcParamScaleVal(double&) "<<this<<endl;
    return z;
}
double NumberInfo :: calcParamScaleVal ( double x ) { if ( debug ) rpt :: echo << " " << this << endl ; double y , z ; switch ( scaleType ) { case tcsam :: SCALE_ARITHM : z = x ; break ; case tcsam :: SCALE_LOG : z = log ( x ) ; break ; case tcsam :: SCALE_LOGIT : z = log ( x / ( 1.0 - x ) ) ; break ; default : cout << " " << this << endl ; cout << " " << scaleType << " " << endl ; ad_exit ( 1 ) ; break ; } if ( debug ) rpt :: echo << " " << this << endl ; return z ; }
Calculate parameter-scale value corresponding to given arithmetic-scale value.
Calculate parameter - scale value corresponding to given arithmetic - scale value .
//on log scale //on logit scale