Sha256: 6c6d185dccb5211873e59a515f97b609da8e2d5b3fe0a0f1cdc983760ebee6a6
Contents?: true
Size: 422 Bytes
Versions: 9
Compression:
Stored size: 422 Bytes
Contents
#!/usr/bin/env ruby # Test gsl/dht/test.c: test_dht_simple() # Expected results: # vout[0]=4.00 # vout[5]=1.84 # vout[10]=1.27 # vout[35]=0.352 # vout[100]=0.0237 require("gsl") N = 128 t = GSL::Dht.alloc(N, 0.0, 100.0) vin = GSL::Vector.alloc(N) for n in 0...N do x = t.x_sample(n) vin[n] = 1.0/(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