rb-gsl 1.16.0.5 → 1.16.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (612) hide show
  1. checksums.yaml +4 -4
  2. data/rb-gsl.gemspec +5 -10
  3. metadata +10 -713
  4. data/.gitignore +0 -12
  5. data/.travis.yml +0 -24
  6. data/AUTHORS +0 -12
  7. data/COPYING +0 -341
  8. data/ChangeLog +0 -621
  9. data/Gemfile +0 -4
  10. data/README.md +0 -77
  11. data/Rakefile +0 -20
  12. data/THANKS +0 -17
  13. data/examples/alf/alf.gp +0 -15
  14. data/examples/alf/alf.rb +0 -32
  15. data/examples/blas/blas.rb +0 -13
  16. data/examples/blas/dnrm2.rb +0 -16
  17. data/examples/blas/level1.rb +0 -81
  18. data/examples/blas/level2.rb +0 -11
  19. data/examples/blas/level3.rb +0 -12
  20. data/examples/bspline.rb +0 -57
  21. data/examples/cdf.rb +0 -16
  22. data/examples/cheb.rb +0 -21
  23. data/examples/combination.rb +0 -23
  24. data/examples/complex/RC-lpf.rb +0 -47
  25. data/examples/complex/add.rb +0 -36
  26. data/examples/complex/coerce.rb +0 -14
  27. data/examples/complex/complex.rb +0 -25
  28. data/examples/complex/fpmi.rb +0 -70
  29. data/examples/complex/functions.rb +0 -77
  30. data/examples/complex/michelson.rb +0 -36
  31. data/examples/complex/mul.rb +0 -28
  32. data/examples/complex/oscillator.rb +0 -17
  33. data/examples/complex/set.rb +0 -37
  34. data/examples/const/physconst.rb +0 -151
  35. data/examples/const/travel.rb +0 -45
  36. data/examples/deriv/demo.rb +0 -13
  37. data/examples/deriv/deriv.rb +0 -36
  38. data/examples/deriv/diff.rb +0 -35
  39. data/examples/dht.rb +0 -42
  40. data/examples/dirac.rb +0 -56
  41. data/examples/eigen/eigen.rb +0 -34
  42. data/examples/eigen/herm.rb +0 -22
  43. data/examples/eigen/narray.rb +0 -9
  44. data/examples/eigen/nonsymm.rb +0 -37
  45. data/examples/eigen/nonsymmv.rb +0 -43
  46. data/examples/eigen/qhoscillator.gp +0 -35
  47. data/examples/eigen/qhoscillator.rb +0 -90
  48. data/examples/eigen/vander.rb +0 -41
  49. data/examples/fft/fft.rb +0 -17
  50. data/examples/fft/fft2.rb +0 -17
  51. data/examples/fft/forward.rb +0 -25
  52. data/examples/fft/forward2.rb +0 -26
  53. data/examples/fft/radix2.rb +0 -18
  54. data/examples/fft/real-halfcomplex.rb +0 -33
  55. data/examples/fft/real-halfcomplex2.rb +0 -30
  56. data/examples/fft/realradix2.rb +0 -19
  57. data/examples/fft/sunspot.dat +0 -256
  58. data/examples/fft/sunspot.rb +0 -16
  59. data/examples/fit/expdata.dat +0 -20
  60. data/examples/fit/expfit.rb +0 -31
  61. data/examples/fit/gaussfit.rb +0 -29
  62. data/examples/fit/gaussian_2peaks.rb +0 -34
  63. data/examples/fit/hillfit.rb +0 -40
  64. data/examples/fit/lognormal.rb +0 -26
  65. data/examples/fit/lorentzfit.rb +0 -22
  66. data/examples/fit/multifit.rb +0 -72
  67. data/examples/fit/ndlinear.rb +0 -133
  68. data/examples/fit/nonlinearfit.rb +0 -89
  69. data/examples/fit/plot.gp +0 -36
  70. data/examples/fit/polyfit.rb +0 -9
  71. data/examples/fit/powerfit.rb +0 -21
  72. data/examples/fit/sigmoidfit.rb +0 -40
  73. data/examples/fit/sinfit.rb +0 -22
  74. data/examples/fit/wlinear.rb +0 -46
  75. data/examples/fresnel.rb +0 -11
  76. data/examples/function/function.rb +0 -36
  77. data/examples/function/log.rb +0 -7
  78. data/examples/function/min.rb +0 -33
  79. data/examples/function/sin.rb +0 -10
  80. data/examples/function/synchrotron.rb +0 -18
  81. data/examples/gallery/butterfly.rb +0 -7
  82. data/examples/gallery/cayley.rb +0 -12
  83. data/examples/gallery/cornu.rb +0 -23
  84. data/examples/gallery/eight.rb +0 -11
  85. data/examples/gallery/koch.rb +0 -40
  86. data/examples/gallery/lemniscate.rb +0 -11
  87. data/examples/gallery/polar.rb +0 -11
  88. data/examples/gallery/rgplot/cossin.rb +0 -35
  89. data/examples/gallery/rgplot/rgplot.replaced +0 -0
  90. data/examples/gallery/rgplot/roesller.rb +0 -55
  91. data/examples/gallery/roesller.rb +0 -39
  92. data/examples/gallery/scarabaeus.rb +0 -14
  93. data/examples/histogram/cauchy.rb +0 -27
  94. data/examples/histogram/cauchy.sh +0 -2
  95. data/examples/histogram/exponential.rb +0 -19
  96. data/examples/histogram/gauss.rb +0 -16
  97. data/examples/histogram/gsl-histogram.rb +0 -40
  98. data/examples/histogram/histo2d.rb +0 -31
  99. data/examples/histogram/histo3d.rb +0 -34
  100. data/examples/histogram/histogram-pdf.rb +0 -27
  101. data/examples/histogram/histogram.rb +0 -26
  102. data/examples/histogram/integral.rb +0 -28
  103. data/examples/histogram/poisson.rb +0 -27
  104. data/examples/histogram/power.rb +0 -25
  105. data/examples/histogram/rebin.rb +0 -17
  106. data/examples/histogram/smp.dat +0 -5
  107. data/examples/histogram/xexp.rb +0 -21
  108. data/examples/integration/ahmed.rb +0 -21
  109. data/examples/integration/cosmology.rb +0 -75
  110. data/examples/integration/friedmann.gp +0 -16
  111. data/examples/integration/friedmann.rb +0 -35
  112. data/examples/integration/gamma-zeta.rb +0 -35
  113. data/examples/integration/integration.rb +0 -22
  114. data/examples/integration/qag.rb +0 -8
  115. data/examples/integration/qag2.rb +0 -14
  116. data/examples/integration/qag3.rb +0 -8
  117. data/examples/integration/qagi.rb +0 -28
  118. data/examples/integration/qagi2.rb +0 -49
  119. data/examples/integration/qagiu.rb +0 -29
  120. data/examples/integration/qagp.rb +0 -20
  121. data/examples/integration/qags.rb +0 -14
  122. data/examples/integration/qawc.rb +0 -18
  123. data/examples/integration/qawf.rb +0 -41
  124. data/examples/integration/qawo.rb +0 -29
  125. data/examples/integration/qaws.rb +0 -30
  126. data/examples/integration/qng.rb +0 -17
  127. data/examples/interp/demo.gp +0 -20
  128. data/examples/interp/demo.rb +0 -45
  129. data/examples/interp/interp.rb +0 -37
  130. data/examples/interp/points +0 -10
  131. data/examples/interp/spline.rb +0 -20
  132. data/examples/jacobi/deriv.rb +0 -40
  133. data/examples/jacobi/integrate.rb +0 -34
  134. data/examples/jacobi/interp.rb +0 -43
  135. data/examples/jacobi/jacobi.rb +0 -11
  136. data/examples/linalg/HH.rb +0 -15
  137. data/examples/linalg/HH_narray.rb +0 -13
  138. data/examples/linalg/LQ_solve.rb +0 -73
  139. data/examples/linalg/LU.rb +0 -84
  140. data/examples/linalg/LU2.rb +0 -31
  141. data/examples/linalg/LU_narray.rb +0 -24
  142. data/examples/linalg/PTLQ.rb +0 -47
  143. data/examples/linalg/QR.rb +0 -18
  144. data/examples/linalg/QRPT.rb +0 -47
  145. data/examples/linalg/QR_solve.rb +0 -78
  146. data/examples/linalg/QR_solve_narray.rb +0 -13
  147. data/examples/linalg/SV.rb +0 -16
  148. data/examples/linalg/SV_narray.rb +0 -12
  149. data/examples/linalg/SV_solve.rb +0 -49
  150. data/examples/linalg/chol.rb +0 -29
  151. data/examples/linalg/chol_narray.rb +0 -15
  152. data/examples/linalg/complex.rb +0 -57
  153. data/examples/linalg/invert_narray.rb +0 -10
  154. data/examples/math/const.rb +0 -67
  155. data/examples/math/elementary.rb +0 -35
  156. data/examples/math/functions.rb +0 -41
  157. data/examples/math/inf_nan.rb +0 -34
  158. data/examples/math/minmax.rb +0 -22
  159. data/examples/math/power.rb +0 -18
  160. data/examples/math/test.rb +0 -31
  161. data/examples/matrix/a.dat +0 -0
  162. data/examples/matrix/add.rb +0 -45
  163. data/examples/matrix/b.dat +0 -4
  164. data/examples/matrix/cat.rb +0 -31
  165. data/examples/matrix/colvectors.rb +0 -24
  166. data/examples/matrix/complex.rb +0 -41
  167. data/examples/matrix/det.rb +0 -29
  168. data/examples/matrix/diagonal.rb +0 -23
  169. data/examples/matrix/get_all.rb +0 -159
  170. data/examples/matrix/hilbert.rb +0 -31
  171. data/examples/matrix/iterator.rb +0 -19
  172. data/examples/matrix/matrix.rb +0 -57
  173. data/examples/matrix/minmax.rb +0 -53
  174. data/examples/matrix/mul.rb +0 -39
  175. data/examples/matrix/rand.rb +0 -20
  176. data/examples/matrix/read.rb +0 -29
  177. data/examples/matrix/rowcol.rb +0 -47
  178. data/examples/matrix/set.rb +0 -41
  179. data/examples/matrix/set_all.rb +0 -100
  180. data/examples/matrix/view.rb +0 -32
  181. data/examples/matrix/view_all.rb +0 -148
  182. data/examples/matrix/write.rb +0 -23
  183. data/examples/min.rb +0 -29
  184. data/examples/monte/miser.rb +0 -47
  185. data/examples/monte/monte.rb +0 -47
  186. data/examples/monte/plain.rb +0 -47
  187. data/examples/monte/vegas.rb +0 -46
  188. data/examples/multimin/bundle.rb +0 -66
  189. data/examples/multimin/cqp.rb +0 -109
  190. data/examples/multimin/fdfminimizer.rb +0 -40
  191. data/examples/multimin/fminimizer.rb +0 -41
  192. data/examples/multiroot/demo.rb +0 -36
  193. data/examples/multiroot/fdfsolver.rb +0 -50
  194. data/examples/multiroot/fsolver.rb +0 -33
  195. data/examples/multiroot/fsolver2.rb +0 -32
  196. data/examples/multiroot/fsolver3.rb +0 -26
  197. data/examples/narray/histogram.rb +0 -14
  198. data/examples/narray/mandel.rb +0 -27
  199. data/examples/narray/narray.rb +0 -28
  200. data/examples/narray/narray2.rb +0 -44
  201. data/examples/narray/sf.rb +0 -26
  202. data/examples/ntuple/create.rb +0 -17
  203. data/examples/ntuple/project.rb +0 -31
  204. data/examples/odeiv/binarysystem.gp +0 -23
  205. data/examples/odeiv/binarysystem.rb +0 -104
  206. data/examples/odeiv/demo.gp +0 -24
  207. data/examples/odeiv/demo.rb +0 -69
  208. data/examples/odeiv/demo2.gp +0 -26
  209. data/examples/odeiv/duffing.rb +0 -45
  210. data/examples/odeiv/frei1.rb +0 -109
  211. data/examples/odeiv/frei2.rb +0 -76
  212. data/examples/odeiv/legendre.rb +0 -52
  213. data/examples/odeiv/odeiv.rb +0 -32
  214. data/examples/odeiv/odeiv2.rb +0 -45
  215. data/examples/odeiv/oscillator.rb +0 -42
  216. data/examples/odeiv/sedov.rb +0 -97
  217. data/examples/odeiv/whitedwarf.gp +0 -40
  218. data/examples/odeiv/whitedwarf.rb +0 -158
  219. data/examples/ool/conmin.rb +0 -100
  220. data/examples/ool/gencan.rb +0 -99
  221. data/examples/ool/pgrad.rb +0 -100
  222. data/examples/ool/spg.rb +0 -100
  223. data/examples/pdf/bernoulli.rb +0 -5
  224. data/examples/pdf/beta.rb +0 -7
  225. data/examples/pdf/binomiral.rb +0 -10
  226. data/examples/pdf/cauchy.rb +0 -6
  227. data/examples/pdf/chisq.rb +0 -8
  228. data/examples/pdf/exponential.rb +0 -7
  229. data/examples/pdf/exppow.rb +0 -6
  230. data/examples/pdf/fdist.rb +0 -7
  231. data/examples/pdf/flat.rb +0 -7
  232. data/examples/pdf/gamma.rb +0 -8
  233. data/examples/pdf/gauss-tail.rb +0 -5
  234. data/examples/pdf/gauss.rb +0 -6
  235. data/examples/pdf/geometric.rb +0 -5
  236. data/examples/pdf/gumbel.rb +0 -6
  237. data/examples/pdf/hypergeometric.rb +0 -11
  238. data/examples/pdf/landau.rb +0 -5
  239. data/examples/pdf/laplace.rb +0 -7
  240. data/examples/pdf/logarithmic.rb +0 -5
  241. data/examples/pdf/logistic.rb +0 -6
  242. data/examples/pdf/lognormal.rb +0 -6
  243. data/examples/pdf/neg-binomiral.rb +0 -10
  244. data/examples/pdf/pareto.rb +0 -7
  245. data/examples/pdf/pascal.rb +0 -10
  246. data/examples/pdf/poisson.rb +0 -5
  247. data/examples/pdf/rayleigh-tail.rb +0 -6
  248. data/examples/pdf/rayleigh.rb +0 -6
  249. data/examples/pdf/tdist.rb +0 -6
  250. data/examples/pdf/weibull.rb +0 -8
  251. data/examples/permutation/ex1.rb +0 -22
  252. data/examples/permutation/permutation.rb +0 -16
  253. data/examples/poly/bell.rb +0 -6
  254. data/examples/poly/bessel.rb +0 -6
  255. data/examples/poly/cheb.rb +0 -6
  256. data/examples/poly/cheb_II.rb +0 -6
  257. data/examples/poly/cubic.rb +0 -9
  258. data/examples/poly/demo.rb +0 -20
  259. data/examples/poly/eval.rb +0 -28
  260. data/examples/poly/eval_derivs.rb +0 -14
  261. data/examples/poly/fit.rb +0 -21
  262. data/examples/poly/hermite.rb +0 -6
  263. data/examples/poly/poly.rb +0 -13
  264. data/examples/poly/quadratic.rb +0 -25
  265. data/examples/random/diffusion.rb +0 -34
  266. data/examples/random/gaussian.rb +0 -9
  267. data/examples/random/generator.rb +0 -27
  268. data/examples/random/hdsobol.rb +0 -21
  269. data/examples/random/poisson.rb +0 -9
  270. data/examples/random/qrng.rb +0 -19
  271. data/examples/random/randomwalk.rb +0 -37
  272. data/examples/random/randomwalk2d.rb +0 -19
  273. data/examples/random/rayleigh.rb +0 -36
  274. data/examples/random/rng.rb +0 -33
  275. data/examples/random/rngextra.rb +0 -14
  276. data/examples/roots/bisection.rb +0 -25
  277. data/examples/roots/brent.rb +0 -43
  278. data/examples/roots/demo.rb +0 -30
  279. data/examples/roots/newton.rb +0 -46
  280. data/examples/roots/recombination.gp +0 -11
  281. data/examples/roots/recombination.rb +0 -61
  282. data/examples/roots/steffenson.rb +0 -48
  283. data/examples/sf/ShiChi.rb +0 -6
  284. data/examples/sf/SiCi.rb +0 -6
  285. data/examples/sf/airy_Ai.rb +0 -8
  286. data/examples/sf/airy_Bi.rb +0 -8
  287. data/examples/sf/bessel_IK.rb +0 -12
  288. data/examples/sf/bessel_JY.rb +0 -13
  289. data/examples/sf/beta_inc.rb +0 -9
  290. data/examples/sf/clausen.rb +0 -6
  291. data/examples/sf/dawson.rb +0 -5
  292. data/examples/sf/debye.rb +0 -9
  293. data/examples/sf/dilog.rb +0 -6
  294. data/examples/sf/ellint.rb +0 -6
  295. data/examples/sf/expint.rb +0 -8
  296. data/examples/sf/fermi.rb +0 -10
  297. data/examples/sf/gamma_inc_P.rb +0 -9
  298. data/examples/sf/gegenbauer.rb +0 -8
  299. data/examples/sf/hyperg.rb +0 -7
  300. data/examples/sf/laguerre.rb +0 -19
  301. data/examples/sf/lambertW.rb +0 -5
  302. data/examples/sf/legendre_P.rb +0 -10
  303. data/examples/sf/lngamma.rb +0 -5
  304. data/examples/sf/psi.rb +0 -54
  305. data/examples/sf/sphbessel.gp +0 -27
  306. data/examples/sf/sphbessel.rb +0 -30
  307. data/examples/sf/synchrotron.rb +0 -5
  308. data/examples/sf/transport.rb +0 -10
  309. data/examples/sf/zetam1.rb +0 -5
  310. data/examples/siman.rb +0 -44
  311. data/examples/sort/heapsort.rb +0 -23
  312. data/examples/sort/heapsort_vector_complex.rb +0 -21
  313. data/examples/sort/sort.rb +0 -23
  314. data/examples/sort/sort2.rb +0 -16
  315. data/examples/stats/mean.rb +0 -17
  316. data/examples/stats/statistics.rb +0 -18
  317. data/examples/stats/test.rb +0 -9
  318. data/examples/sum.rb +0 -34
  319. data/examples/tamu_anova.rb +0 -18
  320. data/examples/vector/a.dat +0 -0
  321. data/examples/vector/add.rb +0 -56
  322. data/examples/vector/b.dat +0 -4
  323. data/examples/vector/c.dat +0 -3
  324. data/examples/vector/collect.rb +0 -26
  325. data/examples/vector/compare.rb +0 -28
  326. data/examples/vector/complex.rb +0 -51
  327. data/examples/vector/complex_get_all.rb +0 -85
  328. data/examples/vector/complex_set_all.rb +0 -131
  329. data/examples/vector/complex_view_all.rb +0 -77
  330. data/examples/vector/connect.rb +0 -22
  331. data/examples/vector/decimate.rb +0 -38
  332. data/examples/vector/diff.rb +0 -31
  333. data/examples/vector/filescan.rb +0 -17
  334. data/examples/vector/floor.rb +0 -23
  335. data/examples/vector/get_all.rb +0 -82
  336. data/examples/vector/gnuplot.rb +0 -38
  337. data/examples/vector/graph.rb +0 -28
  338. data/examples/vector/histogram.rb +0 -22
  339. data/examples/vector/linspace.rb +0 -24
  340. data/examples/vector/log.rb +0 -17
  341. data/examples/vector/logic.rb +0 -33
  342. data/examples/vector/logspace.rb +0 -25
  343. data/examples/vector/minmax.rb +0 -47
  344. data/examples/vector/mul.rb +0 -49
  345. data/examples/vector/narray.rb +0 -46
  346. data/examples/vector/read.rb +0 -29
  347. data/examples/vector/set.rb +0 -35
  348. data/examples/vector/set_all.rb +0 -121
  349. data/examples/vector/smpv.dat +0 -15
  350. data/examples/vector/test.rb +0 -43
  351. data/examples/vector/test_gslblock.rb +0 -58
  352. data/examples/vector/vector.rb +0 -110
  353. data/examples/vector/view.rb +0 -35
  354. data/examples/vector/view_all.rb +0 -73
  355. data/examples/vector/where.rb +0 -29
  356. data/examples/vector/write.rb +0 -24
  357. data/examples/vector/zip.rb +0 -34
  358. data/examples/wavelet/ecg.dat +0 -256
  359. data/examples/wavelet/wavelet1.rb +0 -50
  360. data/ext/gsl_native/alf.c +0 -206
  361. data/ext/gsl_native/array.c +0 -553
  362. data/ext/gsl_native/array_complex.c +0 -245
  363. data/ext/gsl_native/blas.c +0 -28
  364. data/ext/gsl_native/blas1.c +0 -733
  365. data/ext/gsl_native/blas2.c +0 -1088
  366. data/ext/gsl_native/blas3.c +0 -880
  367. data/ext/gsl_native/block.c +0 -40
  368. data/ext/gsl_native/block_source.h +0 -885
  369. data/ext/gsl_native/bspline.c +0 -122
  370. data/ext/gsl_native/bundle.c +0 -3
  371. data/ext/gsl_native/cdf.c +0 -740
  372. data/ext/gsl_native/cheb.c +0 -531
  373. data/ext/gsl_native/combination.c +0 -275
  374. data/ext/gsl_native/common.c +0 -293
  375. data/ext/gsl_native/complex.c +0 -1002
  376. data/ext/gsl_native/const.c +0 -331
  377. data/ext/gsl_native/const_additional.c +0 -99
  378. data/ext/gsl_native/cqp.c +0 -283
  379. data/ext/gsl_native/deriv.c +0 -187
  380. data/ext/gsl_native/dht.c +0 -353
  381. data/ext/gsl_native/diff.c +0 -164
  382. data/ext/gsl_native/dirac.c +0 -388
  383. data/ext/gsl_native/eigen.c +0 -2322
  384. data/ext/gsl_native/error.c +0 -193
  385. data/ext/gsl_native/extconf.rb +0 -118
  386. data/ext/gsl_native/fft.c +0 -1095
  387. data/ext/gsl_native/fit.c +0 -204
  388. data/ext/gsl_native/fresnel.c +0 -312
  389. data/ext/gsl_native/function.c +0 -518
  390. data/ext/gsl_native/geometry.c +0 -139
  391. data/ext/gsl_native/graph.c +0 -1590
  392. data/ext/gsl_native/gsl.c +0 -259
  393. data/ext/gsl_native/gsl_narray.c +0 -794
  394. data/ext/gsl_native/histogram.c +0 -1964
  395. data/ext/gsl_native/histogram2d.c +0 -1042
  396. data/ext/gsl_native/histogram3d.c +0 -884
  397. data/ext/gsl_native/histogram3d_source.c +0 -749
  398. data/ext/gsl_native/histogram_find.c +0 -99
  399. data/ext/gsl_native/histogram_oper.c +0 -150
  400. data/ext/gsl_native/ieee.c +0 -88
  401. data/ext/gsl_native/include/rb_gsl.h +0 -136
  402. data/ext/gsl_native/include/rb_gsl_array.h +0 -214
  403. data/ext/gsl_native/include/rb_gsl_cheb.h +0 -19
  404. data/ext/gsl_native/include/rb_gsl_common.h +0 -348
  405. data/ext/gsl_native/include/rb_gsl_complex.h +0 -25
  406. data/ext/gsl_native/include/rb_gsl_const.h +0 -23
  407. data/ext/gsl_native/include/rb_gsl_dirac.h +0 -6
  408. data/ext/gsl_native/include/rb_gsl_eigen.h +0 -17
  409. data/ext/gsl_native/include/rb_gsl_fft.h +0 -49
  410. data/ext/gsl_native/include/rb_gsl_fit.h +0 -23
  411. data/ext/gsl_native/include/rb_gsl_function.h +0 -23
  412. data/ext/gsl_native/include/rb_gsl_graph.h +0 -68
  413. data/ext/gsl_native/include/rb_gsl_histogram.h +0 -63
  414. data/ext/gsl_native/include/rb_gsl_histogram3d.h +0 -97
  415. data/ext/gsl_native/include/rb_gsl_integration.h +0 -17
  416. data/ext/gsl_native/include/rb_gsl_interp.h +0 -41
  417. data/ext/gsl_native/include/rb_gsl_linalg.h +0 -21
  418. data/ext/gsl_native/include/rb_gsl_math.h +0 -20
  419. data/ext/gsl_native/include/rb_gsl_odeiv.h +0 -18
  420. data/ext/gsl_native/include/rb_gsl_poly.h +0 -67
  421. data/ext/gsl_native/include/rb_gsl_rational.h +0 -30
  422. data/ext/gsl_native/include/rb_gsl_rng.h +0 -20
  423. data/ext/gsl_native/include/rb_gsl_root.h +0 -22
  424. data/ext/gsl_native/include/rb_gsl_sf.h +0 -110
  425. data/ext/gsl_native/include/rb_gsl_statistics.h +0 -17
  426. data/ext/gsl_native/include/rb_gsl_tensor.h +0 -43
  427. data/ext/gsl_native/include/rb_gsl_with_narray.h +0 -31
  428. data/ext/gsl_native/include/templates_off.h +0 -87
  429. data/ext/gsl_native/include/templates_on.h +0 -241
  430. data/ext/gsl_native/integration.c +0 -1154
  431. data/ext/gsl_native/interp.c +0 -499
  432. data/ext/gsl_native/jacobi.c +0 -733
  433. data/ext/gsl_native/linalg.c +0 -3915
  434. data/ext/gsl_native/linalg_complex.c +0 -726
  435. data/ext/gsl_native/math.c +0 -706
  436. data/ext/gsl_native/matrix.c +0 -36
  437. data/ext/gsl_native/matrix_complex.c +0 -1733
  438. data/ext/gsl_native/matrix_double.c +0 -557
  439. data/ext/gsl_native/matrix_int.c +0 -255
  440. data/ext/gsl_native/matrix_source.h +0 -2708
  441. data/ext/gsl_native/min.c +0 -219
  442. data/ext/gsl_native/monte.c +0 -978
  443. data/ext/gsl_native/multifit.c +0 -1862
  444. data/ext/gsl_native/multimin.c +0 -778
  445. data/ext/gsl_native/multimin_fsdf.c +0 -156
  446. data/ext/gsl_native/multiroots.c +0 -952
  447. data/ext/gsl_native/multiset.c +0 -210
  448. data/ext/gsl_native/ndlinear.c +0 -320
  449. data/ext/gsl_native/nmf.c +0 -171
  450. data/ext/gsl_native/nmf_wrap.c +0 -75
  451. data/ext/gsl_native/ntuple.c +0 -469
  452. data/ext/gsl_native/odeiv.c +0 -947
  453. data/ext/gsl_native/ool.c +0 -879
  454. data/ext/gsl_native/permutation.c +0 -598
  455. data/ext/gsl_native/poly.c +0 -39
  456. data/ext/gsl_native/poly2.c +0 -265
  457. data/ext/gsl_native/poly_source.h +0 -1871
  458. data/ext/gsl_native/qrng.c +0 -160
  459. data/ext/gsl_native/randist.c +0 -1848
  460. data/ext/gsl_native/rational.c +0 -480
  461. data/ext/gsl_native/rng.c +0 -595
  462. data/ext/gsl_native/root.c +0 -407
  463. data/ext/gsl_native/sf.c +0 -1446
  464. data/ext/gsl_native/sf_airy.c +0 -200
  465. data/ext/gsl_native/sf_bessel.c +0 -871
  466. data/ext/gsl_native/sf_clausen.c +0 -28
  467. data/ext/gsl_native/sf_coulomb.c +0 -206
  468. data/ext/gsl_native/sf_coupling.c +0 -121
  469. data/ext/gsl_native/sf_dawson.c +0 -29
  470. data/ext/gsl_native/sf_debye.c +0 -148
  471. data/ext/gsl_native/sf_dilog.c +0 -43
  472. data/ext/gsl_native/sf_elementary.c +0 -46
  473. data/ext/gsl_native/sf_ellint.c +0 -206
  474. data/ext/gsl_native/sf_elljac.c +0 -30
  475. data/ext/gsl_native/sf_erfc.c +0 -89
  476. data/ext/gsl_native/sf_exp.c +0 -169
  477. data/ext/gsl_native/sf_expint.c +0 -201
  478. data/ext/gsl_native/sf_fermi_dirac.c +0 -148
  479. data/ext/gsl_native/sf_gamma.c +0 -343
  480. data/ext/gsl_native/sf_gegenbauer.c +0 -97
  481. data/ext/gsl_native/sf_hyperg.c +0 -203
  482. data/ext/gsl_native/sf_laguerre.c +0 -113
  483. data/ext/gsl_native/sf_lambert.c +0 -47
  484. data/ext/gsl_native/sf_legendre.c +0 -368
  485. data/ext/gsl_native/sf_log.c +0 -105
  486. data/ext/gsl_native/sf_mathieu.c +0 -235
  487. data/ext/gsl_native/sf_power.c +0 -47
  488. data/ext/gsl_native/sf_psi.c +0 -89
  489. data/ext/gsl_native/sf_synchrotron.c +0 -48
  490. data/ext/gsl_native/sf_transport.c +0 -76
  491. data/ext/gsl_native/sf_trigonometric.c +0 -210
  492. data/ext/gsl_native/sf_zeta.c +0 -115
  493. data/ext/gsl_native/signal.c +0 -303
  494. data/ext/gsl_native/siman.c +0 -713
  495. data/ext/gsl_native/sort.c +0 -207
  496. data/ext/gsl_native/spline.c +0 -377
  497. data/ext/gsl_native/stats.c +0 -787
  498. data/ext/gsl_native/sum.c +0 -168
  499. data/ext/gsl_native/tamu_anova.c +0 -56
  500. data/ext/gsl_native/tensor.c +0 -35
  501. data/ext/gsl_native/tensor_source.h +0 -1122
  502. data/ext/gsl_native/vector.c +0 -35
  503. data/ext/gsl_native/vector_complex.c +0 -2241
  504. data/ext/gsl_native/vector_double.c +0 -1433
  505. data/ext/gsl_native/vector_int.c +0 -202
  506. data/ext/gsl_native/vector_source.h +0 -3321
  507. data/ext/gsl_native/wavelet.c +0 -923
  508. data/lib/gsl.rb +0 -8
  509. data/lib/gsl/gnuplot.rb +0 -41
  510. data/lib/gsl/oper.rb +0 -43
  511. data/lib/gsl/version.rb +0 -3
  512. data/lib/ool.rb +0 -22
  513. data/lib/ool/conmin.rb +0 -30
  514. data/lib/rbgsl.rb +0 -1
  515. data/rdoc/alf.rdoc +0 -77
  516. data/rdoc/blas.rdoc +0 -269
  517. data/rdoc/bspline.rdoc +0 -42
  518. data/rdoc/changes.rdoc +0 -159
  519. data/rdoc/cheb.rdoc +0 -99
  520. data/rdoc/cholesky_complex.rdoc +0 -46
  521. data/rdoc/combi.rdoc +0 -125
  522. data/rdoc/complex.rdoc +0 -210
  523. data/rdoc/const.rdoc +0 -546
  524. data/rdoc/dht.rdoc +0 -122
  525. data/rdoc/diff.rdoc +0 -133
  526. data/rdoc/ehandling.rdoc +0 -50
  527. data/rdoc/eigen.rdoc +0 -401
  528. data/rdoc/fft.rdoc +0 -535
  529. data/rdoc/fit.rdoc +0 -284
  530. data/rdoc/function.rdoc +0 -94
  531. data/rdoc/graph.rdoc +0 -137
  532. data/rdoc/hist.rdoc +0 -409
  533. data/rdoc/hist2d.rdoc +0 -279
  534. data/rdoc/hist3d.rdoc +0 -112
  535. data/rdoc/integration.rdoc +0 -398
  536. data/rdoc/interp.rdoc +0 -231
  537. data/rdoc/intro.rdoc +0 -27
  538. data/rdoc/linalg.rdoc +0 -681
  539. data/rdoc/linalg_complex.rdoc +0 -88
  540. data/rdoc/math.rdoc +0 -276
  541. data/rdoc/matrix.rdoc +0 -1093
  542. data/rdoc/min.rdoc +0 -189
  543. data/rdoc/monte.rdoc +0 -234
  544. data/rdoc/multimin.rdoc +0 -312
  545. data/rdoc/multiroot.rdoc +0 -293
  546. data/rdoc/narray.rdoc +0 -177
  547. data/rdoc/ndlinear.rdoc +0 -250
  548. data/rdoc/nonlinearfit.rdoc +0 -348
  549. data/rdoc/ntuple.rdoc +0 -88
  550. data/rdoc/odeiv.rdoc +0 -378
  551. data/rdoc/perm.rdoc +0 -221
  552. data/rdoc/poly.rdoc +0 -335
  553. data/rdoc/qrng.rdoc +0 -90
  554. data/rdoc/randist.rdoc +0 -233
  555. data/rdoc/ref.rdoc +0 -93
  556. data/rdoc/rng.rdoc +0 -203
  557. data/rdoc/roots.rdoc +0 -305
  558. data/rdoc/sf.rdoc +0 -1622
  559. data/rdoc/siman.rdoc +0 -89
  560. data/rdoc/sort.rdoc +0 -94
  561. data/rdoc/start.rdoc +0 -16
  562. data/rdoc/stats.rdoc +0 -219
  563. data/rdoc/sum.rdoc +0 -65
  564. data/rdoc/tensor.rdoc +0 -251
  565. data/rdoc/tut.rdoc +0 -5
  566. data/rdoc/use.rdoc +0 -177
  567. data/rdoc/vector.rdoc +0 -1243
  568. data/rdoc/vector_complex.rdoc +0 -347
  569. data/rdoc/wavelet.rdoc +0 -218
  570. data/test/gsl/blas_test.rb +0 -79
  571. data/test/gsl/bspline_test.rb +0 -63
  572. data/test/gsl/cdf_test.rb +0 -1512
  573. data/test/gsl/cheb_test.rb +0 -80
  574. data/test/gsl/combination_test.rb +0 -100
  575. data/test/gsl/complex_test.rb +0 -20
  576. data/test/gsl/const_test.rb +0 -29
  577. data/test/gsl/deriv_test.rb +0 -62
  578. data/test/gsl/dht_test.rb +0 -79
  579. data/test/gsl/diff_test.rb +0 -53
  580. data/test/gsl/eigen_test.rb +0 -563
  581. data/test/gsl/err_test.rb +0 -23
  582. data/test/gsl/fit_test.rb +0 -101
  583. data/test/gsl/histo_test.rb +0 -14
  584. data/test/gsl/index_test.rb +0 -61
  585. data/test/gsl/integration_test.rb +0 -274
  586. data/test/gsl/interp_test.rb +0 -27
  587. data/test/gsl/linalg_test.rb +0 -463
  588. data/test/gsl/matrix_nmf_test.rb +0 -37
  589. data/test/gsl/matrix_test.rb +0 -98
  590. data/test/gsl/min_test.rb +0 -89
  591. data/test/gsl/monte_test.rb +0 -77
  592. data/test/gsl/multifit_test.rb +0 -753
  593. data/test/gsl/multimin_test.rb +0 -157
  594. data/test/gsl/multiroot_test.rb +0 -135
  595. data/test/gsl/multiset_test.rb +0 -52
  596. data/test/gsl/odeiv_test.rb +0 -275
  597. data/test/gsl/oper_test.rb +0 -98
  598. data/test/gsl/poly_test.rb +0 -338
  599. data/test/gsl/qrng_test.rb +0 -94
  600. data/test/gsl/quartic_test.rb +0 -28
  601. data/test/gsl/randist_test.rb +0 -122
  602. data/test/gsl/rng_test.rb +0 -303
  603. data/test/gsl/roots_test.rb +0 -78
  604. data/test/gsl/sf_test.rb +0 -2079
  605. data/test/gsl/stats_test.rb +0 -122
  606. data/test/gsl/sum_test.rb +0 -69
  607. data/test/gsl/tensor_test.rb +0 -396
  608. data/test/gsl/vector_test.rb +0 -223
  609. data/test/gsl/wavelet_test.rb +0 -130
  610. data/test/gsl_test.rb +0 -321
  611. data/test/test_helper.rb +0 -42
  612. data/uncrustify.cfg +0 -1693
@@ -1,88 +0,0 @@
1
- #
2
- # === Complex LU decomposition
3
- #
4
- # ---
5
- # * GSL::Linalg::Complex::LU_decomp!(A)
6
- # * GSL::Linalg::Complex::LU::decomp!(A)
7
- # * GSL::Matrix::Complex#LU_decomp!
8
- # * GSL::Matrix::Complex#LU_decomp!
9
- #
10
- # Factorizes the square matrix <tt>A</tt> into the LU decomposition PA = LU,
11
- # and returns an array, <tt>[perm, signum]</tt>. <tt>A</tt> is changed.
12
- #
13
- # ---
14
- # * GSL::Linalg::Complex::LU_decomp(A)
15
- # * GSL::Linalg::Complex::LU::decomp(A)
16
- # * GSL::Matrix::Complex#LU_decomp
17
- #
18
- # Factorizes the square matrix <tt>A</tt> into the LU decomposition PA = LU,
19
- # and returns an array, <tt>[LU, perm, signum]</tt>. <tt>A</tt> is not changed.
20
- #
21
- # ---
22
- # * GSL::Linalg::Complex::LU_solve(A, b)
23
- # * GSL::Linalg::Complex::LU::solve(A, b)
24
- # * GSL::Linalg::Complex::LU_solve(A, b)
25
- # * GSL::Matrix::Complex#LU_solve(b)
26
- # * GSL::Linalg::Complex::solve(LU, perm, b)
27
- # * GSL::Linalg::Complex::LU::solve(LU, perm, b)
28
- # * GSL::Linalg::Complex::LU::LUMatirx#solve(perm, b)
29
- #
30
- #
31
- # ---
32
- # * GSL::Linalg::Complex::LU_svx(A, x)
33
- # * GSL::Linalg::Complex::LU::svx(A, x)
34
- # * GSL::Linalg::Complex::LU_svx(A, x)
35
- # * GSL::Matrix::Complex#LU_svx(x)
36
- # * GSL::Linalg::Complex::svx(LU, perm, x)
37
- # * GSL::Linalg::Complex::LU::svx(LU, perm, x)
38
- # * GSL::Linalg::Complex::LU::LUMatirx#svx(perm, x)
39
- #
40
- #
41
- # ---
42
- # * GSL::Linalg::Complex::LU_refine(A, LU, perm, b, x)
43
- # * GSL::Linalg::Complex::LU_::refine(A, LU, perm, b, x)
44
- #
45
- #
46
- # ---
47
- # * GSL::Linalg::Complex::LU_invert(A)
48
- # * GSL::Linalg::Complex::LU::invert(A)
49
- # * GSL::Linalg::Complex::LU_invert(LU, perm)
50
- # * GSL::Linalg::Complex::LU::invert(LU, perm)
51
- # * GSL::Matrix::Complex#LU_invert
52
- # * GSL::Matrix::Complex#invert
53
- # * GSL::Linalg::Complex::LU::LUMatrix#invert(perm)
54
- #
55
- #
56
- # ---
57
- # * GSL::Linalg::Complex::LU_det(A)
58
- # * GSL::Linalg::Complex::LU::det(A)
59
- # * GSL::Linalg::Complex::LU_det(LU, signum)
60
- # * GSL::Linalg::Complex::LU::det(LU, signum)
61
- # * GSL::Matrix::Complex#LU_det
62
- # * GSL::Matrix::Complex#det
63
- # * GSL::Linalg::Complex::LU::LUMatrix#det(signum)
64
- #
65
- #
66
- # ---
67
- # * GSL::Linalg::Complex::LU_lndet(A)
68
- # * GSL::Linalg::Complex::LU::lndet(A)
69
- # * GSL::Linalg::Complex::LU_lndet(LU)
70
- # * GSL::Linalg::Complex::LU::lndet(LU)
71
- # * GSL::Matrix::Complex#LU_lndet
72
- # * GSL::Matrix::Complex#lndet
73
- # * GSL::Linalg::Complex::LU::LUMatrix#lndet
74
- #
75
- #
76
- # ---
77
- # * GSL::Linalg::Complex::LU_sgndet(A)
78
- # * GSL::Linalg::Complex::LU::sgndet(A)
79
- # * GSL::Linalg::Complex::LU_sgndet(LU, signum)
80
- # * GSL::Linalg::Complex::LU::sgndet(LU, signum)
81
- # * GSL::Matrix::Complex#LU_sgndet
82
- # * GSL::Matrix::Complex#sgndet
83
- # * GSL::Linalg::Complex::LU::LUMatrix#sgndet(signum)
84
- #
85
- #
86
- # {back}[link:rdoc/linalg_rdoc.html]
87
- #
88
- #
@@ -1,276 +0,0 @@
1
- #
2
- # = Mathematical Functions
3
- # Contents:
4
- # 1. {Mathematical Constants}[link:rdoc/math_rdoc.html#label-Mathematical+Constants]
5
- # 1. {Infinities and Not-a-number}[link:rdoc/math_rdoc.html#label-Infinities+and+Not-a-number]
6
- # 1. {Constants}[link:rdoc/math_rdoc.html#label-Constants]
7
- # 1. {Module functions}[link:rdoc/math_rdoc.html#label-Module+functions]
8
- # 1. {Elementary Functions}[link:rdoc/math_rdoc.html#label-Elementary+Functions]
9
- # 1. {Small Integer Powers}[link:rdoc/math_rdoc.html#label-Small+Integer+Powers]
10
- # 1. {Testing the Sign of Numbers}[link:rdoc/math_rdoc.html#label-Testing+the+Sign+of+Numbers]
11
- # 1. {Testing for Odd and Even Numbers}[link:rdoc/math_rdoc.html#label-Testing+for+Odd+and+Even+Numbers]
12
- # 1. {Maximum and Minimum functions}[link:rdoc/math_rdoc.html#label-Maximum+and+Minimum+functions]
13
- # 1. {Approximate Comparison of Floating Point Numbers}[link:rdoc/math_rdoc.html#label-Approximate+Comparison+of+Floating+Point+Numbers]
14
- #
15
- # == Mathematical Constants
16
- # ---
17
- # * GSL::M_E
18
- #
19
- # The base of exponentials, e
20
- # ---
21
- # * GSL::M_LOG2E
22
- #
23
- # The base-2 logarithm of e, log_2(e)
24
- # ---
25
- # * GSL::M_LOG10E
26
- #
27
- # The base-10 logarithm of e, log_10(e)
28
- # ---
29
- # * GSL::M_SQRT2
30
- #
31
- # The square root of two, sqrt(2)
32
- # ---
33
- # * GSL::M_SQRT1_2
34
- #
35
- # The square root of one-half, sqrt(1/2)
36
- # ---
37
- # * GSL::M_SQRT3
38
- #
39
- # The square root of three, sqrt(3)
40
- # ---
41
- # * GSL::M_PI
42
- #
43
- # The constant pi
44
- # ---
45
- # * GSL::M_PI_2
46
- #
47
- # Pi divided by two
48
- # ---
49
- # * GSL::M_PI_4
50
- #
51
- # Pi divided by four
52
- # ---
53
- # * GSL::M_SQRTPI
54
- #
55
- # The square root of pi
56
- # ---
57
- # * GSL::M_2_SQRTPI
58
- #
59
- # Two divided by the square root of pi
60
- # ---
61
- # * GSL::M_1_PI
62
- #
63
- # The reciprocal of pi, 1/pi
64
- # ---
65
- # * GSL::M_2_PI
66
- #
67
- # Twice the reciprocal of pi, 2/pi
68
- # ---
69
- # * GSL::M_LN10
70
- #
71
- # The natural logarithm of ten, ln(10)
72
- # ---
73
- # * GSL::M_LN2
74
- #
75
- # The natural logarithm of ten, ln(2)
76
- # ---
77
- # * GSL::M_LNPI
78
- #
79
- # The natural logarithm of ten, ln(pi)
80
- # ---
81
- # * GSL::M_EULER
82
- #
83
- # Euler's constant
84
- #
85
- # == Infinities and Not-a-number
86
- #
87
- # === Constants
88
- # ---
89
- # * GSL::POSINF
90
- #
91
- # The IEEE representation of positive infinity,
92
- # computed from the expression +1.0/0.0.
93
- # ---
94
- # * GSL::NEGINF
95
- #
96
- # The IEEE representation of negative infinity,
97
- # computed from the expression -1.0/0.0.
98
- # ---
99
- # * GSL::NAN
100
- #
101
- # The IEEE representation of the Not-a-Number symbol,
102
- # computed from the ratio 0.0/0.0.
103
- #
104
- # === Module functions
105
- # ---
106
- # * GSL::isnan(x)
107
- #
108
- # This returns 1 if <tt>x</tt> is not-a-number.
109
- # ---
110
- # * GSL::isnan?(x)
111
- #
112
- # This returns <tt>true</tt> if <tt>x</tt> is not-a-number, and <tt>false</tt> otherwise.
113
- # ---
114
- # * GSL::isinf(x)
115
- #
116
- # This returns +1 if <tt>x</tt> is positive infinity,
117
- # -1 if <tt>x</tt> is negative infinity and 0 otherwise.
118
- # NOTE: In Darwin9.5.0-gcc4.0.1, this method returns 1 for -inf.
119
- # ---
120
- # * GSL::isinf?(x)
121
- #
122
- # This returns <tt>true</tt> if <tt>x</tt> is positive or negative infinity,
123
- # and <tt>false</tt> otherwise.
124
- # ---
125
- # * GSL::finite(x)
126
- #
127
- # This returns 1 if <tt>x</tt> is a real number,
128
- # and 0 if it is infinite or not-a-number.
129
- # ---
130
- # * GSL::finite?(x)
131
- #
132
- # This returns <tt>true</tt> if <tt>x</tt> is a real number,
133
- # and <tt>false</tt> if it is infinite or not-a-number.
134
- #
135
- # == Elementary Functions
136
- # ---
137
- # * GSL::log1p(x)
138
- #
139
- # This method computes the value of log(1+x)
140
- # in a way that is accurate for small <tt>x</tt>. It provides an alternative
141
- # to the BSD math function log1p(x).
142
- # ---
143
- # * GSL::expm1(x)
144
- #
145
- # This method computes the value of exp(x)-1
146
- # in a way that is accurate for small <tt>x</tt>. It provides an alternative
147
- # to the BSD math function expm1(x).
148
- # ---
149
- # * GSL::hypot(x, y)
150
- #
151
- # This method computes the value of sqrt{x^2 + y^2} in a way that
152
- # avoids overflow.
153
- # ---
154
- # * GSL::hypot3(x, y, z)
155
- #
156
- # Computes the value of sqrt{x^2 + y^2 + z^2} in a way that avoids overflow.
157
- # ---
158
- # * GSL::acosh(x)
159
- #
160
- # This method computes the value of arccosh(x).
161
- # ---
162
- # * GSL::asinh(x)
163
- #
164
- # This method computes the value of arcsinh(x).
165
- # ---
166
- # * GSL::atanh(x)
167
- #
168
- # This method computes the value of arctanh(x).
169
- #
170
- # These methods above can take argument <tt>x</tt> of
171
- # Integer, Float, Array, Vector or Matrix.
172
- #
173
- # ---
174
- # * GSL::ldexp(x)
175
- #
176
- # This method computes the value of x * 2^e.
177
- # ---
178
- # * GSL::frexp(x)
179
- #
180
- # This method splits the number <tt>x</tt> into its normalized fraction
181
- # f and exponent e, such that x = f * 2^e and 0.5 <= f < 1.
182
- # The method returns f and the exponent e as an array, [f, e].
183
- # If <tt>x</tt> is zero, both f and e are set to zero.
184
- #
185
- # == Small Integer Powers
186
- # ---
187
- # * GSL::pow_int(x, n)
188
- #
189
- # This routine computes the power <tt>x^n</tt> for integer <tt>n</tt>.
190
- # The power is computed efficiently -- for example, x^8 is computed as
191
- # ((x^2)^2)^2, requiring only 3 multiplications.
192
- #
193
- # ---
194
- # * GSL::pow_2(x)
195
- # * GSL::pow_3(x)
196
- # * GSL::pow_4(x)
197
- # * GSL::pow_5(x)
198
- # * GSL::pow_6(x)
199
- # * GSL::pow_7(x)
200
- # * GSL::pow_8(x)
201
- # * GSL::pow_9(x)
202
- #
203
- # These methods can be used to compute small integer powers x^2, x^3, etc.
204
- # efficiently.
205
- #
206
- # == Testing the Sign of Numbers
207
- # ---
208
- # * GSL::SIGN(x)
209
- # * GSL::sign(x)
210
- #
211
- # Return the sign of <tt>x</tt>.
212
- # It is defined as ((x) >= 0 ? 1 : -1).
213
- # Note that with this definition the sign of zero is positive
214
- # (regardless of its IEEE sign bit).
215
- #
216
- # == Testing for Odd and Even Numbers
217
- # ---
218
- # * GSL::is_odd(n)
219
- # * GSL::IS_ODD(n)
220
- #
221
- # Evaluate to 1 if <tt>n</tt> is odd and 0 if <tt>n</tt> is even.
222
- # The argument <tt>n</tt> must be of Fixnum type.
223
- # ---
224
- # * GSL::is_odd?(n)
225
- # * GSL::IS_ODD?(n)
226
- #
227
- # Return <tt>true</tt> if <tt>n</tt> is odd and <tt>false</tt> if even.
228
- # ---
229
- # * GSL::is_even(n)
230
- # * GSL::IS_EVEN(n)
231
- #
232
- # Evaluate to 1 if <tt>n</tt> is even and 0 if <tt>n</tt> is odd.
233
- # The argument <tt>n</tt> must be of Fixnum type.
234
- # ---
235
- # * GSL::is_even?(n)
236
- # * GSL::IS_even?(n)
237
- #
238
- # Return <tt>true</tt> if <tt>n</tt> is even and <tt>false</tt> if odd.
239
- #
240
- # == Maximum and Minimum functions
241
- # ---
242
- # * GSL::max(a, b)
243
- # * GSL::MAX(a, b)
244
- # * GSL::min(a, b)
245
- # * GSL::MIN(a, b)
246
- #
247
- #
248
- # == Approximate Comparison of Floating Point Numbers
249
- # ---
250
- # * GSL::fcmp(a, b, epsilon = 1e-10)
251
- #
252
- # This method determines whether <tt>x</tt> and <tt>y</tt> are approximately equal to a
253
- # relative accuracy <tt>epsilon</tt>.
254
- # ---
255
- # * GSL::equal?(a, b, epsilon = 1e-10)
256
- #
257
- #
258
- # == Module Constants
259
- # ---
260
- # * GSL::VERSION
261
- #
262
- # GSL version
263
- #
264
- # ---
265
- # * GSL::RB_GSL_VERSION
266
- # * GSL::RUBY_GSL_VERSION
267
- #
268
- # Ruby/GSL version
269
- #
270
- # {prev}[link:rdoc/ehandling_rdoc.html]
271
- # {next}[link:rdoc/complex_rdoc.html]
272
- #
273
- # {Reference index}[link:rdoc/ref_rdoc.html]
274
- # {top}[link:index.html]
275
- #
276
- #
@@ -1,1093 +0,0 @@
1
- #
2
- # = Matrices
3
- # Contents:
4
- # 1. {Class methods}[link:rdoc/matrix_rdoc.html#label-Class+methods]
5
- # 1. {Instance methods}[link:rdoc/matrix_rdoc.html#label-Instance+Methods]
6
- # 1. {Accessing matrix elements}[link:rdoc/matrix_rdoc.html#label-Accessing+matrix+elements]
7
- # 1. {Initializing matrix elements}[link:rdoc/matrix_rdoc.html#label-Initializing+matrix+elements]
8
- # 1. {IO}[link:rdoc/matrix_rdoc.html#label-IO]
9
- # 1. {Matrix views}[link:rdoc/matrix_rdoc.html#label-Matrix+views]
10
- # 1. {Creating row and column views}[link:rdoc/matrix_rdoc.html#label-Creating+row+and+column+views]
11
- # 1. {Iterators}[link:rdoc/matrix_rdoc.html#label-Iterators]
12
- # 1. {Copying matrices}[link:rdoc/matrix_rdoc.html#label-Copying+matrices]
13
- # 1. {Copying rows and columns}[link:rdoc/matrix_rdoc.html#label-Copying+rows+and+columns]
14
- # 1. {Exchanging rows and columns}[link:rdoc/matrix_rdoc.html#label-Exchanging+rows+and+columns]
15
- # 1. {Matrix operations}[link:rdoc/matrix_rdoc.html#label-Matrix+operations]
16
- # 1. {Finding maximum and minimum elements of matrices}[link:rdoc/matrix_rdoc.html#label-Finding+maximum+and+minimum+elements+of+matrices]
17
- # 1. {Matrix properties}[link:rdoc/matrix_rdoc.html#label-Matrix+properties]
18
- # 1. {NArray}[link:rdoc/matrix_rdoc.html#label-NArray]
19
- # 1. {Special matrices}[link:rdoc/matrix_rdoc.html#label-Special+matrices]
20
- #
21
- # == Class methods
22
- #
23
- # ---
24
- # * GSL::Matrix.alloc(n)
25
- # * GSL::Matrix.alloc(size1, size2)
26
- # * GSL::Matrix.alloc(array)
27
- # * GSL::Matrix.alloc(arrays)
28
- # * GSL::Matrix.alloc( ... )
29
- # * GSL::Matrix[ ... ]
30
- #
31
- # These methods create a <tt>GSL::Matrix</tt> object.
32
- #
33
- # 1. From arrays
34
- # >> m = GSL::Matrix[[1, 2, 3], [4, 5, 6], [7, 8, 9]]
35
- # => GSL::Matrix
36
- # [ 1.000e+00 2.000e+00 3.000e+00
37
- # 4.000e+00 5.000e+00 6.000e+00
38
- # 7.000e+00 8.000e+00 9.000e+00 ]
39
- #
40
- # 1. With an array and rows&cols,
41
- # m = GSL::Matrix.alloc([1, 2, 3, 4, 5, 6, 7, 8, 9], 3, 3)
42
- #
43
- # 1. With Range objects,
44
- # >> m = GSL::Matrix.alloc(1..3, 4..6, 7..9)
45
- # [ 1.000e+00 2.000e+00 3.000e+00
46
- # 4.000e+00 5.000e+00 6.000e+00
47
- # 7.000e+00 8.000e+00 9.000e+00 ]
48
- # >> m2 = GSL::Matrix[1..6, 2, 3]
49
- # [ 1.000e+00 2.000e+00 3.000e+00
50
- # 4.000e+00 5.000e+00 6.000e+00 ]
51
- #
52
- # ---
53
- # * GSL::Matrix.eye(n)
54
- # * GSL::Matrix.eye(n1, n2)
55
- #
56
- # Examples:
57
- # >> m = GSL::Matrix::Int.eye(3)
58
- # => GSL::Matrix::Int
59
- # [ 1 0 0
60
- # 0 1 0
61
- # 0 0 1 ]
62
- # >> m = GSL::Matrix::Int.eye(2, 4)
63
- # => GSL::Matrix::Int
64
- # [ 1 0 0 0
65
- # 0 1 0 0 ]
66
- #
67
- # ---
68
- # * GSL::Matrix.identity(n)
69
- # * GSL::Matrix.scalar(n)
70
- # * GSL::Matrix.unit(n)
71
- # * GSL::Matrix.I(n)
72
- #
73
- # Create diagonal matrices of dimensions n*n, of values 1.0.
74
- #
75
- # ---
76
- # * GSL::Matrix.diagonal(a, b, c, ...)
77
- # * GSL::Matrix.diagonal(Ary)
78
- # * GSL::Matrix.diagonal(Range)
79
- # * GSL::Matrix.diagonal(Vector)
80
- #
81
- # Creates a diagonal matrix of given elements.
82
- #
83
- # Example:
84
- # >> GSL::Matrix::Int.diagonal(1..4)
85
- # => GSL::Matrix::Int
86
- # [ 1 0 0 0
87
- # 0 2 0 0
88
- # 0 0 3 0
89
- # 0 0 0 4 ]
90
- # >> GSL::Matrix::Int.diagonal(2, 5, 3)
91
- # => GSL::Matrix::Int
92
- # [ 2 0 0
93
- # 0 5 0
94
- # 0 0 3 ]
95
- #
96
- # ---
97
- # * GSL::Matrix.ones(n)
98
- # * GSL::Matrix.ones(n1, n2)
99
- #
100
- # Create a matrix of all the elements 1.
101
- #
102
- # ---
103
- # * GSL::Matrix.zeros(n)
104
- # * GSL::Matrix.zeros(n1, n2)
105
- #
106
- # Create a matrix of all the elements 1.
107
- #
108
- # ---
109
- # * GSL::Matrix.indgen(n1, n2, start=0, step=1)
110
- #
111
- # Example:
112
- #
113
- # >> m = GSL::Matrix::Int.indgen(3, 5)
114
- # => GSL::Matrix::Int
115
- # [ 0 1 2 3 4
116
- # 5 6 7 8 9
117
- # 10 11 12 13 14 ]
118
- # >> m = GSL::Matrix::Int.indgen(3, 5, 2)
119
- # => GSL::Matrix::Int
120
- # [ 2 3 4 5 6
121
- # 7 8 9 10 11
122
- # 12 13 14 15 16 ]
123
- # >> m = GSL::Matrix.indgen(2, 3, 4.5, 6.7)
124
- # => GSL::Matrix
125
- # [ 4.500e+00 1.120e+01 1.790e+01
126
- # 2.460e+01 3.130e+01 3.800e+01 ]
127
- #
128
- # === NOTE:
129
- # Matrix dimensions are limited within the range of Fixnum.
130
- # For 32-bit CPU, the maximum of matrix dimension is 2^30 ~ 1e9.
131
- #
132
- # == Instance Methods
133
- # === Accessing matrix elements
134
- #
135
- # ---
136
- # * GSL::Matrix#size1
137
- #
138
- # Returns the number of rows of matrix <tt>self</tt>.
139
- # ---
140
- # * GSL::Matrix#size2
141
- #
142
- # Returns the number of columns of matrix <tt>self</tt>.
143
- # ---
144
- # * GSL::Matrix#shape
145
- #
146
- # Returns the number of rows and columns as an array.
147
- #
148
- # Ex:
149
- #
150
- # >> m.size1
151
- # => 3
152
- # >> m.size2
153
- # => 5
154
- # >> m.shape
155
- # => [3, 5]
156
- #
157
- # ---
158
- # * GSL::Matrix#set(args, val)
159
- # * \GSL::Matrix#[args]=val
160
- #
161
- # If <tt>args</tt> is empty and <tt>val</tt> is an Array (i.e. called with just a
162
- # single Array argument), the Array's elements are taken as row contents.
163
- # Each given row must have exactly the same number of elements as the Matrix
164
- # has columns, but the number of rows given need not match the Matrix's row
165
- # count. Extra given rows are ignored, while Matrix rows beyond those given
166
- # are not affected. Otherwise, if <tt>args</tt> is empty, behaves as
167
- # <tt>#set_all(<tt>val</tt>)</tt>.
168
- #
169
- # If <tt>args</tt> is an Array and val is not, the first two elements of
170
- # <tt>args</tt> must be Fixnums which specify the row and column of the element
171
- # that will be set to the value of <tt>val</tt>. This special case exists to
172
- # allow values returned by Matrix#max_index and Matrix#min_index to be used
173
- # as indexes.
174
- #
175
- # If <tt>args</tt> are two <tt>Fixnums</tt>, <tt>i</tt> and <tt>j</tt>, this method
176
- # sets the <tt>(i,j)</tt>-th element of the matrix <tt>self</tt> to <tt>val</tt>.
177
- #
178
- # If <tt>args</tt> is a single <tt>Fixnum</tt>, <tt>i</tt>, this method sets the
179
- # element at row <tt>i</tt>/<tt>size2</tt>, column <tt>i</tt>%<tt>size2</tt> to
180
- # <tt>val</tt>.
181
- #
182
- # For <tt>#set</tt>, if <tt>args</tt> is empty and <tt>val</tt> is an <tt>Array</tt> of
183
- # <tt>Arrays</tt>, the contents of <tt>self</tt> are set row by row from the
184
- # elements (i.e. <tt>Arrays</tt>) of <tt>val</tt>.
185
- #
186
- # All other <tt>args</tt> specify a submatrix (as with <tt>#submatrix</tt>) whose
187
- # elements are assigned from <tt>val</tt>. In this case, <tt>val</tt> can be an
188
- # <tt>Array</tt> whose elements will be assigned to the rows of the submatrix,
189
- # <tt>Range</tt> whose elements will be assigned to the elements of the
190
- # submatrix, <tt>GSL::Matrix</tt> whose elements will be assigned to the
191
- # elements of the submatrix, or <tt>Numeric</tt> that will be assigned to all
192
- # elements of the submatrix.
193
- #
194
- # NOTE: GSL does not provide a matrix copy function that properly copies data
195
- # across overlapping memory regions, so watch out if assigning to part of a
196
- # Matrix from another part of itself (see <tt>#set</tt> example of
197
- # {GSL::Vector}[link:rdoc/vector_rdoc.html]).
198
- #
199
- # ---
200
- # * GSL::Matrix#get(args)
201
- # * \GSL::Matrix#[args]
202
- #
203
- # If <tt>args</tt> are two <tt>Fixnums</tt>, <tt>i</tt> and <tt>j</tt>, this method
204
- # returns the <tt>(i,j)</tt>-th element of the matrix <tt>self</tt>.
205
- #
206
- # If <tt>args</tt> is a single <tt>Fixnum</tt>, <tt>i</tt>, this method returns the
207
- # element at row <tt>i</tt>/<tt>size2</tt>, column <tt>i</tt>%<tt>size2</tt>.
208
- #
209
- # All other forms of <tt>args</tt> are treated as with <tt>Matrix#submatrix</tt>
210
- # and a View object is returned.
211
- #
212
- # NOTE: The behavior of the single <tt>Fixnum</tt> argument case is different
213
- # from earlier versions (< 1.11.2) of Ruby/GSL. These earlier versions
214
- # returned a <tt>Vector::View</tt> in this case, thereby allowing element
215
- # (<tt>i</tt>,<tt>j</tt>) to be accessed as <tt>m[<tt>i</tt>][<tt>j</tt>]</tt>. THIS FORM
216
- # IS NO LONGER SUPPORTED as of Ruby/GSL 1.11.2. Existing occurences of this
217
- # construct will need to be replaced with the backwards compatible and more
218
- # efficient <tt>m[<tt>i</tt>,<tt>j</tt>]</tt> or, equivalent to the old and less
219
- # efficient form, <tt>m[<tt>i</tt>,nil][<tt>j</tt>]</tt>. For GSL::Matrix, the old
220
- # form will now raise a <tt>NoMethodError</tt> because <tt>Float</tt> has no
221
- # <tt>#[]</tt> method. For GSL::Matrix::Int, however, the old form will return
222
- # a single bit from an element of the matrix because <tt>Fixnum</tt> and
223
- # <tt>Bignum</tt> have a <tt>#[]</tt> method that allows access to the number's
224
- # individual bits.
225
- #
226
- # Examples:
227
- # >> m = GSL::Matrix[1..9, 3, 3]
228
- # => GSL::Matrix
229
- # [ 1.000e+00 2.000e+00 3.000e+00
230
- # 4.000e+00 5.000e+00 6.000e+00
231
- # 7.000e+00 8.000e+00 9.000e+00 ]
232
- # >> m[1, 2]
233
- # => 6.0
234
- # >> m[1, 2] = 123 # m.set(1, 2, 123)
235
- # => 123
236
- # >> m
237
- # => GSL::Matrix
238
- # [ 1.000e+00 2.000e+00 3.000e+00
239
- # 4.000e+00 5.000e+00 1.230e+02
240
- # 7.000e+00 8.000e+00 9.000e+00 ]
241
- # >> m[1]
242
- # => 2.0
243
- # >> m.set([3, 5, 2], [4, 5, 3], [7, 1, 5])
244
- # => GSL::Matrix
245
- # [ 3.000e+00 5.000e+00 2.000e+00
246
- # 4.000e+00 5.000e+00 3.000e+00
247
- # 7.000e+00 1.000e+00 5.000e+00 ]
248
- # >> m[1][1] # old/unsupported form
249
- # NoMethodError: undefined method `[]' for 2.0:Float
250
- # from (irb):8
251
- # >> m = GSL::Matrix::Int[1..9, 3, 3]
252
- # => GSL::Matrix::Int
253
- # [ 1 2 3
254
- # 4 5 6
255
- # 7 8 9 ]
256
- # >> m[1] # m[0,1]
257
- # => 2
258
- # >> m[1][0] # Bit 0 of m[0,1]
259
- # => 0
260
- # >> m[1][1] # Bit 1 of m[0,1]
261
- # => 1
262
- # >> m[1][2] # Bit 2 of m[0,1]
263
- # => 0
264
- # >> m[1][3] # Bit 3 of m[0,1]
265
- # => 0
266
- #
267
- #
268
- # ---
269
- # * GSL::Matrix#to_a
270
- #
271
- # Converts the <tt>Matrix</tt> <tt>self</tt> to a Ruby <tt>Array</tt> of <tt>Arrays</tt>.
272
- #
273
- # Example:
274
- # >> GSL::Matrix.eye(3).to_a
275
- # => [[1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 1.0]]
276
- #
277
- # === Initializing matrix elements
278
- # ---
279
- # * GSL::Matrix#set_all(x)
280
- #
281
- # This method sets all the elements of the matrix <tt>self</tt> to the value x.
282
- #
283
- # ---
284
- # * GSL::Matrix#set_zero
285
- #
286
- # This method sets all the elements of the matrix to zero.
287
- #
288
- # ---
289
- # * GSL::Matrix#set_identity
290
- #
291
- # This method sets the elements of the matrix to the corresponding
292
- # elements of the identity matrix, i.e. a unit diagonal with all off-diagonal
293
- # elements zero. This applies to both square and rectangular matrices.
294
- #
295
- # === IO
296
- # ---
297
- # * GSL::Matrix#fwrite(io)
298
- # * GSL::Matrix#fwrite(filename)
299
- # * GSL::Matrix#fread(io)
300
- # * GSL::Matrix#fread(filename)
301
- # * GSL::Matrix#fprintf(io, format = "%e")
302
- # * GSL::Matrix#fprintf(filename, format = "%e")
303
- # * GSL::Matrix#fscanf(io)
304
- # * GSL::Matrix#fscanf(filename)
305
- #
306
- #
307
- # === Matrix views
308
- # The <tt>GSL::Matrix::View</tt> class is defined to be used as "references" to
309
- # matrices. The <tt>Matrix::View</tt> class is a subclass of <tt>Matrix</tt>, and an
310
- # instance of the <tt>View</tt> class created by slicing a <tt>Matrix</tt> object can
311
- # be used same as the original matrix. The <tt>View</tt> object shares the data with
312
- # the original matrix, i.e. any changes in the elements of the <tt>View</tt> object
313
- # affect to the original.
314
- #
315
- # The primary means of generating <tt>Matrix::View</tt> objects is with
316
- # <tt>GSL::Matrix#submatrix</tt> (or its alias <tt>GSL::Matrix#view</tt>). Many forms
317
- # are supported and they are documented here individually. All forms return a
318
- # <tt>Matrix::View</tt> unless otherwise documented. In the list below, the
319
- # parameter name indicates the type of the parameter: <tt>i</tt>, <tt>row</tt>,
320
- # <tt>col</tt>, <tt>len</tt>, <tt>len1</tt>, and <tt>len2</tt> are <tt>Fixnums</tt>; <tt>rows</tt> and
321
- # <tt>cols</tt> are <tt>Ranges</tt>.
322
- #
323
- # ---
324
- # * GSL::Matrix#submatrix()
325
- #
326
- # View covers all rows and all columns.
327
- # ---
328
- # * GSL::Matrix#submatrix(i)
329
- #
330
- # View covers single element at row <tt>i</tt>/<tt>size2</tt>, column
331
- # <tt>i</tt>%<tt>size2</tt>.
332
- # ---
333
- # * GSL::Matrix#submatrix(nil,nil)
334
- #
335
- # View covers all rows and all columns.
336
- # ---
337
- # * GSL::Matrix#submatrix(nil,cols)
338
- #
339
- # View covers all rows with columns specified by <tt>cols</tt>.
340
- # ---
341
- # * GSL::Matrix#submatrix(nil,col)
342
- #
343
- # Returns a <tt>Vector::Col::View</tt> for the column <tt>col</tt>.
344
- # ---
345
- # * GSL::Matrix#submatrix(rows, nil)
346
- #
347
- # View covers rows specified by <tt>rows</tt> and all columns.
348
- # ---
349
- # * GSL::Matrix#submatrix(rows, cols)
350
- #
351
- # View covers rows specified by <tt>rows</tt>, columns specified by <tt>cols</tt>.
352
- # ---
353
- # * GSL::Matrix#submatrix(rows, col)
354
- #
355
- # Returns a <tt>Vector::Col::View</tt> for column <tt>col</tt>, rows <tt>rows</tt>.
356
- # ---
357
- # * GSL::Matrix#submatrix(row, nil)
358
- #
359
- # Returns a <tt>Vector::View</tt> for row <tt>row</tt>.
360
- # ---
361
- # * GSL::Matrix#submatrix(row, cols)
362
- #
363
- # Returns a <tt>Vector::View</tt> for row <tt>row</tt>, columns <tt>cols</tt>.
364
- # ---
365
- # * GSL::Matrix#submatrix(row, col)
366
- #
367
- # View covers a single element at row <tt>row</tt>, column <tt>col</tt>.
368
- # ---
369
- # * GSL::Matrix#submatrix(nil, col, len)
370
- #
371
- # View covers all rows and <tt>len</tt> columns starting at column <tt>col</tt>.
372
- # ---
373
- # * GSL::Matrix#submatrix(rows, col, len)
374
- #
375
- # View covers <tt>rows</tt> rows and <tt>len</tt> columns starting at column <tt>col</tt>.
376
- # ---
377
- # * GSL::Matrix#submatrix(row, len, nil)
378
- #
379
- # View covers <tt>len</tt> rows starting at row <tt>row</tt> and all columns.
380
- # ---
381
- # * GSL::Matrix#submatrix(row, len, cols)
382
- #
383
- # View covers <tt>len</tt> rows starting at row <tt>row</tt> and <tt>cols</tt> columns.
384
- # ---
385
- # * GSL::Matrix#submatrix(row, col, len1, len2)
386
- #
387
- # View covers <tt>len1</tt> rows starting at row <tt>row</tt> and <tt>len2</tt>
388
- # columns starting at column <tt>col</tt>.
389
- #
390
- # ---
391
- # * GSL::Vector#matrix_view(n1, n2)
392
- #
393
- # This creates a <tt>Matrix::View</tt> object from the vector <tt>self</tt>.
394
- #
395
- # Ex:
396
- # >> v = Vector[1..9]
397
- # => GSL::Vector
398
- # [ 1.000e+00 2.000e+00 3.000e+00 4.000e+00 5.000e+00 6.000e+00 7.000e+00 8.000e+00 9.000e+00 ]
399
- # >> m = v.matrix_view(3, 3)
400
- # => GSL::Matrix::View
401
- # [ 1.000e+00 2.000e+00 3.000e+00
402
- # 4.000e+00 5.000e+00 6.000e+00
403
- # 7.000e+00 8.000e+00 9.000e+00 ]
404
- # >> m[1][1] = 99.99
405
- # => 99.99
406
- # >> v
407
- # => GSL::Vector
408
- # [ 1.000e+00 2.000e+00 3.000e+00 4.000e+00 9.999e+01 6.000e+00 7.000e+00 8.000e+00 9.000e+00 ]
409
- # >>
410
- #
411
- #
412
- # === Creating row and column views
413
- #
414
- # ---
415
- # * GSL::Matrix#row(i)
416
- #
417
- # These methods return <tt>i</tt>-th row of the matrix as a <tt>Vector::View</tt>
418
- # object. Any modifications to the <tt>Vectror::View</tt> object returned by this method
419
- # propagate to the original matrix.
420
- #
421
- # ---
422
- # * GSL::Matrix#column(i)
423
- # * GSL::Matrix#col(i)
424
- #
425
- # These methods return a vector view of the <tt>j</tt>-th column of the matrix.
426
- #
427
- # ---
428
- # * GSL::Matrix#subrow(i, offset, n)
429
- #
430
- # Returns a vector view of the <tt>i</tt>-th row of the matrix <tt>self</tt>
431
- # beginning at <tt>offset</tt> elements past the first column
432
- # and containing <tt>n</tt> elements. (>= GSL-1.10)
433
- #
434
- # ---
435
- # * GSL::Matrix#subcolumn(j, offset, n)
436
- #
437
- # Returns a vector view of the <tt>j</tt>-th column of the matrix <tt>self</tt>
438
- # beginning at <tt>offset</tt> elements past the first row
439
- # and containing <tt>n</tt> elements. (>= GSL-1.10)
440
- #
441
- # ---
442
- # * GSL::Matrix#diag
443
- # * GSL::Matrix#diagonal
444
- #
445
- # This method returns a <tt>Vector::View</tt> of the diagonal of the matrix.
446
- # The matrix is not required to be square. For a rectangular matrix the
447
- # length of the diagonal is the same as the smaller dimension of the matrix.
448
- #
449
- #
450
- # Ex:
451
- # >> m = GSL::Matrix[1..9, 3, 3]
452
- # => GSL::Matrix
453
- # [ 1.000e+00 2.000e+00 3.000e+00
454
- # 4.000e+00 5.000e+00 6.000e+00
455
- # 7.000e+00 8.000e+00 9.000e+00 ]
456
- # >> m.row(1)
457
- # => GSL::Vector::View
458
- # [ 4.000e+00 5.000e+00 6.000e+00 ]
459
- # >> m.col(2)
460
- # => GSL::Vector::Col::View
461
- # [ 3.000e+00
462
- # 6.000e+00
463
- # 9.000e+00 ]
464
- # >> m.col(2)[2] = 123
465
- # => 123
466
- # >> m
467
- # => GSL::Matrix
468
- # [ 1.000e+00 2.000e+00 3.000e+00
469
- # 4.000e+00 5.000e+00 6.000e+00
470
- # 7.000e+00 8.000e+00 1.230e+02 ]
471
- # >> m.diagonal
472
- # => GSL::Vector::View:
473
- # [ 1.000e+00 5.000e+00 1.230e+02 ]
474
- #
475
- # ---
476
- # * GSL::Matrix#subdiagonal(k)
477
- #
478
- # Returns a vector view view of the <tt>k</tt>-th subdiagonal
479
- # of the matrix <tt>self</tt>.
480
- # The matrix is not required to be square. The diagonal of the matrix
481
- # corresponds to k = 0.
482
- #
483
- # ---
484
- # * GSL::Matrix#superdiagonal(k)
485
- #
486
- # Returns a vector view of the <tt>k</tt>-th superdiagonal of the matrix <tt>self</tt>.
487
- # The matrix is not required to be square. The diagonal of the matrix
488
- # corresponds to k = 0.
489
- #
490
- # ---
491
- # * GSL::Matrix#to_v
492
- #
493
- # Creates a <tt>GSL::Vector</tt> object "flattening" the rows of the matrix <tt>self</tt>.
494
- #
495
- # >> m = GSL::Matrix[1..6, 2, 3]
496
- # => GSL::Matrix
497
- # [ 1.000e+00 2.000e+00 3.000e+00
498
- # 4.000e+00 5.000e+00 6.000e+00 ]
499
- # >> m.to_v
500
- # => GSL::Vector
501
- # [ 1.000e+00 2.000e+00 3.000e+00 4.000e+00 5.000e+00 6.000e+00 ]
502
- #
503
- # === Iterators
504
- # ---
505
- # * GSL::Matrix#each_row
506
- #
507
- # Iterator for each of rows in the matrix <tt>self</tt>.
508
- # ---
509
- # * GSL::Matrix#each_col
510
- #
511
- # Iterator for each of columns in the matrix <tt>self</tt>.
512
- #
513
- # ---
514
- # * GSL::Matrix#collect { |item| .. }
515
- # * GSL::Matrix#map { |item| .. }
516
- # * GSL::Matrix#collect! { |item| .. }
517
- # * GSL::Matrix#map! { |item| .. }
518
- #
519
- #
520
- # === Copying matrices
521
- # ---
522
- # * GSL::Matrix#clone
523
- # * GSL::Matrix#duplicate
524
- #
525
- # Create a new matrix of the same elements.
526
- #
527
- # ---
528
- # * GSL::Matrix.memcpy(dest, src)
529
- # * GSL::Matrix.swap(dest, src)
530
- #
531
- #
532
- # === Copying rows and columns
533
- #
534
- # ---
535
- # * GSL::Matrix#get_row(i)
536
- #
537
- # This method returns a new vector (not a view) which contains the elements
538
- # of the <tt>i</tt>-th row of the matrix <tt>self</tt>.
539
- #
540
- # ---
541
- # * GSL::Matrix#get_col(j)
542
- #
543
- # This method returns a new vector (not a view) which contains the elements of the <tt>j</tt>-th
544
- # column of the matrix <tt>self</tt>.
545
- #
546
- # ---
547
- # * GSL::Matrix#set_row(i, v)
548
- #
549
- # This method copies the elements of the vector <tt>v</tt> into the <tt>i</tt>-th
550
- # row of the matrix.
551
- # The length of the vector must be the same as the length of the row.
552
- #
553
- # ---
554
- # * GSL::Matrix#set_col(j, v)
555
- #
556
- # This method copies the elements of the vector <tt>v</tt> into the <tt>j</tt>-th
557
- # column of the matrix. The length of the vector must be the same as the length
558
- # of the column.
559
- #
560
- # === Exchanging rows and columns
561
- # ---
562
- # * GSL::Matrix#swap_rows!(i, j)
563
- #
564
- # This method exchanges the <tt>i</tt>-th and <tt>j</tt>-th rows of the matrix <tt>in-place</tt>.
565
- # ---
566
- # * GSL::Matrix#swap_rows(i, j)
567
- #
568
- # This method creates a new matrix exchanging the <tt>i</tt>-th and <tt>j</tt>-th rows of the matrix <tt>self</tt>.
569
- #
570
- # ---
571
- # * GSL::Matrix#swap_columns!(i, j)
572
- #
573
- # This method exchanges the <tt>i</tt>-th and <tt>j</tt>-th columns of the matrix <tt>in-place</tt>.
574
- # ---
575
- # * GSL::Matrix#swap_columns(i, j)
576
- #
577
- # This method creates a new matrix exchanging the <tt>i</tt>-th and <tt>j</tt>-th columns of the matrix <tt>self</tt>.
578
- #
579
- # ---
580
- # * GSL::Matrix#swap_rowcol(i, j)
581
- #
582
- # This method exchanges the <tt>i</tt>-th row and <tt>j</tt>-th column of the matrix.
583
- # The matrix must be square for this operation to be possible.
584
- #
585
- # ---
586
- # * GSL::Matrix#transpose_memcpy
587
- # * GSL::Matrix#transpose
588
- #
589
- # This method returns a matrix of a transpose of the matrix. The matrix
590
- # <tt>self</tt> is not modified.
591
- #
592
- # ---
593
- # * GSL::Matrix#transpose!
594
- #
595
- # This method replaces the matrix by its transpose by copying the
596
- # elements of the matrix <tt>in-place</tt>. The matrix must be square for this
597
- # operation to be possible.
598
- #
599
- # ---
600
- # * GSL::Matrix#reverse_rows
601
- # * GSL::Matrix#flipud
602
- #
603
- # Example:
604
- # >> m = GSL::Matrix::Int[1..9, 3, 3]
605
- # => GSL::Matrix::Int
606
- # [ 1 2 3
607
- # 4 5 6
608
- # 7 8 9 ]
609
- # >> m.reverse_rows
610
- # => GSL::Matrix::Int
611
- # [ 7 8 9
612
- # 4 5 6
613
- # 1 2 3 ]
614
- #
615
- # ---
616
- # * GSL::Matrix#reverse_columns
617
- # * GSL::Matrix#fliplr
618
- #
619
- # Example:
620
- # >> m = GSL::Matrix::Int[1..9, 3, 3]
621
- # => GSL::Matrix::Int
622
- # [ 1 2 3
623
- # 4 5 6
624
- # 7 8 9 ]
625
- # >> m.reverse_rows.reverse_columns
626
- # => GSL::Matrix::Int
627
- # [ 9 8 7
628
- # 6 5 4
629
- # 3 2 1 ]
630
- #
631
- # ---
632
- # * GSL::Matrix#rot90(n = 1)
633
- #
634
- # Return a copy of <tt>self</tt> with the elements rotated
635
- # counterclockwise in 90-degree increments. The argument <tt>n</tt> is
636
- # optional, and specifies how many 90-degree rotations are to be applied
637
- # (the default value is 1).
638
- # Negative values of <tt>n</tt> rotate the matrix in a clockwise direction.
639
- #
640
- # Examples:
641
- # >> m = GSL::Matrix::Int[1..6, 2, 3]
642
- # => GSL::Matrix::Int
643
- # [ 1 2 3
644
- # 4 5 6 ]
645
- # >> m.rot90
646
- # => GSL::Matrix::Int
647
- # [ 3 6
648
- # 2 5
649
- # 1 4 ]
650
- # >> m.rot90(2)
651
- # => GSL::Matrix::Int
652
- # [ 6 5 4
653
- # 3 2 1 ]
654
- # >> m.rot90(3)
655
- # => GSL::Matrix::Int
656
- # [ 4 1
657
- # 5 2
658
- # 6 3 ]
659
- # >> m.rot90(-1)
660
- # => GSL::Matrix::Int
661
- # [ 4 1
662
- # 5 2
663
- # 6 3 ]
664
- #
665
- # ---
666
- # * GSL::Matrix#upper
667
- #
668
- # This creates a matrix copying the upper half part of the matrix
669
- # <tt>self</tt>, including the diagonal elements.
670
- # ---
671
- # * GSL::Matrix#lower
672
- #
673
- # This creates a matrix copying the lower half part of the matrix
674
- # <tt>self</tt>, including the diagonal elements.
675
- #
676
- # >> m = GSL::Matrix[1..9, 3, 3]
677
- # => GSL::Matrix
678
- # [ 1.000e+00 2.000e+00 3.000e+00
679
- # 4.000e+00 5.000e+00 6.000e+00
680
- # 7.000e+00 8.000e+00 9.000e+00 ]
681
- # >> m.upper
682
- # => GSL::Matrix
683
- # [ 1.000e+00 2.000e+00 3.000e+00
684
- # 0.000e+00 5.000e+00 6.000e+00
685
- # 0.000e+00 0.000e+00 9.000e+00 ]
686
- # >> m.lower
687
- # => GSL::Matrix
688
- # [ 1.000e+00 0.000e+00 0.000e+00
689
- # 4.000e+00 5.000e+00 0.000e+00
690
- # 7.000e+00 8.000e+00 9.000e+00 ]
691
- #
692
- # ---
693
- # * GSL::Matrix#horzcat(other)
694
- #
695
- # Returns the horizontal concatenation of <tt>self</tt> and <tt>other</tt>.
696
- #
697
- # Ex:
698
- # >> require("gsl")
699
- # => true
700
- # >> a = GSL::Matrix::Int[1..4, 2, 2]
701
- # => GSL::Matrix::Int
702
- # [ 1 2
703
- # 3 4 ]
704
- # >> b = GSL::Matrix::Int[5..10, 2, 3]
705
- # => GSL::Matrix::Int
706
- # [ 5 6 7
707
- # 8 9 10 ]
708
- # >> a.horzcat(b)
709
- # => GSL::Matrix::Int
710
- # [ 1 2 5 6 7
711
- # 3 4 8 9 10 ]
712
- #
713
- # ---
714
- # * GSL::Matrix#vertcat(other)
715
- #
716
- # Returns the vertical concatenation of <tt>self</tt> and <tt>other</tt>.
717
- #
718
- # Ex:
719
- # >> a = GSL::Matrix::Int[1..4, 2, 2]
720
- # => GSL::Matrix::Int
721
- # [ 1 2
722
- # 3 4 ]
723
- # >> b = GSL::Matrix::Int[5..10, 3, 2]
724
- # => GSL::Matrix::Int
725
- # [ 5 6
726
- # 7 8
727
- # 9 10 ]
728
- # >> a.vertcat(b)
729
- # => GSL::Matrix::Int
730
- # [ 1 2
731
- # 3 4
732
- # 5 6
733
- # 7 8
734
- # 9 10 ]
735
- #
736
- # === Matrix operations
737
- #
738
- # ---
739
- # * GSL::Matrix#add(b)
740
- # * GSL::Matrix#+(b)
741
- #
742
- # This method adds the elements of matrix <tt>b</tt>
743
- # to the elements of the matrix.
744
- # The two matrices must have the same dimensions.
745
- #
746
- # If <tt>b</tt> is a scalar, these methods add it to all the elements
747
- # of the matrix <tt>self</tt> (equivalent to the method <tt>add_constant</tt>).
748
- #
749
- # ---
750
- # * GSL::Matrix#sub(b)
751
- # * GSL::Matrix#-(b)
752
- #
753
- # This method subtracts the elements of matrix <tt>b</tt>
754
- # from the elements of the
755
- # matrix. The two matrices must have the same dimensions.
756
- #
757
- # ---
758
- # * GSL::Matrix#mul_elements(b)
759
- #
760
- # This method multiplies the elements of the matrix by the elements of
761
- # matrix <tt>b</tt>. The two matrices must have the same dimensions.
762
- # If <tt>b</tt> is a scalar, the method <tt>scale</tt> (see below)
763
- # is called.
764
- #
765
- # ---
766
- # * GSL::Matrix#div_elements(b)
767
- #
768
- #
769
- # This method divides the elements of the matrix by the elements of
770
- # matrix <tt>b</tt>. The two matrices must have the same dimensions.
771
- #
772
- # ---
773
- # * GSL::Matrix#scale(x)
774
- #
775
- # This method multiplies the elements of the matrix by the constant
776
- # factor <tt>x</tt>.
777
- #
778
- # ---
779
- # * GSL::Matrix#add_constant(x)
780
- #
781
- # This method adds the constant value <tt>x</tt> to the elements of the matrix.
782
- #
783
- # ---
784
- # * GSL::Matrix#*(b)
785
- #
786
- # Matrix multiplication.
787
- #
788
- # Ex:
789
- #
790
- # >> a = GSL::Matrix[1..4, 2, 2]
791
- # => GSL::Matrix
792
- # [ 1.000e+00 2.000e+00
793
- # 3.000e+00 4.000e+00 ]
794
- # >> b = GSL::Matrix[5..8, 2, 2]
795
- # => GSL::Matrix
796
- # [ 5.000e+00 6.000e+00
797
- # 7.000e+00 8.000e+00 ]
798
- # >> a*b
799
- # => GSL::Matrix
800
- # [ 1.900e+01 2.200e+01
801
- # 4.300e+01 5.000e+01 ]
802
- # >> a*2
803
- # => GSL::Matrix
804
- # [ 2.000e+00 4.000e+00
805
- # 6.000e+00 8.000e+00 ]
806
- # >> c = Vector[1, 2]
807
- # => GSL::Vector
808
- # [ 1.000e+00 2.000e+00 ]
809
- # >> a*c.col
810
- # => GSL::Vector::Col
811
- # [ 5.000e+00
812
- # 1.100e+01 ]
813
- #
814
- # ---
815
- # * GSL::Matrix#/(b)
816
- #
817
- # If <tt>b</tt> is a scalar or a <tt>Matrix</tt>, this method calculates the
818
- # element-by-element divisions.
819
- # If a <tt>Vector::Col</tt> is given, this method solves the linear system
820
- # by using LU decomposition.
821
- #
822
- # Ex:
823
- # >> m = GSL::Matrix[1..4, 2, 2]
824
- # => GSL::Matrix
825
- # [ 1.000e+00 2.000e+00
826
- # 3.000e+00 4.000e+00 ]
827
- # >> m/3
828
- # => GSL::Matrix
829
- # [ 3.333e-01 6.667e-01 <--- 1/3, 2/3
830
- # 1.000e+00 1.333e+00 ] <--- 3/3, 4/3
831
- # >> b = Vector[5, 6].col
832
- # => GSL::Vector::Col
833
- # [ 5.000e+00
834
- # 6.000e+00 ]
835
- # >> x = m/b <--- Solve m (x,y) = b
836
- # => GSL::Vector::Col
837
- # [ -4.000e+00 <--- x = -4
838
- # 4.500e+00 ] <--- y = 4.5
839
- # >> m*x
840
- # => GSL::Vector::Col
841
- # [ 5.000e+00
842
- # 6.000e+00 ]
843
- #
844
- # ---
845
- # * GSL::Matrix#^(b)
846
- #
847
- # Computes matrix power of <tt>b</tt>.
848
- #
849
- # === Finding maximum and minimum elements of matrices
850
- #
851
- # ---
852
- # * GSL::Matrix#max
853
- # * GSL::Matrix#min
854
- #
855
- # These methods return the max/min value in the matrix.
856
- #
857
- # ---
858
- # * GSL::Matrix#minmax
859
- #
860
- # This method returns a two elements array [min, max],
861
- # which contains the minimum
862
- # and the maximum values in the matrix.
863
- #
864
- # ---
865
- # * GSL::Matrix#max_index
866
- # * GSL::Matrix#min_index
867
- #
868
- # These methods return the index of the max/min value in the matrix.
869
- #
870
- # ---
871
- # * GSL::Matrix#minmax_index
872
- #
873
- # This method returns a two elements array [imin, imax],
874
- # which contains the indices
875
- # of the minimum and the maximum value in the matrix.
876
- #
877
- # === Matrix properties
878
- # ---
879
- # * GSL::Matrix#isnull
880
- #
881
- # This returns 1 if all the elements of the matrix <tt>self</tt> are zero,
882
- # and 0 otherwise.
883
- #
884
- # ---
885
- # * GSL::Matrix#isnull?
886
- #
887
- # This returns <tt>true</tt> if all the elements of the matrix <tt>self</tt>
888
- # are zero, and <tt>false</tt> otherwise.
889
- #
890
- # ---
891
- # * GSL::Matrix#ispos
892
- # * GSL::Matrix#ispos?
893
- #
894
- # (GSL-1.9 or later) Return 1 (true) if all the elements of the matrix <tt>self</tt> are strictly positive, and 0 (false) otherwise.
895
- #
896
- # ---
897
- # * GSL::Matrix#isneg
898
- # * GSL::Matrix#isneg?
899
- #
900
- # (GSL-1.9 or later) Return 1 (true) if all the elements of the matrix <tt>self</tt> are strictly negative, and 0 (false) otherwise.
901
- #
902
- # ---
903
- # * GSL::Matrix#isnonneg
904
- # * GSL::Matrix#isnonneg?
905
- #
906
- # (GSL-1.10 or later) Return 1 (true) if all the elements of the matrix <tt>self</tt> are non-negative , and 0 (false) otherwise.
907
- #
908
- # ---
909
- # * GSL::Matrix#any
910
- #
911
- # Returns a Vector of ones and zeros with each element indicating
912
- # whether any of the elements of the corresponding column of the
913
- # matrix are nonzero.
914
- #
915
- # ---
916
- # * GSL::Matrix#all
917
- #
918
- # Behaves like the method <tt>any</tt>, except that it returns 1 only if
919
- # all the elements of the matrix.
920
- #
921
- # ---
922
- # * GSL:Matrix#trace
923
- #
924
- # This returns trace of the matrix <tt>self</tt>, the sum of the diagonal
925
- # elements.
926
- #
927
- # ---
928
- # * GSL:Matrix#norm
929
- #
930
- # Returns matrix norm, sqrt(sum_{ij} m_{ij}^2).
931
- #
932
- # ---
933
- # * GSL::Matrix#sgn
934
- # * GSL::Matrix#signum
935
- #
936
- # Creates a new matrix, with elements +1 if <tt>x_i,j</tt> > 0, -1 if
937
- # <tt>x_i,j</tt> < 0, otherwise 0. Note that this definition gives the signum
938
- # of NaN as 0 rather than NaN.
939
- #
940
- # ---
941
- # * GSL:Matrix#abs
942
- # * GSL:Matrix#fabs
943
- #
944
- # Example:
945
- # >> m = GSL::Matrix::Int[-5..4, 3, 3]
946
- # => GSL::Matrix::Int
947
- # [ -5 -4 -3
948
- # -2 -1 0
949
- # 1 2 3 ]
950
- # >> m.abs
951
- # => GSL::Matrix::Int
952
- # [ 5 4 3
953
- # 2 1 0
954
- # 1 2 3 ]
955
- #
956
- # ---
957
- # * GSL::Matrix#equal?(other, eps = 1e-10)
958
- # * GSL::Matrix#==(other, eps = 1e-10)
959
- #
960
- # Returns <tt>true</tt> if the matrices have same size and elements
961
- # equal to absolute accurary <tt>eps</tt> for all the indices,
962
- # and <tt>false</tt> otherwise.
963
- #
964
- # == NArray
965
- #
966
- # ---
967
- # * GSL::Matrix#to_na
968
- #
969
- # The Matrix object <tt>self</tt> is converted into an <tt>NMatrix</tt> object.
970
- # The matrix data are copied to newly allocated memory.
971
- #
972
- # ---
973
- # * NArray#to_gm
974
- # * NArray#to_gslm
975
- #
976
- # Convert <tt>NArray</tt> object into <tt>GSL::Matrix</tt>.
977
- #
978
- # ---
979
- # * NArray#to_gm_view
980
- # * NArray#to_gslm_view
981
- #
982
- # A <tt>GSL::Matrix::View</tt> object is created from the NArray object <tt>na</tt>.
983
- # The data of <tt>na</tt> are
984
- # not copied, thus any modifications to the View object affect on the original
985
- # NArray object <tt>na</tt>.
986
- # The View object can be used as a reference to the NMatrix object.
987
- #
988
- # == Special matrices
989
- # ---
990
- # * GSL::Matrix.hilbert(n)
991
- #
992
- # Returns the Hilbert matrix of order <tt>n</tt>. The <tt>ij</tt> element is
993
- # defined as 1/(i+j+1).
994
- #
995
- # ---
996
- # * GSL::Matrix.invhilbert(n)
997
- #
998
- # Returns the inverse of a Hilbert matrix of order <tt>n</tt>.
999
- #
1000
- # Ex:
1001
- # >> m = GSL::Matrix.hilbert(4)
1002
- # => GSL::Matrix
1003
- # [ 1.000e+00 5.000e-01 3.333e-01 2.500e-01
1004
- # 5.000e-01 3.333e-01 2.500e-01 2.000e-01
1005
- # 3.333e-01 2.500e-01 2.000e-01 1.667e-01
1006
- # 2.500e-01 2.000e-01 1.667e-01 1.429e-01 ]
1007
- # >> invm = GSL::Matrix.invhilbert(4)
1008
- # => GSL::Matrix
1009
- # [ 1.600e+01 -1.200e+02 2.400e+02 -1.400e+02
1010
- # -1.200e+02 1.200e+03 -2.700e+03 1.680e+03
1011
- # 2.400e+02 -2.700e+03 6.480e+03 -4.200e+03
1012
- # -1.400e+02 1.680e+03 -4.200e+03 2.800e+03 ]
1013
- # >> invm2 = m.inv
1014
- # => GSL::Matrix
1015
- # [ 1.600e+01 -1.200e+02 2.400e+02 -1.400e+02
1016
- # -1.200e+02 1.200e+03 -2.700e+03 1.680e+03
1017
- # 2.400e+02 -2.700e+03 6.480e+03 -4.200e+03
1018
- # -1.400e+02 1.680e+03 -4.200e+03 2.800e+03 ]
1019
- # >> m*invm
1020
- # => GSL::Matrix
1021
- # [ 1.000e+00 5.684e-14 -2.274e-13 1.137e-13
1022
- # 1.998e-15 1.000e+00 -4.663e-14 3.109e-14
1023
- # 3.664e-15 -7.239e-14 1.000e+00 -1.017e-13
1024
- # -2.442e-15 1.510e-14 -8.038e-14 1.000e+00 ]
1025
- # >> m*invm2
1026
- # => GSL::Matrix
1027
- # [ 1.000e+00 0.000e+00 0.000e+00 0.000e+00
1028
- # -1.554e-15 1.000e+00 -2.389e-14 8.349e-15
1029
- # 1.295e-15 3.405e-15 1.000e+00 -6.957e-15
1030
- # 1.110e-15 1.916e-14 1.707e-14 1.000e+00 ]
1031
- #
1032
- # ---
1033
- # * GSL::Matrix.pascal(n)
1034
- #
1035
- # Returns the Pascal matrix of order <tt>n</tt>, created from Pascal's triangle.
1036
- #
1037
- # >> GSL::Matrix::Int.pascal(10)
1038
- # => GSL::Matrix::Int
1039
- # [ 1 1 1 1 1 1 1 1 1 1
1040
- # 1 2 3 4 5 6 7 8 9 10
1041
- # 1 3 6 10 15 21 28 36 45 55
1042
- # 1 4 10 20 35 56 84 120 165 220
1043
- # 1 5 15 35 70 126 210 330 495 715
1044
- # 1 6 21 56 126 252 462 792 1287 2002
1045
- # 1 7 28 84 210 462 924 1716 3003 5005
1046
- # 1 8 36 120 330 792 1716 3432 6435 11440
1047
- # 1 9 45 165 495 1287 3003 6435 12870 24310
1048
- # 1 10 55 220 715 2002 5005 11440 24310 48620 ]
1049
- #
1050
- # ---
1051
- # * GSL::Matrix.vandermonde(v)
1052
- #
1053
- # Creates a Vendermonde matrix from a vector or an array <tt>v</tt>.
1054
- #
1055
- # >> GSL::Matrix.vander([1, 2, 3, 4])
1056
- # => GSL::Matrix
1057
- # [ 1.000e+00 1.000e+00 1.000e+00 1.000e+00
1058
- # 8.000e+00 4.000e+00 2.000e+00 1.000e+00
1059
- # 2.700e+01 9.000e+00 3.000e+00 1.000e+00
1060
- # 6.400e+01 1.600e+01 4.000e+00 1.000e+00 ]
1061
- #
1062
- # ---
1063
- # * GSL::Matrix.toeplitz(v)
1064
- #
1065
- # Creates a Toeplitz matrix from a vector or an array <tt>v</tt>.
1066
- #
1067
- # >> GSL::Matrix::Int.toeplitz([1, 2, 3, 4, 5])
1068
- # => GSL::Matrix::Int
1069
- # [ 1 2 3 4 5
1070
- # 2 1 2 3 4
1071
- # 3 2 1 2 3
1072
- # 4 3 2 1 2
1073
- # 5 4 3 2 1 ]
1074
- #
1075
- # ---
1076
- # * GSL::Matrix.circulant(v)
1077
- #
1078
- # Creates a circulant matrix from a vector or an array <tt>v</tt>.
1079
- #
1080
- # >> GSL::Matrix::Int.circulant([1, 2, 3, 4])
1081
- # => GSL::Matrix::Int
1082
- # [ 4 1 2 3
1083
- # 3 4 1 2
1084
- # 2 3 4 1
1085
- # 1 2 3 4 ]
1086
- #
1087
- # {prev}[link:rdoc/vector_rdoc.html]
1088
- # {next}[link:rdoc/perm_rdoc.html]
1089
- #
1090
- # {Reference index}[link:rdoc/ref_rdoc.html]
1091
- # {top}[link:index.html]
1092
- #
1093
- #