first complete draft of getValueGradient(double[] buffer) in MLNNO