debian/0000755000000000000000000000000012253331540007164 5ustar debian/watch0000644000000000000000000000013212233142405010207 0ustar version=3 http://ruby.gfd-dennou.org/products/ruby-fftw3/release ruby-fftw3-(.*)\.tar\.gz debian/patches/0000755000000000000000000000000012233142405010611 5ustar debian/patches/0002-RefactTestCases.patch0000644000000000000000000000513312233142405015236 0ustar From: Youhei SASAKI Date: Tue, 15 Oct 2013 17:00:05 +0900 Subject: RefactTestCases --- test/complexFFT.rb | 71 +++++++++++++++++++++++++++--------------------------- 1 file changed, 36 insertions(+), 35 deletions(-) diff --git a/test/complexFFT.rb b/test/complexFFT.rb index e92f64e..39ae57e 100644 --- a/test/complexFFT.rb +++ b/test/complexFFT.rb @@ -1,38 +1,39 @@ +require "test/unit" +require "narray" require "numru/fftw3" include NumRu -print "\n**TEST** all dimensions\n\n" - -na = NArray.float(8,4).fill(1) # will be corced to complex -na[1,1]=5 -p na -fc = FFTW3.fft(na, -1)/na.length -p fc -p fc.real - -p FFTW3.fft(fc, 1).real - -print "\n**TEST** single float (treated as single if lib fftw3f exits)\n" -print " --- see http://www.fftw.org/fftw3_doc/Precision.html for more info\n\n" -na = NArray.sfloat(8,4).indgen! -fc = FFTW3.fft(na, -1)/na.length -p fc -p FFTW3.fft(fc, 1).real - -print "\n**TEST** dimension selection\n\n" - -fc = FFTW3.fft(na, -1, 0)/na.shape[0] -p fc -p FFTW3.fft(fc, 1, 0).real -fc = FFTW3.fft(na, -1, 1)/na.shape[1] -p fc -p FFTW3.fft(fc, 1, 1).real - -na = NArray.float(4,3,8,3) -na[1,1,1,0]= 1 -p( fc=FFTW3.fft(na, -1, 0,2) / (na.shape[0]*na.shape[2]) ) -p( fc=FFTW3.fft(na, -1, 1) / na.shape[1] ) -p( fc=FFTW3.fft(na, -1, 0,1,2) / (na.shape[0]*na.shape[1]*na.shape[2]) ) -p FFTW3.fft(fc, 1, 0,1,2).real - - +class ComplexTest < Test::Unit::TestCase + + def setup + @na_double = NArray.float(8,4).fill(1.0) + @na_single = NArray.sfloat(8,4).indgen! + @na_complex = NArray.float(4,3,8,3) + @na_complex[1,1,1,0] = 1.0 + @sfloat_delta = 5.0e-5 + @float_delta = 1.0e-13 + end + + define_method("test_double_float") do + fc_double = FFTW3.fft(@na_double, -1)/@na_double.length + assert_in_delta @na_double, FFTW3.fft(fc_double, 1).real, @float_delta + end + + define_method("test_single_float") do + fc_single = FFTW3.fft(@na_single, -1)/@na_single.length + assert_in_delta @na_single, FFTW3.fft(fc_single, 1).real, @sfloat_delta + end + + define_method("test_dimenssion_selection") do + fc_double = FFTW3.fft(@na_double, -1, 0)/@na_double.shape[0] + assert_in_delta @na_double, FFTW3.fft(fc_double, 1, 0).real, @float_delta + fc_single = FFTW3.fft(@na_single, -1, 0)/@na_single.shape[0] + assert_in_delta @na_single, FFTW3.fft(fc_single, 1, 0).real, @sfloat_delta + end + + define_method("test_complex") do + fc_complex = FFTW3.fft(@na_complex, -1, 0, 1, 2)/(@na_complex.shape[0]*@na_complex.shape[1]*@na_complex.shape[2]) + assert_in_delta @na_complex, FFTW3.fft(fc_complex, 1, 0, 1, 2).real, @float_delta + end + +end debian/patches/0001-FixLibraryPath.patch0000644000000000000000000000110012233142405015070 0ustar From: Youhei SASAKI Date: Tue, 15 Oct 2013 17:00:05 +0900 Subject: FixLibraryPath --- extconf.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extconf.rb b/extconf.rb index 1607ea7..8e53119 100644 --- a/extconf.rb +++ b/extconf.rb @@ -1,7 +1,7 @@ require "mkmf" -dir_config('narray',$sitearchdir,$sitearchdir) -dir_config('fftw3','/usr/local') +dir_config('narray',$vendorarchdir,$vendorarchdir) +dir_config('fftw3','/usr') if ( ! ( have_header("narray.h") && have_header("narray_config.h") ) ) then print <<-EOS debian/patches/series0000644000000000000000000000006512233142405012027 0ustar 0001-FixLibraryPath.patch 0002-RefactTestCases.patch debian/ruby-test-files.yaml0000644000000000000000000000003112233142405013076 0ustar --- - test/complexFFT.rb debian/compat0000644000000000000000000000000212233142405010360 0ustar 7 debian/ruby-fftw3.docs0000644000000000000000000000002412233142405012040 0ustar doc/*.html doc/*.rd debian/control0000644000000000000000000000326212253330320010565 0ustar Source: ruby-fftw3 Section: ruby Priority: optional Maintainer: Youhei SASAKI Uploaders: Debian Ruby Extras Maintainers Build-Depends: debhelper (>= 7.0.50~), gem2deb (>= 0.3.0~), ruby-narray( >= 0.6.0.1-3~), libfftw3-dev Standards-Version: 3.9.4 Homepage: http://ruby.gfd-dennou.org/products/ruby-fftw3/ Vcs-Git: git://anonscm.debian.org/pkg-ruby-extras/ruby-fftw3.git Vcs-Browser: http://anonscm.debian.org/gitweb?p=pkg-ruby-extras/ruby-fftw3.git;a=summary XS-Ruby-Versions: all Package: ruby-fftw3 Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, ruby-narray Description: Ruby interface to the FFTW Ver.3 library Ruby-FFTW3 is the Ruby interface to the FFTW Ver.3 library. Features: - Use NArray, which is an efficient multi-dimensional numeric array class for Ruby - Multi-dimensional complex FFT.(Real data are coerced to complex) - Supports both double and single float transforms. - Not normalized as in FFTW Package: ruby-fftw3-dbg Section: debug Priority: extra Architecture: any Depends: ${misc:Depends}, ruby-fftw3 (=${binary:Version}) Description: Ruby FFT library using FFTW Ver.3 Ruby-FFTW3 is the Ruby interface to the FFTW Ver.3 library. Features: - Use NArray, which is an efficient multi-dimensional numeric array class for Ruby - Multi-dimensional complex FFT.(Real data are coerced to complex) - Supports both double and single float transforms. - Not normalized as in FFTW . This package is provided primarily to provide a backtrace with names in a debugger, this makes it somewhat easier to interpret core dumps. Most people will not need this package. debian/ruby-fftw3.doc-base0000644000000000000000000000043412233142405012572 0ustar Document: ruby-fftw3 Title: Ruby interface of FFTW3 Author: Takeshi Horinouchi Abstract: Ruby interface of FFTW3 API Documentation of Ruby-FFTW3 Section: Programming/Ruby Format: HTML Index: /usr/share/doc/ruby-fftw3/ruby-fftw3.html Files: /usr/share/doc/ruby-fftw3/ruby-fftw3.html debian/rules0000755000000000000000000000017012233142405010240 0ustar #!/usr/bin/make -f %: dh $@ --buildsystem ruby --with ruby override_dh_strip: dh_strip --dbg-package=ruby-fftw3-dbg debian/changelog0000644000000000000000000000312512253331540011037 0ustar ruby-fftw3 (0.4-6) unstable; urgency=medium * Fix Build-Depends for Ruby2.0 support * Rebuild against Ruby (>= 2.0), drop ruby1.8 binaries -- Youhei SASAKI Sun, 15 Dec 2013 22:49:02 +0900 ruby-fftw3 (0.4-5) unstable; urgency=low [ Cédric Boutillier ] * debian/control: remove obsolete DM-Upload-Allowed flag * use canonical URI in Vcs-* fields * debian/copyright: use DEP5 copyright-format/1.0 official URL for Format field [ Youhei SASAKI ] * Unapply patches after build * Refresh patches * Bump Standard version: 3.9.4 * Add doc-base support * Rebuild against newer ruby-narray, support Ruby >=2.0 (Closes: #720242) -- Youhei SASAKI Tue, 15 Oct 2013 17:28:24 +0900 ruby-fftw3 (0.4-4) unstable; urgency=low * debian/watch: fixed the URL to point to the releases page. * debian/control: Build against newer gem2deb for support rubygems-integration -- Youhei SASAKI Sat, 24 Nov 2012 13:46:18 +0900 ruby-fftw3 (0.4-3) unstable; urgency=low * Refactoring test suite * Add ruby-narray to Depends -- Youhei SASAKI Fri, 22 Jul 2011 18:44:52 +0900 ruby-fftw3 (0.4-2) unstable; urgency=low * Drop libnarray-rubyXX from Build-Depends * Fix narray dir from archdir to vendorarchdir (Closes: Bug#628284) * Refactoring test case -- Youhei SASAKI Wed, 18 May 2011 08:11:08 +0900 ruby-fftw3 (0.4-1) unstable; urgency=low * Initial release (Closes: Bug#546748) -- Youhei SASAKI Tue, 19 Apr 2011 17:17:16 +0900 debian/source/0000755000000000000000000000000012233142405010462 5ustar debian/source/format0000644000000000000000000000001412233142405011670 0ustar 3.0 (quilt) debian/copyright0000644000000000000000000000563712233142405011130 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: ruby-fftw3 Upstream-Contact: Takeshi Horinouchi and GFD Dennou Club Source: http://ruby.gfd-dennou.org/products/ruby-fftw3/ Files: * Copyright: 2011 Takeshi Horinouchi and GFD Dennou Club License: BSD-2-clause Ruby-FFTW3 is copyrighted free software by Takeshi Horinouchi and GFD Dennou Club (http://www.gfd-dennou.org/). . Copyright 2001 (C) Takeshi Horinouchi and GFD Dennou Club (http://www.gfd-dennou.org/) All rights reserved. . Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: . 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. . 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. . THIS SOFTWARE IS PROVIDED BY GFD DENNOU CLUB AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. . The views and conclusions contained in the software and documentation are those of the authors and should not be interpreted as representing official policies, either expressed or implied, of Takeshi Horinouchi and GFD Dennou Club. Files: debian/* Copyright: Copyright 2011 Youhei SASAKI License: GPL-2 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License. . This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . You should have received a copy of the GNU General Public License along with this package; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA . On Debian systems, the full text of the GNU General Public License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'.