Sha256: 3aff745e905d3290247c33f302cd925ca726418cb3060bbbdf266b85f5b38aa7

Contents?: true

Size: 444 Bytes

Versions: 9

Compression:

Stored size: 444 Bytes

Contents

#!/usr/bin/env ruby
# Test gsl/dht/test.c: test_dht_poly1()
# Expected results:
#  vout[0]=0.057274214
#  vout[5]=-0.000190850
#  vout[10]=0.000024342
#  vout[35]=-4.04e-07
#  vout[100]=1.0e-08

require("gsl")

N = 128
t = GSL::Dht.alloc(N, 1.0, 1.0)
vin = GSL::Vector.alloc(N)
for n in 0...N do
  x = t.x_sample(n)
  vin[n] = x*(1.0 - x*x)
end

vout = t.apply(vin)

printf("%e %e %e %e %e\n", vout[0], vout[5], vout[10], vout[35], vout[100])

Version data entries

9 entries across 9 versions & 4 rubygems

Version Path
gsl-nmatrix-1.15.3.2 tests/dht/dht4.rb
gsl-nmatrix-1.15.3.1 tests/dht/dht4.rb
rb-gsl-1.15.3.1 tests/dht/dht4.rb
blackwinter-gsl-1.15.3.2 tests/dht/dht4.rb
gsl-nmatrix-1.15.3.0 tests/dht/dht4.rb
gsl-1.15.3 tests/dht/dht4.rb
gsl-1.14.7 tests/dht/dht4.rb
gsl-1.14.6 tests/dht/dht4.rb
gsl-1.14.5 tests/dht/dht4.rb