using function pointers in both EnergyFunctions.h and LevenburgMaquart.h