本文整理匯總了Golang中github.com/dtromb/gogsl/vector.GslVector類的典型用法代碼示例。如果您正苦於以下問題:Golang GslVector類的具體用法?Golang GslVector怎麽用?Golang GslVector使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了GslVector類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: LURefine
func LURefine(a *matrix.GslMatrix, lU *matrix.GslMatrix, p *permutation.GslPermutation, b *vector.GslVector, x *vector.GslVector, residual *vector.GslVector) int32 {
return int32(C.gsl_linalg_LU_refine((*C.gsl_matrix)(unsafe.Pointer(a.Ptr())), (*C.gsl_matrix)(unsafe.Pointer(lU.Ptr())), (*C.gsl_permutation)(unsafe.Pointer(p.Ptr())), (*C.gsl_vector)(unsafe.Pointer(b.Ptr())), (*C.gsl_vector)(unsafe.Pointer(x.Ptr())), (*C.gsl_vector)(unsafe.Pointer(residual.Ptr()))))
}
示例2: SortVector2
func SortVector2(v1 *vector.GslVector, v2 *vector.GslVector) {
C.gsl_sort_vector2((*C.gsl_vector)(unsafe.Pointer(v1.Ptr())), (*C.gsl_vector)(unsafe.Pointer(v2.Ptr())))
}
示例3: SortVectorLargest
func SortVectorLargest(dest []float64, k int, v *vector.GslVector) int32 {
_slice_header_0 := (*reflect.SliceHeader)(unsafe.Pointer(&dest))
return int32(C.gsl_sort_vector_largest((*C.double)(unsafe.Pointer(_slice_header_0.Data)), C.size_t(k), (*C.gsl_vector)(unsafe.Pointer(v.Ptr()))))
}
示例4: TestDelta
func TestDelta(dx *vector.GslVector, x *vector.GslVector, epsabs float64, epsrel float64) int32 {
return int32(C.gsl_multiroot_test_delta((*C.gsl_vector)(unsafe.Pointer(dx.Ptr())), (*C.gsl_vector)(unsafe.Pointer(x.Ptr())), C.double(epsabs), C.double(epsrel)))
}
示例5: FdfsolverSet
func FdfsolverSet(s *GslMultirootFdfsolver, fdf *GslMultirootFunctionFdf, x *vector.GslVector) int32 {
return int32(C.gsl_multiroot_fdfsolver_set((*C.gsl_multiroot_fdfsolver)(unsafe.Pointer(s.Ptr())), (*C.gsl_multiroot_function_fdf)(unsafe.Pointer(fdf.CPtr())), (*C.gsl_vector)(unsafe.Pointer(x.Ptr()))))
}
示例6: GslMultifitWlinearUsvd
func GslMultifitWlinearUsvd(x *matrix.GslMatrix, w *vector.GslVector, y *vector.GslVector, tol float64, c *vector.GslVector, cov *matrix.GslMatrix, work *GslMultifitLinearWorkspace) (int32, int, float64) {
var _outptr_4 C.size_t
var _outptr_7 C.double
_result := int32(C.gsl_multifit_wlinear_usvd((*C.gsl_matrix)(unsafe.Pointer(x.Ptr())), (*C.gsl_vector)(unsafe.Pointer(w.Ptr())), (*C.gsl_vector)(unsafe.Pointer(y.Ptr())), C.double(tol), &_outptr_4, (*C.gsl_vector)(unsafe.Pointer(c.Ptr())), (*C.gsl_matrix)(unsafe.Pointer(cov.Ptr())), &_outptr_7, (*C.gsl_multifit_linear_workspace)(unsafe.Pointer(work.Ptr()))))
return _result, *(*int)(unsafe.Pointer(&_outptr_4)), *(*float64)(unsafe.Pointer(&_outptr_7))
}
示例7: GslMultifitRobust
func GslMultifitRobust(x *matrix.GslMatrix, y *vector.GslVector, c *vector.GslVector, cov *matrix.GslMatrix, w *GslMultifitRobustWorkspace) int32 {
return int32(C.gsl_multifit_robust((*C.gsl_matrix)(unsafe.Pointer(x.Ptr())), (*C.gsl_vector)(unsafe.Pointer(y.Ptr())), (*C.gsl_vector)(unsafe.Pointer(c.Ptr())), (*C.gsl_matrix)(unsafe.Pointer(cov.Ptr())), (*C.gsl_multifit_robust_workspace)(unsafe.Pointer(w.Ptr()))))
}
示例8: Daxpy
func Daxpy(alpha float64, x *vector.GslVector, y *vector.GslVector) int32 {
return int32(C.gsl_blas_daxpy(C.double(alpha), (*C.gsl_vector)(unsafe.Pointer(x.Ptr())), (*C.gsl_vector)(unsafe.Pointer(y.Ptr()))))
}
示例9: Dscal
func Dscal(alpha float64, x *vector.GslVector) {
C.gsl_blas_dscal(C.double(alpha), (*C.gsl_vector)(unsafe.Pointer(x.Ptr())))
}
示例10: Idamax
func Idamax(x *vector.GslVector) Index {
return Index(C.gsl_blas_idamax((*C.gsl_vector)(unsafe.Pointer(x.Ptr()))))
}
示例11: Dcopy
func Dcopy(x *vector.GslVector, y *vector.GslVector) int32 {
return int32(C.gsl_blas_dcopy((*C.gsl_vector)(unsafe.Pointer(x.Ptr())), (*C.gsl_vector)(unsafe.Pointer(y.Ptr()))))
}
示例12: QRLssolve
func QRLssolve(qR *matrix.GslMatrix, tau *vector.GslVector, b *vector.GslVector, x *vector.GslVector, residual *vector.GslVector) int32 {
return int32(C.gsl_linalg_QR_lssolve((*C.gsl_matrix)(unsafe.Pointer(qR.Ptr())), (*C.gsl_vector)(unsafe.Pointer(tau.Ptr())), (*C.gsl_vector)(unsafe.Pointer(b.Ptr())), (*C.gsl_vector)(unsafe.Pointer(x.Ptr())), (*C.gsl_vector)(unsafe.Pointer(residual.Ptr()))))
}
示例13: QRSvx
func QRSvx(qR *matrix.GslMatrix, tau *vector.GslVector, x *vector.GslVector) int32 {
return int32(C.gsl_linalg_QR_svx((*C.gsl_matrix)(unsafe.Pointer(qR.Ptr())), (*C.gsl_vector)(unsafe.Pointer(tau.Ptr())), (*C.gsl_vector)(unsafe.Pointer(x.Ptr()))))
}
示例14: QRDecomp
func QRDecomp(a *matrix.GslMatrix, tau *vector.GslVector) int32 {
return int32(C.gsl_linalg_QR_decomp((*C.gsl_matrix)(unsafe.Pointer(a.Ptr())), (*C.gsl_vector)(unsafe.Pointer(tau.Ptr()))))
}
示例15: Dasum
func Dasum(x *vector.GslVector) float64 {
return float64(C.gsl_blas_dasum((*C.gsl_vector)(unsafe.Pointer(x.Ptr()))))
}