I have a function which returns an std::vector. It is a 1 dimensional simulated spectrum (x,y) which I fit to a measured spectrum. The simplex method works well but I would like to try it with gradients for better error estimation. I could not get the migrad calculate (segmentation fault) the numerical gradients so I would like to feed the numerical gradient myself. I tried to implement it as FCNGradientBase class but I get an error message that my_new_gradient_class cannot be converted to FCNGradientBase. Does The FCNGradientBase class have to have the FCNBase function repeated in it or it is enough to “include” it amnog the includes. My numerical gradient functions is very similar to the one among the examples MnTutorials/QUAD4F.h but I am returning again std::vector containing the gradient of the spectrum. Can you return vectors in FCNBase and FCNGradientBase classes or in the function to be minimized?