GSL::Vector#to_naGSL::Vector#to_nvectorGSL::Matrix#to_naGSL::Matrix#to_nmatrixGSL::Vector#to_na_refGSL::Vector#to_nvector_refGSL::Matrix#to_na_refGSL::Matrix#to_nmatrix_refCreate NArray-ref objects from GSL data. The memory block of the GSL objects are shared with the NArray-ref objects.
Example:
irb(main):009:0> v = Vector::Int[0..5] => GSL::Vector::Int [ 0 1 2 3 4 5 ] irb(main):010:0> na = v.to_nvector_ref => NVector(ref).int(6): [ 0, 1, 2, 3, 4, 5 ] irb(main):011:0> na[3] = 999 => 999 irb(main):012:0> v => GSL::Vector::Int [ 0 1 2 999 4 5 ]
NArray#to_gvNArray#to_gmGSL::Vector or GSL::Matrix.
The data contained by the NArray objects
are copied to a newly allocated memory block of the GSL objects created.NArray#to_gv_viewNArray#to_gm_viewCreate GSL::Vector::View or GSL::Matrix::View objects from NArray.
The memory block of the NArray objects are shared with the View objects.
Example:
irb(main):024:0> na = NArray[0, 1, 2, 3, 4, 5] => NArray.int(6): [ 0, 1, 2, 3, 4, 5 ] irb(main):025:0> b = na.to_gv_int_view => GSL::Vector::Int::View [ 0 1 2 3 4 5 ] irb(main):026:0> b[2] = -99 => -99 irb(main):027:0> na => NArray.int(6): [ 0, 1, -99, 3, 4, 5 ]
GSL moduleGSL::graph()GSL::log1p(x)GSL::expm1(x)GSL::hypot(x, y)GSL::acosh(x)GSL::asinh(x)GSL::atanh(x)GSL::pow(x, a)GSL::pow_int(x, n)GSL::pow_2(x), ..., GSL::pow_9(x)GSL::Sf moduleGSL::Linalg moduleGSL::Linalg::LU.decomp(na)GSL::Linalg::LU.solve(lu, b)GSL::Linalg::LU.svx(lu, bx)GSL::Linalg::LU.det(lu, sign)GSL::Linalg::LU.lndet(lu)GSL::Linalg::LU.invert(lu, perm)GSL::Linalg::QR.decomp(m)GSL::Linalg::QR.solve(qr, tau, b)GSL::Linalg::QR.svx(qr, tau, bx)GSL::Linalg::SV.decomp(m)GSL::Linalg::SV.solve(u, v, s, b)GSL::Linalg::SV.svx(u, v, s, bx)GSL::Linalg::Cholesky.decomp(m)GSL::Linalg::Cholesky.solve(u, v, s, b)GSL::Linalg::Cholesky.svx(u, v, s, bx)GSL::Linalg::HH.solve(m, b)GSL::Linalg::HH.svx(m, bx)GSL::Eigen moduleGSL::Eigen::symm(na)GSL::Eigen::symmv(na)GSL::FFT moduleGSL::Function classGSL::Function#evalGSL::Function#deriv_central(x, h)GSL::Function#deriv_forward(x, h)GSL::Function#deriv_backward(x, h)GSL::Function#diff_central(x, h)GSL::Function#diff_forward(x, h)GSL::Function#diff_backward(x, h)GSL::Ran and GSL::Cdf moduleGSL::Stats moduleGSL::Interp and GSL::Spline classGSL::Interp#initGSL::Interp#evalGSL::Spline#initGSL::Spline#evalGSL::Deriv and GSL::Diff moduleGSL::Deriv.central(f, x, h)GSL::Deriv.forward(f, x, h)GSL::Deriv.backward(f, x, h)GSL::Diff.central(f, x, h)GSL::Diff.forward(f, x, h)GSL::Diff.backward(f, x, h)GSL::Cheb classGSL::Cheb#eval(x)GSL::Cheb#eval_n(n, x)GSL::Wavelet class