本文整理匯總了Golang中github.com/dtromb/gogsl.GslFunction類的典型用法代碼示例。如果您正苦於以下問題:Golang GslFunction類的具體用法?Golang GslFunction怎麽用?Golang GslFunction使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了GslFunction類的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: Qawf
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))
}
示例2: Backward
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))
}
示例3: Qawc
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))
}
示例4: Qagp
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))
}
示例5: Qng
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))
}
示例6: Cquad
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))
}
示例7: FsolverSet
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)))
}
示例8: Init
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)))
}
示例9: Glfixed
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()))))
}
示例10: FminimizerSetWithValues
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)))
}