Beispiel #1
0
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()))))
}
Beispiel #2
0
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())))
}
Beispiel #3
0
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()))))
}
Beispiel #4
0
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)))
}
Beispiel #5
0
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()))))
}
Beispiel #6
0
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))
}
Beispiel #7
0
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()))))
}
Beispiel #8
0
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()))))
}
Beispiel #9
0
func Dscal(alpha float64, x *vector.GslVector) {
	C.gsl_blas_dscal(C.double(alpha), (*C.gsl_vector)(unsafe.Pointer(x.Ptr())))
}
Beispiel #10
0
func Idamax(x *vector.GslVector) Index {
	return Index(C.gsl_blas_idamax((*C.gsl_vector)(unsafe.Pointer(x.Ptr()))))
}
Beispiel #11
0
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()))))
}
Beispiel #12
0
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()))))
}
Beispiel #13
0
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()))))
}
Beispiel #14
0
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()))))
}
Beispiel #15
0
func Dasum(x *vector.GslVector) float64 {
	return float64(C.gsl_blas_dasum((*C.gsl_vector)(unsafe.Pointer(x.Ptr()))))
}
Beispiel #16
0
func Drot(x *vector.GslVector, y *vector.GslVector, c float64, s float64) int32 {
	return int32(C.gsl_blas_drot((*C.gsl_vector)(unsafe.Pointer(x.Ptr())), (*C.gsl_vector)(unsafe.Pointer(y.Ptr())), C.double(c), C.double(s)))
}
Beispiel #17
0
func GslMultifitWlinear(x *matrix.GslMatrix, w *vector.GslVector, y *vector.GslVector, c *vector.GslVector, cov *matrix.GslMatrix, work *GslMultifitLinearWorkspace) (int32, float64) {
	var _outptr_5 C.double
	_result := int32(C.gsl_multifit_wlinear((*C.gsl_matrix)(unsafe.Pointer(x.Ptr())), (*C.gsl_vector)(unsafe.Pointer(w.Ptr())), (*C.gsl_vector)(unsafe.Pointer(y.Ptr())), (*C.gsl_vector)(unsafe.Pointer(c.Ptr())), (*C.gsl_matrix)(unsafe.Pointer(cov.Ptr())), &_outptr_5, (*C.gsl_multifit_linear_workspace)(unsafe.Pointer(work.Ptr()))))
	return _result, *(*float64)(unsafe.Pointer(&_outptr_5))
}
Beispiel #18
0
func Drotm(x *vector.GslVector, y *vector.GslVector, p []float64) int32 {
	_slice_header_2 := (*reflect.SliceHeader)(unsafe.Pointer(&p))
	return int32(C.gsl_blas_drotm((*C.gsl_vector)(unsafe.Pointer(x.Ptr())), (*C.gsl_vector)(unsafe.Pointer(y.Ptr())), (*C.double)(unsafe.Pointer(_slice_header_2.Data))))
}
Beispiel #19
0
func GslMultifitLinearResiduals(x *matrix.GslMatrix, y *vector.GslVector, c *vector.GslVector, r *vector.GslVector) int32 {
	return int32(C.gsl_multifit_linear_residuals((*C.gsl_matrix)(unsafe.Pointer(x.Ptr())), (*C.gsl_vector)(unsafe.Pointer(y.Ptr())), (*C.gsl_vector)(unsafe.Pointer(c.Ptr())), (*C.gsl_vector)(unsafe.Pointer(r.Ptr()))))
}
Beispiel #20
0
func Dgemv(transA Transpose, alpha float64, a *matrix.GslMatrix, x *vector.GslVector, beta float64, y *vector.GslVector) int32 {
	return int32(C.gsl_blas_dgemv(C.CBLAS_TRANSPOSE_t(transA), C.double(alpha), (*C.gsl_matrix)(unsafe.Pointer(a.Ptr())), (*C.gsl_vector)(unsafe.Pointer(x.Ptr())), C.double(beta), (*C.gsl_vector)(unsafe.Pointer(y.Ptr()))))
}
Beispiel #21
0
func GslMultifitRobustEst(x *vector.GslVector, c *vector.GslVector, cov *matrix.GslMatrix) (int32, float64, float64) {
	var _outptr_3 C.double
	var _outptr_4 C.double
	_result := int32(C.gsl_multifit_robust_est((*C.gsl_vector)(unsafe.Pointer(x.Ptr())), (*C.gsl_vector)(unsafe.Pointer(c.Ptr())), (*C.gsl_matrix)(unsafe.Pointer(cov.Ptr())), &_outptr_3, &_outptr_4))
	return _result, *(*float64)(unsafe.Pointer(&_outptr_3)), *(*float64)(unsafe.Pointer(&_outptr_4))
}
Beispiel #22
0
func Dtrsv(uplo Uplo, transA Transpose, diag Diag, a *matrix.GslMatrix, x *vector.GslVector) int32 {
	return int32(C.gsl_blas_dtrsv(C.CBLAS_UPLO_t(uplo), C.CBLAS_TRANSPOSE_t(transA), C.CBLAS_DIAG_t(diag), (*C.gsl_matrix)(unsafe.Pointer(a.Ptr())), (*C.gsl_vector)(unsafe.Pointer(x.Ptr()))))
}
Beispiel #23
0
func TestResidual(f *vector.GslVector, epsabs float64) int32 {
	return int32(C.gsl_multiroot_test_residual((*C.gsl_vector)(unsafe.Pointer(f.Ptr())), C.double(epsabs)))
}
Beispiel #24
0
func Dger(alpha float64, x *vector.GslVector, y *vector.GslVector, a *matrix.GslMatrix) int32 {
	return int32(C.gsl_blas_dger(C.double(alpha), (*C.gsl_vector)(unsafe.Pointer(x.Ptr())), (*C.gsl_vector)(unsafe.Pointer(y.Ptr())), (*C.gsl_matrix)(unsafe.Pointer(a.Ptr()))))
}
Beispiel #25
0
func SortVector(v *vector.GslVector) {
	C.gsl_sort_vector((*C.gsl_vector)(unsafe.Pointer(v.Ptr())))
}
Beispiel #26
0
func Ddot(x *vector.GslVector, y *vector.GslVector) (int32, float64) {
	var _outptr_2 C.double
	_result := int32(C.gsl_blas_ddot((*C.gsl_vector)(unsafe.Pointer(x.Ptr())), (*C.gsl_vector)(unsafe.Pointer(y.Ptr())), &_outptr_2))
	return _result, *(*float64)(unsafe.Pointer(&_outptr_2))
}
Beispiel #27
0
func SortVectorIndex(p *permutation.GslPermutation, v *vector.GslVector) int32 {
	return int32(C.gsl_sort_vector_index((*C.gsl_permutation)(unsafe.Pointer(p.Ptr())), (*C.gsl_vector)(unsafe.Pointer(v.Ptr()))))
}
Beispiel #28
0
func Dsyr2(uplo Uplo, alpha float64, x *vector.GslVector, y *vector.GslVector, a *matrix.GslMatrix) int32 {
	return int32(C.gsl_blas_dsyr2(C.CBLAS_UPLO_t(uplo), C.double(alpha), (*C.gsl_vector)(unsafe.Pointer(x.Ptr())), (*C.gsl_vector)(unsafe.Pointer(y.Ptr())), (*C.gsl_matrix)(unsafe.Pointer(a.Ptr()))))
}
Beispiel #29
0
func SortVectorLargestIndex(p []int, k int, v *vector.GslVector) int32 {
	_slice_header_0 := (*reflect.SliceHeader)(unsafe.Pointer(&p))
	return int32(C.gsl_sort_vector_largest_index((*C.size_t)(unsafe.Pointer(_slice_header_0.Data)), C.size_t(k), (*C.gsl_vector)(unsafe.Pointer(v.Ptr()))))
}
Beispiel #30
0
func LUSvx(lU *matrix.GslMatrix, p *permutation.GslPermutation, x *vector.GslVector) int32 {
	return int32(C.gsl_linalg_LU_svx((*C.gsl_matrix)(unsafe.Pointer(lU.Ptr())), (*C.gsl_permutation)(unsafe.Pointer(p.Ptr())), (*C.gsl_vector)(unsafe.Pointer(x.Ptr()))))
}