vector<double>yref(y,y+par.dim);///........??? Vector references figure out a way to assign data in array to reference of vector double without copy. If necessary create reference inside params which is prepared once in the begining and then points to the correct location in memory
vector<double>dydxref(dydx,dydx+par.dim);// Same here!!!!
//This function basicly servers the same purpose as (!isfinite()), but since the c++ standards do NOT demand compilers to handle "not numbers" when optimized (thus rendering functions like isfinite(),isnan(),etc... useless) we decided to build our own