Ejemplo n.º 1
0
func Qawf(f *gogsl.GslFunction, a float64, epsabs float64, limit int, workspace *GslIntegrationWorkspace, cycleWorkspace *GslIntegrationWorkspace, wf *GslIntegrationQawoTable) (int32, float64, float64) {
	var _outptr_7 C.double
	var _outptr_8 C.double
	gogsl.InitializeGslFunction(f)
	_result := int32(C.gsl_integration_qawf((*C.gsl_function)(unsafe.Pointer(f.CPtr())), C.double(a), C.double(epsabs), C.size_t(limit), (*C.gsl_integration_workspace)(unsafe.Pointer(workspace.Ptr())), (*C.gsl_integration_workspace)(unsafe.Pointer(cycleWorkspace.Ptr())), (*C.gsl_integration_qawo_table)(unsafe.Pointer(wf.Ptr())), &_outptr_7, &_outptr_8))
	return _result, *(*float64)(unsafe.Pointer(&_outptr_7)), *(*float64)(unsafe.Pointer(&_outptr_8))
}
Ejemplo n.º 2
0
func Backward(f *gogsl.GslFunction, x float64, h float64) (int32, float64, float64) {
	var _outptr_3 C.double
	var _outptr_4 C.double
	gogsl.InitializeGslFunction(f)
	_result := int32(C.gsl_deriv_backward((*C.gsl_function)(unsafe.Pointer(f.CPtr())), C.double(x), C.double(h), &_outptr_3, &_outptr_4))
	return _result, *(*float64)(unsafe.Pointer(&_outptr_3)), *(*float64)(unsafe.Pointer(&_outptr_4))
}
Ejemplo n.º 3
0
func Qawc(f *gogsl.GslFunction, a float64, b float64, c float64, epsabs float64, epsrel float64, limit int, workspace *GslIntegrationWorkspace) (int32, float64, float64) {
	var _outptr_8 C.double
	var _outptr_9 C.double
	gogsl.InitializeGslFunction(f)
	_result := int32(C.gsl_integration_qawc((*C.gsl_function)(unsafe.Pointer(f.CPtr())), C.double(a), C.double(b), C.double(c), C.double(epsabs), C.double(epsrel), C.size_t(limit), (*C.gsl_integration_workspace)(unsafe.Pointer(workspace.Ptr())), &_outptr_8, &_outptr_9))
	return _result, *(*float64)(unsafe.Pointer(&_outptr_8)), *(*float64)(unsafe.Pointer(&_outptr_9))
}
Ejemplo n.º 4
0
func Qagp(f *gogsl.GslFunction, pts []float64, npts int, epsabs float64, epsrel float64, limit int, workspace *GslIntegrationWorkspace) (int32, float64, float64) {
	var _outptr_7 C.double
	var _outptr_8 C.double
	gogsl.InitializeGslFunction(f)
	_slice_header_1 := (*reflect.SliceHeader)(unsafe.Pointer(&pts))
	_result := int32(C.gsl_integration_qagp((*C.gsl_function)(unsafe.Pointer(f.CPtr())), (*C.double)(unsafe.Pointer(_slice_header_1.Data)), C.size_t(npts), C.double(epsabs), C.double(epsrel), C.size_t(limit), (*C.gsl_integration_workspace)(unsafe.Pointer(workspace.Ptr())), &_outptr_7, &_outptr_8))
	return _result, *(*float64)(unsafe.Pointer(&_outptr_7)), *(*float64)(unsafe.Pointer(&_outptr_8))
}
Ejemplo n.º 5
0
func Qng(f *gogsl.GslFunction, a float64, b float64, epsabs float64, epsrel float64) (int32, float64, float64, int) {
	var _outptr_5 C.double
	var _outptr_6 C.double
	var _outptr_7 C.size_t
	gogsl.InitializeGslFunction(f)
	_result := int32(C.gsl_integration_qng((*C.gsl_function)(unsafe.Pointer(f.CPtr())), C.double(a), C.double(b), C.double(epsabs), C.double(epsrel), &_outptr_5, &_outptr_6, &_outptr_7))
	return _result, *(*float64)(unsafe.Pointer(&_outptr_5)), *(*float64)(unsafe.Pointer(&_outptr_6)), *(*int)(unsafe.Pointer(&_outptr_7))
}
Ejemplo n.º 6
0
func Cquad(f *gogsl.GslFunction, a float64, b float64, epsabs float64, epsrel float64, workspace *GslIntegrationCquadWorkspace) (int32, float64, float64, int) {
	var _outptr_6 C.double
	var _outptr_7 C.double
	var _outptr_8 C.size_t
	gogsl.InitializeGslFunction(f)
	_result := int32(C.gsl_integration_cquad((*C.gsl_function)(unsafe.Pointer(f.CPtr())), C.double(a), C.double(b), C.double(epsabs), C.double(epsrel), (*C.gsl_integration_cquad_workspace)(unsafe.Pointer(workspace.Ptr())), &_outptr_6, &_outptr_7, &_outptr_8))
	return _result, *(*float64)(unsafe.Pointer(&_outptr_6)), *(*float64)(unsafe.Pointer(&_outptr_7)), *(*int)(unsafe.Pointer(&_outptr_8))
}
Ejemplo n.º 7
0
Archivo: root.go Proyecto: dtromb/gogsl
func FsolverSet(s *GslRootFsolver, f *gogsl.GslFunction, xLower float64, xUpper float64) int32 {
	gogsl.InitializeGslFunction(f)
	return int32(C.gsl_root_fsolver_set((*C.gsl_root_fsolver)(unsafe.Pointer(s.Ptr())), (*C.gsl_function)(unsafe.Pointer(f.CPtr())), C.double(xLower), C.double(xUpper)))
}
Ejemplo n.º 8
0
func Init(cs *GslChebSeries, f *gogsl.GslFunction, a float64, b float64) int32 {
	gogsl.InitializeGslFunction(f)
	return int32(C.gsl_cheb_init((*C.gsl_cheb_series)(unsafe.Pointer(cs.Ptr())), (*C.gsl_function)(unsafe.Pointer(f.CPtr())), C.double(a), C.double(b)))
}
Ejemplo n.º 9
0
func Glfixed(f *gogsl.GslFunction, a float64, b float64, t *GslIntegrationGlfixedTable) float64 {
	gogsl.InitializeGslFunction(f)
	return float64(C.gsl_integration_glfixed((*C.gsl_function)(unsafe.Pointer(f.CPtr())), C.double(a), C.double(b), (*C.gsl_integration_glfixed_table)(unsafe.Pointer(t.Ptr()))))
}
Ejemplo n.º 10
0
Archivo: min.go Proyecto: dtromb/gogsl
func FminimizerSetWithValues(s *GslMinFminimizer, f *gogsl.GslFunction, xMinimum float64, fMinimum float64, xLower float64, fLower float64, xUpper float64, fUpper float64) int32 {
	gogsl.InitializeGslFunction(f)
	return int32(C.gsl_min_fminimizer_set_with_values((*C.gsl_min_fminimizer)(unsafe.Pointer(s.Ptr())), (*C.gsl_function)(unsafe.Pointer(f.CPtr())), C.double(xMinimum), C.double(fMinimum), C.double(xLower), C.double(fLower), C.double(xUpper), C.double(fUpper)))
}