// Integrate evaluates the integral of the spline from lo to hi. // If this put it out of bounds, x // If x is out of bounds, the code will panic. func (s *Spline) Integrate(lo, hi float64) (float64, error) { var y C.double ret := C.gsl_spline_eval_integ_e(s.sp, C.double(lo), C.double(hi), s.acc, &y) if ret != 0 { return float64(y), gsl.Errno(ret) } return float64(y), nil }
func SplineEvalIntegE(spline *GslSpline, a float64, b float64, acc *GslInterpAccel) (int32, float64) { var _outptr_4 C.double _result := int32(C.gsl_spline_eval_integ_e((*C.gsl_spline)(unsafe.Pointer(spline.Ptr())), C.double(a), C.double(b), (*C.gsl_interp_accel)(unsafe.Pointer(acc.Ptr())), &_outptr_4)) return _result, *(*float64)(unsafe.Pointer(&_outptr_4)) }