src/ModelSelectivities.cpp
dvar_vector SelFcns::nonparametric(dvector& z, dvar_vector& params, int idZ){
    RETURN_ARRAYS_INCREMENT();
    if (debug) cout<<"Starting SelFcns::nonparametric(...)"<<endl;
    dvariable n; n.initialize();
    dvar_vector s(z.indexmin(),z.indexmax()); s.initialize();
    s = 1.0/(1.0+mfexp(-params));//unnormalized
    if (idZ>0) s *= (1.0+mfexp(-params[idZ]));//normalized to 1
    if (debug) cout<<"Finished SelFcns::nonparametric(...)"<<endl;
    RETURN_ARRAYS_DECREMENT();
    return s;
}
/**
 * Calculates "nonparametric" selectivity function with smoothness imposed
 * on the resulting curve by way of penalties in the objective function.
 * Inputs:
 * @param z      - dvector of sizes at which to compute function values
 * @param params - dvar_vector of function parameters, 1 for each size bin
 * @param idZ    - index at which function = 1 (i.e., fully-selected size) [int]
 * 
 * @return - selectivity function values as dvar_vector
 */
Calculates "nonparametric" selectivity function with smoothness imposed
on the resulting curve by way of penalties in the objective function.
Inputs:
@param z      - dvector of sizes at which to compute function values
@param params - dvar_vector of function parameters, 1 for each size bin
@param idZ    - index at which function = 1  [int]

@return - selectivity function values as dvar_vector
Calculates " nonparametric " selectivity function with smoothness imposed on the resulting curve by way of penalties in the objective function . Inputs : @param z - dvector of sizes at which to compute function values @param params - dvar_vector of function parameters 1 for each size bin @param idZ - index at which function = 1 [ int ] @return - selectivity function values as dvar_vector
dvar_vector SelFcns::nonparametric(dvector& z, dvar_vector& params, int idZ){
    RETURN_ARRAYS_INCREMENT();
    if (debug) cout<<"Starting SelFcns::nonparametric(...)"<<endl;
    dvariable n; n.initialize();
    dvar_vector s(z.indexmin(),z.indexmax()); s.initialize();
    s = 1.0/(1.0+mfexp(-params));
    if (idZ>0) s *= (1.0+mfexp(-params[idZ]));
    if (debug) cout<<"Finished SelFcns::nonparametric(...)"<<endl;
    RETURN_ARRAYS_DECREMENT();
    return s;
}
dvar_vector SelFcns :: nonparametric ( dvector & z , dvar_vector & params , int idZ ) { RETURN_ARRAYS_INCREMENT ( ) ; if ( debug ) cout << " " << endl ; dvariable n ; n . initialize ( ) ; dvar_vector s ( z . indexmin ( ) , z . indexmax ( ) ) ; s . initialize ( ) ; s = 1.0 / ( 1.0 + mfexp ( - params ) ) ; if ( idZ > 0 ) s *= ( 1.0 + mfexp ( - params [ idZ ] ) ) ; if ( debug ) cout << " " << endl ; RETURN_ARRAYS_DECREMENT ( ) ; return s ; }
Calculates "nonparametric" selectivity function with smoothness imposed
 on the resulting curve by way of penalties in the objective function.
Calculates " nonparametric " selectivity function with smoothness imposed on the resulting curve by way of penalties in the objective function .
//unnormalized //normalized to 1