src/ModelParameterInfoTypes.cpp
dvector BoundedVectorInfo::calcArithScaleVals(const dvector& x){
    if (debug) rpt::echo<<"starting BoundedVectorInfo::calcArithScaleVal(dvector&) "<<this<<endl;
    dvector z(x.indexmin(),x.indexmax());
    switch (scaleType){
        case tcsam::SCALE_ARITHM:
            z = x;
            break;
        case tcsam::SCALE_LOG:
            z = mfexp(x);
            break;
        case tcsam::SCALE_LOGIT:
            z = lower+(upper-lower)/(1.0+mfexp(-1.0*x));
            break;
        default:
            cout<<"BoundedVectorInfo::calcArithScaleVal(dvector&) "<<this<<endl;
            cout<<"Parameter scale type "<<scaleType<<" not recognized!!"<<endl;
            ad_exit(1);
            break;
    }
    if (debug) rpt::echo<<"finished BoundedVectorInfo::calcArithScaleVal(dvector&) "<<this<<endl;
    return z;
}
/**
 * Calculates arithmetic-scale values corresponding to the input parameter-scale values.
 * 
 * @param x - parameter-scale values as a dvector
 * @return - arithmetic-scale values as a dvector
 */
Calculates arithmetic-scale values corresponding to the input parameter-scale values.

@param x - parameter-scale values as a dvector
@return - arithmetic-scale values as a dvector
Calculates arithmetic - scale values corresponding to the input parameter - scale values . @param x - parameter - scale values as a dvector @return - arithmetic - scale values as a dvector
dvector BoundedVectorInfo::calcArithScaleVals(const dvector& x){
    if (debug) rpt::echo<<"starting BoundedVectorInfo::calcArithScaleVal(dvector&) "<<this<<endl;
    dvector z(x.indexmin(),x.indexmax());
    switch (scaleType){
        case tcsam::SCALE_ARITHM:
            z = x;
            break;
        case tcsam::SCALE_LOG:
            z = mfexp(x);
            break;
        case tcsam::SCALE_LOGIT:
            z = lower+(upper-lower)/(1.0+mfexp(-1.0*x));
            break;
        default:
            cout<<"BoundedVectorInfo::calcArithScaleVal(dvector&) "<<this<<endl;
            cout<<"Parameter scale type "<<scaleType<<" not recognized!!"<<endl;
            ad_exit(1);
            break;
    }
    if (debug) rpt::echo<<"finished BoundedVectorInfo::calcArithScaleVal(dvector&) "<<this<<endl;
    return z;
}
dvector BoundedVectorInfo :: calcArithScaleVals ( const dvector & x ) { if ( debug ) rpt :: echo << " " << this << endl ; dvector z ( x . indexmin ( ) , x . indexmax ( ) ) ; switch ( scaleType ) { case tcsam :: SCALE_ARITHM : z = x ; break ; case tcsam :: SCALE_LOG : z = mfexp ( x ) ; break ; case tcsam :: SCALE_LOGIT : z = lower + ( upper - lower ) / ( 1.0 + mfexp ( -1.0 * x ) ) ; break ; default : cout << " " << this << endl ; cout << " " << scaleType << " " << endl ; ad_exit ( 1 ) ; break ; } if ( debug ) rpt :: echo << " " << this << endl ; return z ; }
Calculates arithmetic-scale values corresponding to the input parameter-scale values.
Calculates arithmetic - scale values corresponding to the input parameter - scale values .