File: narray.rdoc [rb-gsl-1.16.0.4 Documentation]

### Home Classes Methods

### Files

- alf.rdoc
- blas.rdoc
- bspline.rdoc
- changes.rdoc
- cheb.rdoc
- cholesky_complex.rdoc
- combi.rdoc
- complex.rdoc
- const.rdoc
- dht.rdoc
- diff.rdoc
- ehandling.rdoc
- eigen.rdoc
- fft.rdoc
- fit.rdoc
- function.rdoc
- graph.rdoc
- hist.rdoc
- hist2d.rdoc
- hist3d.rdoc
- index.rdoc
- integration.rdoc
- interp.rdoc
- intro.rdoc
- linalg.rdoc
- linalg_complex.rdoc
- math.rdoc
- matrix.rdoc
- min.rdoc
- monte.rdoc
- multimin.rdoc
- multiroot.rdoc
- narray.rdoc
- ndlinear.rdoc
- nonlinearfit.rdoc
- ntuple.rdoc
- odeiv.rdoc
- perm.rdoc
- poly.rdoc
- qrng.rdoc
- randist.rdoc
- ref.rdoc
- rng.rdoc
- roots.rdoc
- sf.rdoc
- siman.rdoc
- sort.rdoc
- start.rdoc
- stats.rdoc
- sum.rdoc
- tensor.rdoc
- tut.rdoc
- use.rdoc
- vector.rdoc
- vector_complex.rdoc
- wavelet.rdoc

### Class Index

Quicksearch

- OOL
- OOL::Conmin
- OOL::Conmin::Gencan_parameters
- OOL::Conmin::Minimizer
- OOL::Conmin::Minimizer::Gencan
- OOL::Conmin::Minimizer::Gencan::Parameters
- OOL::Conmin::Minimizer::Pgrad
- OOL::Conmin::Minimizer::Pgrad::Parameters
- OOL::Conmin::Minimizer::Spg
- OOL::Conmin::Minimizer::Spg::Parameters
- OOL::Conmin::Pgrad_parameters
- OOL::Conmin::Spg_parameters
- GSL
- GSL::Oper
- Array

No matching classes.

# NArray compatibilities

### Contents:

1. Data type conversions

2. Methods which accepts NArray

## Data type conversions

### GSL to NArray

- GSL::Vector#to_na

- GSL::Vector#to_nvector

- GSL::Vector::Complex#to_na

- GSL::Vector::Complex#to_nvector

- GSL::Matrix#to_na

- GSL::Matrix#to_nmatrix

  Convert GSL objects to NArray. The data contained by the GSL objects are copied to a newly allocated memory block of the NArray objects created.

- GSL::Vector#to_na_ref

- GSL::Vector#to_nvector_ref

- GSL::Vector::Complex#to_na_ref

- GSL::Vector::Complex#to_nvector_ref

- GSL::Matrix#to_na_ref

- GSL::Matrix#to_nmatrix_ref

  Create NArray-ref objects from GSL data. The memory block of the GSL objects are shared with the NArray-ref objects.

  Example:

      >> v = Vector::Int[0..5]
      => GSL::Vector::Int
      [ 0 1 2 3 4 5 ]
      >> na = v.to_nvector_ref
      => NVector(ref).int(6):
      [ 0, 1, 2, 3, 4, 5 ]
      >> na[3] = 999
      => 999
      >> v
      => GSL::Vector::Int
      [ 0 1 2 999 4 5 ]

### NArray to GSL

- NArray#to_gv

- NArray#to_gm

  `NArray#to_gv` converts NArray objects to `GSL::Vector` or `GSL::Vector::Complex`. `NArray#to_gm` converts NArray objects to `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_view

- NArray#to_gm_view

  Create `GSL::Vector::View` or `GSL::Matrix::View` objects from NArray. The memory block of the NArray objects are shared with the View objects.

  Example:

      >> na = NArray[0, 1, 2, 3, 4, 5]
      => NArray.int(6):
      [ 0, 1, 2, 3, 4, 5 ]
      >> b = na.to_gv_int_view
      => GSL::Vector::Int::View
      [ 0 1 2 3 4 5 ]
      >> b[2] = -99
      => -99
      >> na
      => NArray.int(6):
      [ 0, 1, -99, 3, 4, 5 ]

## Methods which accepts NArray

### `GSL` module

- GSL::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)

### `Sf` module

- Any

### `Linalg` module

- GSL::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)

### `Eigen` module

- GSL::Eigen::symm(na)

- GSL::Eigen::symmv(na)

### `FFT` module

- Many

### `Function` class

- GSL::Function#eval

- GSL::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)

### `Ran` and `Cdf` module

- Many

### `Stats` module

- Any

### `Interp` and `Spline` class

- GSL::Interp#init

- GSL::Interp#eval

- GSL::Spline#init

- GSL::Spline#eval

### `Deriv` and `Diff` module

- GSL::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)

### `Cheb` class

- GSL::Cheb#eval(x)

- GSL::Cheb#eval_n(n, x)

### `Wavelet` class

- Many

prev

Reference index top

[Validate]

Generated with the Darkfish Rdoc Generator 2.