src/ModelParameterInfoTypes.cpp
dvar_vector BoundedVectorInfo::calcLogPrior(dvar_vector & pv){
    RETURN_ARRAYS_INCREMENT();
    if (debug) rpt::echo<<"starting BoundedVectorInfo::calcLogPrior(pv) for "<<name<<endl;
    dvar_vector lps;
    if (pMPI->canCalcLogPDF(pv)) {
        lps = pMPI->calcLogPDF(pv,priorParams,priorConsts);
    } else {
        lps.allocate(pv.indexmin(),pv.indexmax());
        lps.initialize();
        dvariable x;
        for (int i=pv.indexmin();i<=pv.indexmax();i++) {
            x = pv(i);//have to copy pv(i) )
            lps(i) = pMPI->calcLogPDF(x,priorParams,priorConsts);
        }
    }
    if (debug) {
        rpt::echo<<"logPrior: "<<lps<<endl;
        rpt::echo<<"finished BoundedVectorInfo::calcLogPriors(pv) for "<<name<<endl;
    }
    RETURN_ARRAYS_DECREMENT();
    return lps;
}
/**
 * Calculates a vector of the log-scale prior probability based on an input vector of values.
 * 
 * The input values are presumably from the associated parameter values, 
 * but should be on the "arithmetic" scale.
 * 
 * @param x - the input dvar_vector on the arithmetic scale, presumably based on the associated parameters
 * 
 * @return - the log-scale prior, as a dvar_vector
 */
Calculates a vector of the log-scale prior probability based on an input vector of values.

The input values are presumably from the associated parameter values,
but should be on the "arithmetic" scale.

@param x - the input dvar_vector on the arithmetic scale, presumably based on the associated parameters

@return - the log-scale prior, as a dvar_vector
Calculates a vector of the log - scale prior probability based on an input vector of values . The input values are presumably from the associated parameter values but should be on the " arithmetic " scale . @param x - the input dvar_vector on the arithmetic scale presumably based on the associated parameters @return - the log - scale prior as a dvar_vector
dvar_vector BoundedVectorInfo::calcLogPrior(dvar_vector & pv){
    RETURN_ARRAYS_INCREMENT();
    if (debug) rpt::echo<<"starting BoundedVectorInfo::calcLogPrior(pv) for "<<name<<endl;
    dvar_vector lps;
    if (pMPI->canCalcLogPDF(pv)) {
        lps = pMPI->calcLogPDF(pv,priorParams,priorConsts);
    } else {
        lps.allocate(pv.indexmin(),pv.indexmax());
        lps.initialize();
        dvariable x;
        for (int i=pv.indexmin();i<=pv.indexmax();i++) {
            x = pv(i);
            lps(i) = pMPI->calcLogPDF(x,priorParams,priorConsts);
        }
    }
    if (debug) {
        rpt::echo<<"logPrior: "<<lps<<endl;
        rpt::echo<<"finished BoundedVectorInfo::calcLogPriors(pv) for "<<name<<endl;
    }
    RETURN_ARRAYS_DECREMENT();
    return lps;
}
dvar_vector BoundedVectorInfo :: calcLogPrior ( dvar_vector & pv ) { RETURN_ARRAYS_INCREMENT ( ) ; if ( debug ) rpt :: echo << " " << name << endl ; dvar_vector lps ; if ( pMPI -> canCalcLogPDF ( pv ) ) { lps = pMPI -> calcLogPDF ( pv , priorParams , priorConsts ) ; } else { lps . allocate ( pv . indexmin ( ) , pv . indexmax ( ) ) ; lps . initialize ( ) ; dvariable x ; for ( int i = pv . indexmin ( ) ; i <= pv . indexmax ( ) ; i ++ ) { x = pv ( i ) ; lps ( i ) = pMPI -> calcLogPDF ( x , priorParams , priorConsts ) ; } } if ( debug ) { rpt :: echo << " " << lps << endl ; rpt :: echo << " " << name << endl ; } RETURN_ARRAYS_DECREMENT ( ) ; return lps ; }
Calculates a vector of the log-scale prior probability based on an input vector of values.
Calculates a vector of the log - scale prior probability based on an input vector of values .
//have to copy pv(i) )