コード例 #1
0
void init_mass_FDF (double X, void * sim_params,  double * f, double * df) {
	Strategy * p = ( Strategy * ) sim_params;
	*f = p->TotalMass(X) - p->offspring_mass();
	*df = p->dTotalMass_dm(X) * 1.0;
}
コード例 #2
0
double init_mass_dF(double X, void *sim_params) {
	Strategy * p = ( Strategy * ) sim_params;
	return p->dTotalMass_dm(X) * 1.0;
}