PageRenderTime 42ms CodeModel.GetById 13ms app.highlight 25ms RepoModel.GetById 1ms app.codeStats 0ms

/libs/gsl.scm

http://github.com/digego/extempore
Lisp | 438 lines | 294 code | 76 blank | 68 comment | 0 complexity | 78ecaf9c30a36e8b708334f46acc2230 MD5 | raw file
  1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2;;
  3;; GNU Scientific Library
  4;;
  5;; This assumes 64bit sorry!
  6;;
  7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  8
  9(define gsllib (if (string=? "Linux" (sys:platform))
 10		   (sys:open-dylib "libgsl.so.0")
 11		   (println "tell me where to find the gsl dynamic library on your platform here!")))
 12
 13
 14;; SOME TYPES FOR GSL
 15(bind-type gsl_complex <|2,double|>)
 16(bind-alias gsl_complex_packed double*)
 17(bind-alias gsl_complex_packed_array double*)
 18(bind-alias gsl_complex_packed_ptr double*)
 19(bind-alias gsl_const_complex_packed double*)
 20(bind-alias gsl_const_complex_packed_array double*)
 21(bind-alias gsl_const_complex_packed_ptr double*)
 22(bind-type gsl_sf_result <double,double>)
 23(bind-type gsl_sf_result_e10 <double,double,i32>)
 24(bind-type gsl_permutation <size_t,size_t*>)
 25(bind-type gsl_combination <size_t,size_t,size_t*>)
 26(bind-type gsl_block <size_t,double*>)
 27(bind-type gsl_block_complex <size_t,double*>)
 28(bind-type gsl_vector <size_t,size_t,double*,gsl_block*,i32>)
 29(bind-type gsl_vector_complex <size_t,size_t,double*,gsl_block_complex*,i32>)
 30(bind-type gsl_matrix <size_t,size_t,size_t,double*,gsl_block*,i32>)
 31(bind-type gsl_matrix_complex <size_t,size_t,size_t,double*,gsl_block_complex*,i32>)
 32
 33
 34
 35;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 36;;
 37;;  COMPLEX NUMBERS
 38;;
 39;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 40
 41
 42(bind-lib gsllib gsl_complex_rect [gsl_complex,double,double]*)
 43(bind-lib gsllib gsl_complex_polar [gsl_complex,double,double]*)
 44(definec GSL_REAL (lambda (z:gsl_complex) (aref (tref z 0) 0)))
 45(definec GSL_IMAG (lambda (z:gsl_complex) (aref (tref z 0) 1)))
 46(definec GSL_SET_COMPLEX
 47  (lambda (z:gsl_complex* x y)
 48    (aset! (tref-ptr z 0) 0 x)
 49    (aset! (tref-ptr z 0) 1 y)
 50    z))
 51(definec GSL_SET_REAL (lambda (z:gsl_complex* x) (aset! (tref-ptr z 0) 0 x) z))
 52(definec GSL_SET_IMAG (lambda (z:gsl_complex* y) (aset! (tref-ptr z 0) 1 y) z))
 53(bind-lib gsllib gsl_complex_arg [double,gsl_complex]*)
 54(bind-lib gsllib gsl_complex_abs [double,gsl_complex]*)
 55(bind-lib gsllib gsl_complex_logabs [double,gsl_complex]*)
 56
 57;; complex ops
 58(bind-lib gsllib gsl_complex_add [gsl_complex,gsl_complex,gsl_complex]*)
 59(bind-lib gsllib gsl_complex_sub [gsl_complex,gsl_complex,gsl_complex]*)
 60(bind-lib gsllib gsl_complex_mul [gsl_complex,gsl_complex,gsl_complex]*)
 61(bind-lib gsllib gsl_complex_div [gsl_complex,gsl_complex,gsl_complex]*)
 62(bind-lib gsllib gsl_complex_add_real [gsl_complex,gsl_complex,double]*)
 63(bind-lib gsllib gsl_complex_sub_real [gsl_complex,gsl_complex,double]*)
 64(bind-lib gsllib gsl_complex_mul_real [gsl_complex,gsl_complex,double]*)
 65(bind-lib gsllib gsl_complex_div_real [gsl_complex,gsl_complex,double]*)
 66(bind-lib gsllib gsl_complex_add_imag [gsl_complex,gsl_complex,double]*)
 67(bind-lib gsllib gsl_complex_sub_imag [gsl_complex,gsl_complex,double]*)
 68(bind-lib gsllib gsl_complex_mul_imag [gsl_complex,gsl_complex,double]*)
 69(bind-lib gsllib gsl_complex_div_imag [gsl_complex,gsl_complex,double]*)
 70(bind-lib gsllib gsl_complex_conjugate [gsl_complex,gsl_complex]*)
 71(bind-lib gsllib gsl_complex_inverse [gsl_complex,gsl_complex]*)
 72(bind-lib gsllib gsl_complex_negative [gsl_complex,gsl_complex]*)
 73
 74(bind-lib gsllib gsl_complex_sqrt [gsl_complex,gsl_complex]*)
 75(bind-lib gsllib gsl_complex_sqrt_real [gsl_complex,double]*)
 76(bind-lib gsllib gsl_complex_pow [gsl_complex,gsl_complex,gsl_complex]*)
 77(bind-lib gsllib gsl_complex_pow_real [gsl_complex,gsl_complex,double]*)
 78(bind-lib gsllib gsl_complex_exp [gsl_complex,gsl_complex]*)
 79(bind-lib gsllib gsl_complex_log [gsl_complex,gsl_complex]*)
 80(bind-lib gsllib gsl_complex_log10 [gsl_complex,gsl_complex]*)
 81(bind-lib gsllib gsl_complex_log_b [gsl_complex,gsl_complex,gsl_complex]*)
 82
 83(bind-lib gsllib gsl_complex_sin [gsl_complex,gsl_complex]*)
 84(bind-lib gsllib gsl_complex_cos [gsl_complex,gsl_complex]*)
 85(bind-lib gsllib gsl_complex_tan [gsl_complex,gsl_complex]*)
 86(bind-lib gsllib gsl_complex_sec [gsl_complex,gsl_complex]*)
 87(bind-lib gsllib gsl_complex_csc [gsl_complex,gsl_complex]*)
 88(bind-lib gsllib gsl_complex_cot [gsl_complex,gsl_complex]*)
 89
 90(bind-lib gsllib gsl_complex_arcsin [gsl_complex,gsl_complex]*)
 91(bind-lib gsllib gsl_complex_arccos [gsl_complex,gsl_complex]*)
 92(bind-lib gsllib gsl_complex_arctan [gsl_complex,gsl_complex]*)
 93(bind-lib gsllib gsl_complex_arcsec [gsl_complex,gsl_complex]*)
 94(bind-lib gsllib gsl_complex_arccsc [gsl_complex,gsl_complex]*)
 95(bind-lib gsllib gsl_complex_arccot [gsl_complex,gsl_complex]*)
 96
 97(bind-lib gsllib gsl_complex_arcsin_real [gsl_complex,double]*)
 98(bind-lib gsllib gsl_complex_arccos_real [gsl_complex,double]*)
 99(bind-lib gsllib gsl_complex_arcsec_real [gsl_complex,double]*)
100(bind-lib gsllib gsl_complex_arccsc_real [gsl_complex,double]*)
101
102(bind-lib gsllib gsl_complex_sinh [gsl_complex,gsl_complex]*)
103(bind-lib gsllib gsl_complex_cosh [gsl_complex,gsl_complex]*)
104(bind-lib gsllib gsl_complex_tanh [gsl_complex,gsl_complex]*)
105(bind-lib gsllib gsl_complex_sech [gsl_complex,gsl_complex]*)
106(bind-lib gsllib gsl_complex_csch [gsl_complex,gsl_complex]*)
107(bind-lib gsllib gsl_complex_coth [gsl_complex,gsl_complex]*)
108
109(bind-lib gsllib gsl_complex_arcsinh [gsl_complex,gsl_complex]*)
110(bind-lib gsllib gsl_complex_arccosh [gsl_complex,gsl_complex]*)
111(bind-lib gsllib gsl_complex_arctanh [gsl_complex,gsl_complex]*)
112(bind-lib gsllib gsl_complex_arcsech [gsl_complex,gsl_complex]*)
113(bind-lib gsllib gsl_complex_arccsch [gsl_complex,gsl_complex]*)
114(bind-lib gsllib gsl_complex_arccoth [gsl_complex,gsl_complex]*)
115
116(bind-lib gsllib gsl_complex_arccosh_real [gsl_complex,double]*)
117(bind-lib gsllib gsl_complex_arctanh_real [gsl_complex,double]*)
118
119
120;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
121;;
122;;  POLYNOMIALS
123;;
124;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
125
126(bind-lib gsllib gsl_poly_eval [double,double*,i32,double]*)
127(bind-lib gsllib gsl_poly_complex_eval [gsl_complex,double*,i32,gsl_complex]*)
128(bind-lib gsllib gsl_complex_poly_complex_eval [gsl_complex*,i32,gsl_complex]*)
129(bind-lib gsllib gsl_poly_eval_derivs [i32,double*,size_t,double,double*,size_t]*)
130
131(bind-lib gsllib gsl_poly_dd_init [i32,double*,double*,double*,size_t]*)
132(bind-lib gsllib gsl_poly_dd_eval [double,double*,double*,size_t,double]*)
133(bind-lib gsllib gsl_poly_dd_taylor [i32,double*,double,double*,double*,size_t,double*]*)
134
135(bind-lib gsllib gsl_poly_solve_quadratic [i32,double,double,double,double*,double*]*)
136(bind-lib gsllib gsl_poly_complex_solve_quadratic [i32,double,double,double,gsl_complex*,gsl_complex*]*)
137(bind-lib gsllib gsl_poly_solve_cubic [i32,double,double,double,double*,double*,double*]*)
138(bind-lib gsllib gsl_poly_complex_solve_cubic [i32,double,double,double,gsl_complex*,gsl_complex*,gsl_complex*]*)
139
140(bind-alias gsl_poly_complex_workspace i8)
141(bind-lib gsllib gsl_poly_complex_workspace_alloc [gsl_poly_complex_workspace*,size_t]*)
142(bind-lib gsllib gsl_poly_complex_workspace_free [void,gsl_poly_complex_workspace*]*)
143(bind-lib gsllib gsl_poly_complex_solve [i32,double*,size_t,gsl_poly_complex_workspace*,gsl_complex_packed_ptr]*)
144
145
146
147;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
148;;
149;; Special Functions
150;;
151;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
152
153;; trig functions
154(bind-lib gsllib gsl_sf_sin [double,double]*)
155(bind-lib gsllib gsl_sf_cos [double,double]*)
156(bind-lib gsllib gsl_sf_hypot [double,double]*)
157(bind-lib gsllib gsl_sf_sinc [double,double]*)
158
159(bind-lib gsllib gsl_sf_complex_sin_e [i32,double,double,gsl_sf_result*,gsl_sf_result*]*)
160(bind-lib gsllib gsl_sf_complex_cos_e [i32,double,double,gsl_sf_result*,gsl_sf_result*]*)
161(bind-lib gsllib gsl_sf_complex_logsin_e [i32,double,double,gsl_sf_result*,gsl_sf_result*]*)
162
163(bind-lib gsllib gsl_sf_lnsinh [double,double]*)
164(bind-lib gsllib gsl_sf_lncosh [double,double]*)
165
166(bind-lib gsllib gsl_sf_polar_to_rect [double,double,gsl_sf_result*,gsl_sf_result*]*)
167(bind-lib gsllib gsl_sf_rect_to_polar [double,double,gsl_sf_result*,gsl_sf_result*]*)
168
169(bind-lib gsllib gsl_sf_angle_restrict_symm [double,double]*)
170(bind-lib gsllib gsl_sf_angle_restrict_pos [double,double]*)
171
172;; zeta functions
173(bind-lib gsllib gsl_sf_zeta_int [double,i32]*)
174(bind-lib gsllib gsl_sf_zeta [double,double]*)
175(bind-lib gsllib gsl_sf_zetam1_int [double,i32]*)
176(bind-lib gsllib gsl_sf_zetam1 [double,double]*)
177(bind-lib gsllib gsl_sf_hzeta [double,double,double]*)
178(bind-lib gsllib gsl_sf_eta_int [double,i32]*)
179(bind-lib gsllib gsl_sf_eta [double,double]*)
180
181
182
183;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
184;;
185;; Permutations and Combintations
186;;
187;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
188
189
190(bind-lib gsllib gsl_permutation_alloc [gsl_permutation*,size_t]*)
191(bind-lib gsllib gsl_permutation_calloc [gsl_permutation*,size_t]*)
192(bind-lib gsllib gsl_permutation_init [void,gsl_permutation*]*)
193(bind-lib gsllib gsl_permutation_free [void,gsl_permutation*]*)
194(bind-lib gsllib gsl_permutation_memcpy [i32,gsl_permutation*,gsl_permutation*]*)
195
196(bind-lib gsllib gsl_permutation_get [size_t,gsl_permutation*,size_t]*)
197(bind-lib gsllib gsl_permutation_swap [i32,gsl_permutation*,size_t,size_t]*)
198
199(bind-lib gsllib gsl_permutation_size [size_t,gsl_permutation*]*)
200(bind-lib gsllib gsl_permutation_data [size_t,gsl_permutation*]*)
201(bind-lib gsllib gsl_permutation_valid [i32,gsl_permutation*]*)
202
203(bind-lib gsllib gsl_permutation_reverse [void,gsl_permutation*]*)
204(bind-lib gsllib gsl_permutation_inverse [i32,gsl_permutation*,gsl_permutation*]*)
205(bind-lib gsllib gsl_permutation_next [i32,gsl_permutation*]*)
206(bind-lib gsllib gsl_permutation_prev [i32,gsl_permutation*]*)
207
208(bind-lib gsllib gsl_permute [i32,size_t*,double*,size_t,size_t]*)
209(bind-lib gsllib gsl_permute_inverse [i32,size_t*,double*,size_t,size_t]*)
210(bind-lib gsllib gsl_permute_vector [i32,gsl_permutation*,gsl_vector*]*)
211(bind-lib gsllib gsl_permute_vector_inverse [i32,gsl_permutation*,gsl_vector*]*)
212(bind-lib gsllib gsl_permutation_mul [i32,gsl_permutation*,gsl_permutation*,gsl_permutation*]*)
213
214(bind-lib gsllib gsl_permutation_fwrite [i32,i8*,gsl_permutation*]*)
215(bind-lib gsllib gsl_permutation_fread [i32,i8*,gsl_permutation*]*)
216
217(bind-lib gsllib gsl_permutation_linear_to_canonical [i32,gsl_permutation*,gsl_permutation*]*)
218(bind-lib gsllib gsl_permutation_canonical_to_linear [i32,gsl_permutation*,gsl_permutation*]*)
219(bind-lib gsllib gsl_permutation_inversions [size_t,gsl_permutation*]*)
220(bind-lib gsllib gsl_permutation_linear_cycles [size_t,gsl_permutation*]*)
221(bind-lib gsllib gsl_permutation_canonical_cycles [size_t,gsl_permutation*]*)
222
223(bind-lib gsllib gsl_combination_alloc [gsl_combination*,size_t,size_t]*)
224(bind-lib gsllib gsl_combination_calloc [gsl_combination*,size_t,size_t]*)
225(bind-lib gsllib gsl_combination_init_first [void,gsl_combination*]*)
226(bind-lib gsllib gsl_combination_init_last [void,gsl_combination*]*)
227(bind-lib gsllib gsl_combination_free [void,gsl_combination*]*)
228(bind-lib gsllib gsl_combination_memcpy [i32,gsl_combination*,gsl_combination*]*)
229(bind-lib gsllib gsl_combination_get [size_t,gsl_combination*,size_t]*)
230
231(bind-lib gsllib gsl_combination_n [size_t,gsl_combination*]*)
232(bind-lib gsllib gsl_combination_k [size_t,gsl_combination*]*)
233(bind-lib gsllib gsl_combination_data [size_t*,gsl_combination*]*)
234(bind-lib gsllib gsl_combination_valid [i32,gsl_combination*]*)
235
236(bind-lib gsllib gsl_combination_next [i32,gsl_combination*]*)
237(bind-lib gsllib gsl_combination_prev [i32,gsl_combination*]*)
238
239(bind-lib gsllib gsl_combination_fwrite [i32,i8*,gsl_combination*]*)
240(bind-lib gsllib gsl_combination_fread [i32,i8*,gsl_combination*]*)
241
242
243;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
244;;
245;;  MATRIX AND VECTOR STUFF
246;;
247;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
248
249;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
250;; blocks
251
252(bind-lib gsllib gsl_block_alloc [gsl_block*,size_t]*)
253(bind-lib gsllib gsl_block_calloc [gsl_block*,size_t]*)
254(bind-lib gsllib gsl_block_free [void,gsl_block*]*)
255;; where i8* is FILE*
256(bind-lib gsllib gsl_block_fwrite [i32,i8*,gsl_block*]*)
257(bind-lib gsllib gsl_block_fread [i32,i8*,gsl_block*]*)
258
259
260;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
261;; vectors
262
263;; size,stride,data,block,owner
264(bind-lib gsllib gsl_vector_alloc [gsl_vector*,size_t]*)
265(bind-lib gsllib gsl_vector_calloc [gsl_vector*,size_t]*)
266(bind-lib gsllib gsl_vector_free [void,gsl_vector*]*)
267(bind-lib gsllib gsl_vector_get [double,gsl_vector*,size_t]*)
268(bind-lib gsllib gsl_vector_set [void,gsl_vector*,size_t,double]*)
269(bind-lib gsllib gsl_vector_ptr [double*,gsl_vector*,size_t]*)
270(bind-lib gsllib gsl_vector_set_all [void,gsl_vector*,double]*)
271(bind-lib gsllib gsl_vector_set_zero [void,gsl_vector*]*)
272(bind-lib gsllib gsl_vector_set_basis [i32,gsl_vector*,size_t]*)
273;; where i8* is FILE*
274(bind-lib gsllib gsl_vector_fwrite [i32,i8*,gsl_vector*]*)
275(bind-lib gsllib gsl_vector_fread [i32,i8*,gsl_vector*]*)
276
277(bind-lib gsllib gsl_vector_memcpy [i32,gsl_vector*,gsl_vector*]*)
278(bind-lib gsllib gsl_vector_swap [i32,gsl_vector*,gsl_vector*]*)
279(bind-lib gsllib gsl_vector_swap_elements [i32,gsl_vector*,size_t,size_t]*)
280(bind-lib gsllib gsl_vector_reverse [i32,gsl_vector*]*)
281
282;; result ends up in first vector (2nd vector unchanged)
283(bind-lib gsllib gsl_vector_add [i32,gsl_vector*,gsl_vector*]*)
284(bind-lib gsllib gsl_vector_sub [i32,gsl_vector*,gsl_vector*]*)
285(bind-lib gsllib gsl_vector_mul [i32,gsl_vector*,gsl_vector*]*)
286(bind-lib gsllib gsl_vector_div [i32,gsl_vector*,gsl_vector*]*)
287(bind-lib gsllib gsl_vector_scale [i32,gsl_vector*,double]*)
288(bind-lib gsllib gsl_vector_add_constant [i32,gsl_vector*,double]*)
289(bind-lib gsllib gsl_vector_max [double,gsl_vector*]*)
290(bind-lib gsllib gsl_vector_min [double,gsl_vector*]*)
291(bind-lib gsllib gsl_vector_max_index [size_t,gsl_vector*]*)
292(bind-lib gsllib gsl_vector_min_index [size_t,gsl_vector*]*)
293
294(bind-lib gsllib gsl_vector_isnull [i32,gsl_vector*]*)
295(bind-lib gsllib gsl_vector_ispos [i32,gsl_vector*]*)
296(bind-lib gsllib gsl_vector_isneg [i32,gsl_vector*]*)
297(bind-lib gsllib gsl_vector_isnonneg [i32,gsl_vector*]*)
298;; (bind-lib gsllib gsl_vector_equal [i32,gsl_vector*,gsl_vector*]*)
299
300;; VECTOR SORTING
301(bind-lib gsllib gsl_sort [void,double*,size_t,size_t]*)
302(bind-lib gsllib gsl_sort_vector [void,gsl_vector*]*)
303(bind-lib gsllib gsl_sort_index [void,size_t*,double*,size_t,size_t]*)
304(bind-lib gsllib gsl_sort_vector_index [i32,gsl_permutation*,gsl_vector*]*)
305
306
307;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
308;; matrices
309;;
310;; rows first, columns second.
311;;
312
313
314(bind-lib gsllib gsl_matrix_alloc [gsl_matrix*,size_t,size_t]*)
315(bind-lib gsllib gsl_matrix_calloc [gsl_matrix*,size_t,size_t]*)
316(bind-lib gsllib gsl_matrix_free [void,gsl_matrix*]*)
317(bind-lib gsllib gsl_matrix_get [double,gsl_matrix*,size_t,size_t]*)
318(bind-lib gsllib gsl_matrix_set [void,gsl_matrix*,size_t,size_t,double]*)
319(bind-lib gsllib gsl_matrix_ptr [double*,gsl_matrix*,size_t,size_t]*)
320(bind-lib gsllib gsl_matrix_set_all [void,gsl_matrix*,double]*)
321(bind-lib gsllib gsl_matrix_set_zero [void,gsl_matrix*]*)
322(bind-lib gsllib gsl_matrix_set_identity [void,gsl_matrix*]*)
323;; where i8* is FILE*
324(bind-lib gsllib gsl_matrix_fwrite [i32,i8*,gsl_matrix*]*)
325(bind-lib gsllib gsl_matrix_fread [i32,i8*,gsl_matrix*]*)
326
327;; dest first src second
328(bind-lib gsllib gsl_matrix_memcpy [i32,gsl_matrix*,gsl_matrix*]*)
329;; swap elements of a and b (by copy)
330(bind-lib gsllib gsl_matrix_swap [i32,gsl_matrix*,gsl_matrix*]*)
331
332;; get set by row/col
333(bind-lib gsllib gsl_matrix_get_row [i32,gsl_vector*,gsl_matrix*,size_t]*)
334(bind-lib gsllib gsl_matrix_get_col [i32,gsl_vector*,gsl_matrix*,size_t]*)
335(bind-lib gsllib gsl_matrix_set_row [i32,gsl_matrix*,size_t,gsl_vector*]*)
336(bind-lib gsllib gsl_matrix_set_col [i32,gsl_matrix*,size_t,gsl_vector*]*)
337
338;; exchanging rows and cols
339(bind-lib gsllib gsl_matrix_swap_rows [i32,gsl_matrix*,size_t,size_t]*)
340(bind-lib gsllib gsl_matrix_swap_columns [i32,gsl_matrix*,size_t,size_t]*)
341(bind-lib gsllib gsl_matrix_swap_rowcol [i32,gsl_matrix*,size_t,size_t]*)
342(bind-lib gsllib gsl_matrix_transpose_memcpy [i32,gsl_matrix*,gsl_matrix*]*)
343(bind-lib gsllib gsl_matrix_transpose [i32,gsl_matrix*]*)
344
345;; matrix ops
346(bind-lib gsllib gsl_matrix_add [i32,gsl_matrix*,gsl_matrix*]*)
347(bind-lib gsllib gsl_matrix_sub [i32,gsl_matrix*,gsl_matrix*]*)
348(bind-lib gsllib gsl_matrix_mul_elements [i32,gsl_matrix*,gsl_matrix*]*)
349(bind-lib gsllib gsl_matrix_div_elements [i32,gsl_matrix*,gsl_matrix*]*)
350(bind-lib gsllib gsl_matrix_scale [i32,gsl_matrix*,double]*)
351(bind-lib gsllib gsl_matrix_add_constant [i32,gsl_matrix*,double]*)
352(bind-lib gsllib gsl_matrix_max [double,gsl_matrix*]*)
353(bind-lib gsllib gsl_matrix_min [double,gsl_matrix*]*)
354(bind-lib gsllib gsl_matrix_max_index [void,gsl_matrix*,size_t*,size_t*]*)
355(bind-lib gsllib gsl_matrix_min_index [void,gsl_matrix*,size_t*,size_t*]*)
356
357(bind-lib gsllib gsl_matrix_isnull [i32,gsl_matrix*]*)
358(bind-lib gsllib gsl_matrix_ispos [i32,gsl_matrix*]*)
359(bind-lib gsllib gsl_matrix_isneg [i32,gsl_matrix*]*)
360(bind-lib gsllib gsl_matrix_isnonneg [i32,gsl_matrix*]*)
361;(bind-lib gsllib gsl_matrix_equal [i32,gsl_matrix*,gsl_matrix*]*)
362
363
364;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
365;;
366;; Linear Algebra
367;;
368;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
369
370(bind-lib gsllib gsl_linalg_LU_decomp [i32,gsl_matrix*,gsl_permutation*,i32*]*)
371(bind-lib gsllib gsl_linalg_complex_LU_decomp [i32,gsl_matrix_complex*,gsl_permutation*,i32*]*)
372(bind-lib gsllib gsl_linalg_LU_solve [i32,gsl_matrix*,gsl_permutation*,gsl_vector*,gsl_vector*]*)
373(bind-lib gsllib gsl_linalg_complex_LU_solve [i32,gsl_matrix_complex*,gsl_permutation*,gsl_vector_complex*,gsl_vector_complex*]*)
374(bind-lib gsllib gsl_linalg_LU_svx [i32,gsl_matrix*,gsl_permutation*,gsl_vector*]*)
375(bind-lib gsllib gsl_linalg_complex_LU_svx [i32,gsl_matrix_complex*,gsl_permutation*,gsl_vector_complex*]*)
376(bind-lib gsllib gsl_linalg_LU_refine [i32,gsl_matrix*,gsl_matrix*,gsl_permutation*,gsl_vector*,gsl_vector*,gsl_vector*]*)
377(bind-lib gsllib gsl_linalg_complex_LU_refine [i32,gsl_matrix_complex*,gsl_matrix_complex*,gsl_permutation*,gsl_vector_complex*,gsl_vector_complex*,gsl_vector_complex*]*)
378(bind-lib gsllib gsl_linalg_LU_invert [i32,gsl_matrix*,gsl_permutation*,gsl_matrix*]*)
379(bind-lib gsllib gsl_linalg_complex_LU_invert [i32,gsl_matrix_complex*,gsl_permutation*,gsl_matrix_complex*]*)
380(bind-lib gsllib gsl_linalg_LU_det [double,gsl_matrix*,i32]*)
381(bind-lib gsllib gsl_linalg_complex_LU_det [double,gsl_matrix_complex*,i32]*)
382(bind-lib gsllib gsl_linalg_LU_lndet [double,gsl_matrix*]*)
383(bind-lib gsllib gsl_linalg_complex_LU_lndet [double,gsl_matrix_complex*]*)
384(bind-lib gsllib gsl_linalg_LU_sgndet [double,gsl_matrix*,i32]*)
385(bind-lib gsllib gsl_linalg_complex_LU_sgndet [double,gsl_matrix_complex*,i32]*)
386
387
388;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
389;;
390;; Statistics
391;;
392;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
393
394(bind-lib gsllib gsl_stats_mean [double,double*,size_t,size_t]*)
395(bind-lib gsllib gsl_stats_variance [double,double*,size_t,size_t]*)
396(bind-lib gsllib gsl_stats_variance_m [double,double*,size_t,size_t,double]*)
397(bind-lib gsllib gsl_stats_sd [double,double*,size_t,size_t]*)
398(bind-lib gsllib gsl_stats_sd_m [double,double*,size_t,size_t,double]*)
399(bind-lib gsllib gsl_stats_tss [double,double*,size_t,size_t]*)
400(bind-lib gsllib gsl_stats_tss_m [double,double*,size_t,size_t,double]*)
401(bind-lib gsllib gsl_stats_variance_with_fixed_mean [double,double*,size_t,size_t,double]*)
402(bind-lib gsllib gsl_stats_sd_with_fixed_mean [double,double*,size_t,size_t,double]*)
403(bind-lib gsllib gsl_stats_absdev [double,double*,size_t,size_t]*)
404(bind-lib gsllib gsl_stats_absdev_m [double,double*,size_t,size_t,double]*)
405(bind-lib gsllib gsl_stats_skew [double,double*,size_t,size_t]*)
406(bind-lib gsllib gsl_stats_skew_m_sd [double,double*,size_t,size_t,double,double]*)
407(bind-lib gsllib gsl_stats_kurtosis [double,double*,size_t,size_t]*)
408(bind-lib gsllib gsl_stats_kurtosis_m_sd [double,double*,size_t,size_t,double,double]*)
409
410(bind-lib gsllib gsl_stats_lag1_autocorrelation [double,double*,size_t,size_t]*)
411(bind-lib gsllib gsl_stats_lag1_autocorrelation_m [double,double*,size_t,size_t,double]*)
412(bind-lib gsllib gsl_stats_covariance [double,double*,size_t,double*,size_t,size_t]*)
413(bind-lib gsllib gsl_stats_covariance_m [double,double*,size_t,double*,size_t,size_t,double,double]*)
414(bind-lib gsllib gsl_stats_correlation [double,double*,size_t,double*,size_t,size_t]*)
415
416(bind-lib gsllib gsl_stats_wmean [double,double*,size_t,double*,size_t,size_t]*)
417(bind-lib gsllib gsl_stats_wvariance [double,double*,size_t,double*,size_t,size_t]*)
418(bind-lib gsllib gsl_stats_wvariance_m [double,double*,size_t,double*,size_t,size_t,double]*)
419(bind-lib gsllib gsl_stats_wsd [double,double*,size_t,double*,size_t,size_t]*)
420(bind-lib gsllib gsl_stats_wsd_m [double,double*,size_t,double*,size_t,size_t,double]*)
421(bind-lib gsllib gsl_stats_wtss [double,double*,size_t,double*,size_t,size_t]*)
422(bind-lib gsllib gsl_stats_wtss_m [double,double*,size_t,double*,size_t,size_t,double]*)
423(bind-lib gsllib gsl_stats_wvariance_with_fixed_mean [double,double*,size_t,double*,size_t,size_t,double]*)
424(bind-lib gsllib gsl_stats_wsd_with_fixed_mean [double,double*,size_t,double*,size_t,size_t,double]*)
425(bind-lib gsllib gsl_stats_wabsdev [double,double*,size_t,double*,size_t,size_t]*)
426(bind-lib gsllib gsl_stats_wabsdev_m [double,double*,size_t,double*,size_t,size_t,double]*)
427(bind-lib gsllib gsl_stats_wskew [double,double*,size_t,double*,size_t,size_t]*)
428(bind-lib gsllib gsl_stats_wskew_m_sd [double,double*,size_t,double*,size_t,size_t,double,double]*)
429(bind-lib gsllib gsl_stats_wkurtosis [double,double*,size_t,double*,size_t,size_t]*)
430(bind-lib gsllib gsl_stats_wkurtosis_m_sd [double,double*,size_t,double*,size_t,size_t,double,double]*)
431
432(bind-lib gsllib gsl_stats_max [double,double*,size_t,size_t]*)
433(bind-lib gsllib gsl_stats_min [double,double*,size_t,size_t]*)
434(bind-lib gsllib gsl_stats_max_index [size_t,double*,size_t,size_t]*)
435(bind-lib gsllib gsl_stats_min_index [size_t,double*,size_t,size_t]*)
436
437(bind-lib gsllib gsl_stats_median_from_sorted_data [double,double*,size_t,size_t]*)
438(bind-lib gsllib gsl_stats_quantile_from_sorted_data [double,double*,size_t,size_t,double]*)