Added Jacobian c++ function