src/ModelParameterInfoTypes.cpp
void NumberInfo::writeToR1(ostream& os){
    os<<"label='"<<label<<qt<<cc;
    os<<"scaleType='"<<tcsam::getScaleType(scaleType)<<qt<<cc;
    os<<"initVal="<<initVal<<cc;
    os<<"finalVal="<<finlVal<<cc;
    os<<"phase="<<phase<<cc;
    os<<"resample="<<qt<<wts::getOnOffType(resample)<<qt<<cc;
    os<<"priorWgt="<<priorWgt<<cc;
    os<<"pdfType=list(type='"<<priorType<<"',";
    if (pMPI->getNumParams()) {
        int N=pMPI->getNumParams();
        adstring_array names=pMPI->getNamesForParams();
        os<<"params=list("; for(int n=1;n<N;n++) os<<names(n)<<"="<<priorParams(n)<<",";os<<names(N)<<"="<<priorParams(N)<<"),";
    } else {os<<"params=NULL,";}
    if (pMPI->getNumConsts()) {
        int N=pMPI->getNumConsts();
        adstring_array names=pMPI->getNamesForConsts();
        os<<"consts=list("; for(int n=1;n<N;n++) os<<names(n)<<"="<<priorConsts(n)<<",";os<<names(N)<<"="<<priorConsts(N)<<")";
    } else {os<<"consts=NULL)";}
}
/**
 * Writes the parameter info to an output stream as members of an R list.
 * 
 * @param os - the output stream object, by reference
 */
Writes the parameter info to an output stream as members of an R list.

@param os - the output stream object, by reference
Writes the parameter info to an output stream as members of an R list . @param os - the output stream object by reference
void NumberInfo::writeToR1(ostream& os){
    os<<"label='"<<label<<qt<<cc;
    os<<"scaleType='"<<tcsam::getScaleType(scaleType)<<qt<<cc;
    os<<"initVal="<<initVal<<cc;
    os<<"finalVal="<<finlVal<<cc;
    os<<"phase="<<phase<<cc;
    os<<"resample="<<qt<<wts::getOnOffType(resample)<<qt<<cc;
    os<<"priorWgt="<<priorWgt<<cc;
    os<<"pdfType=list(type='"<<priorType<<"',";
    if (pMPI->getNumParams()) {
        int N=pMPI->getNumParams();
        adstring_array names=pMPI->getNamesForParams();
        os<<"params=list("; for(int n=1;n<N;n++) os<<names(n)<<"="<<priorParams(n)<<",";os<<names(N)<<"="<<priorParams(N)<<"),";
    } else {os<<"params=NULL,";}
    if (pMPI->getNumConsts()) {
        int N=pMPI->getNumConsts();
        adstring_array names=pMPI->getNamesForConsts();
        os<<"consts=list("; for(int n=1;n<N;n++) os<<names(n)<<"="<<priorConsts(n)<<",";os<<names(N)<<"="<<priorConsts(N)<<")";
    } else {os<<"consts=NULL)";}
}
void NumberInfo :: writeToR1 ( ostream & os ) { os << " " << label << qt << cc ; os << " " << tcsam :: getScaleType ( scaleType ) << qt << cc ; os << " " << initVal << cc ; os << " " << finlVal << cc ; os << " " << phase << cc ; os << " " << qt << wts :: getOnOffType ( resample ) << qt << cc ; os << " " << priorWgt << cc ; os << " " << priorType << " " ; if ( pMPI -> getNumParams ( ) ) { int N = pMPI -> getNumParams ( ) ; adstring_array names = pMPI -> getNamesForParams ( ) ; os << " " ; for ( int n = 1 ; n < N ; n ++ ) os << names ( n ) << " " << priorParams ( n ) << " " ; os << names ( N ) << " " << priorParams ( N ) << " " ; } else { os << " " ; } if ( pMPI -> getNumConsts ( ) ) { int N = pMPI -> getNumConsts ( ) ; adstring_array names = pMPI -> getNamesForConsts ( ) ; os << " " ; for ( int n = 1 ; n < N ; n ++ ) os << names ( n ) << " " << priorConsts ( n ) << " " ; os << names ( N ) << " " << priorConsts ( N ) << " " ; } else { os << " " ; } }
Writes the parameter info to an output stream as members of an R list.
Writes the parameter info to an output stream as members of an R list .