Permalink
Browse files

mathieu functions do not want to work

  • Loading branch information...
leto committed May 8, 2009
1 parent 0d31838 commit ebfc9a5eb5402dee2be712590ce2ef55fc521e48
Showing with 29 additions and 9 deletions.
  1. +1 −1 Build.PL
  2. +15 −5 swig/SF.i
  3. +13 −3 t/SF.t
View
@@ -207,7 +207,7 @@ my $builder = GSLBuilder->new(
include_dirs => q{},
extra_linker_flags => '-shared ' . $ldflags,
extra_compiler_flags=> "$ccflags " . ($ENV{CC_FLAGS}||''),
- swig_flags => $swig_flags,
+ swig_flags => " -Wall $swig_flags ",
license => 'gpl',
requires => {
'ExtUtils::PkgConfig' => '1.03',
View
@@ -2,13 +2,16 @@
%include "typemaps.i"
%include "gsl_typemaps.i"
-%apply double *OUTPUT { double * sn, double * cn, double * dn, double * sgn };
+%apply double *OUTPUT { double * sn, double * cn, double * dn, double * sgn, const double qq };
%{
+ #include "gsl/gsl_math.h"
#include "gsl/gsl_types.h"
+ #include "gsl/gsl_errno.h"
#include "gsl/gsl_version.h"
#include "gsl/gsl_mode.h"
#include "gsl/gsl_sf.h"
+ #include "gsl/gsl_sf_result.h"
#include "gsl/gsl_sf_airy.h"
#include "gsl/gsl_sf_bessel.h"
#include "gsl/gsl_sf_clausen.h"
@@ -32,20 +35,25 @@
#include "gsl/gsl_sf_legendre.h"
#include "gsl/gsl_sf_log.h"
#if defined(GSL_MINOR_VERSION) && GSL_MINOR_VERSION >= 11
+ #include "gsl/gsl_matrix.h"
+ #include "gsl/gsl_vector.h"
+ #include "gsl/gsl_eigen.h"
#include "gsl/gsl_sf_mathieu.h"
#endif
#include "gsl/gsl_sf_pow_int.h"
#include "gsl/gsl_sf_psi.h"
- #include "gsl/gsl_sf_result.h"
#include "gsl/gsl_sf_synchrotron.h"
#include "gsl/gsl_sf_transport.h"
#include "gsl/gsl_sf_trig.h"
#include "gsl/gsl_sf_zeta.h"
%}
+%include "gsl/gsl_math.h"
+%include "gsl/gsl_errno.h"
%include "gsl/gsl_types.h"
%include "gsl/gsl_version.h"
%include "gsl/gsl_mode.h"
%include "gsl/gsl_sf.h"
+%include "gsl/gsl_sf_result.h"
%include "gsl/gsl_sf_airy.h"
%include "gsl/gsl_sf_bessel.h"
%include "gsl/gsl_sf_clausen.h"
@@ -68,12 +76,14 @@
%include "gsl/gsl_sf_lambert.h"
%include "gsl/gsl_sf_legendre.h"
%include "gsl/gsl_sf_log.h"
-#ifdef __GSL_SF_MATHIEU_H__
+/* XXX put guard for older GSL's */
+ %include "gsl/gsl_matrix.h"
+ %include "gsl/gsl_vector.h"
+ %include "gsl/gsl_eigen.h"
%include "gsl/gsl_sf_mathieu.h"
-#endif
+
%include "gsl/gsl_sf_pow_int.h"
%include "gsl/gsl_sf_psi.h"
-%include "gsl/gsl_sf_result.h"
%include "gsl/gsl_sf_synchrotron.h"
%include "gsl/gsl_sf_transport.h"
%include "gsl/gsl_sf_trig.h"
View
16 t/SF.t
@@ -1,7 +1,7 @@
package Math::GSL::SF::Test;
use Math::GSL::Test qw/:all/;
use base q{Test::Class};
-use Test::More tests => 1109;
+use Test::More tests => 1110;
use Math::GSL qw/:all/;
use Math::GSL::Const qw/:all/;
use Math::GSL::Errno qw/:all/;
@@ -1178,11 +1178,21 @@ sub TEST_ZZZ_OLD_BUGS : Test(1)
ok_similar( [ gsl_sf_expint_En_e(3,300.0,$r) ] , [ 1.6608815083360041367294736e-133 ] );
}
-sub TEST_J0_RESULT_STRUCT: Tests(2) {
+sub TEST_J0_RESULT_STRUCT: Tests(2)
+{
my $result = Math::GSL::SF::gsl_sf_result_struct->new;
my ($status) = gsl_sf_bessel_J0_e(2.0,$result);
ok( defined $result->{err}, '$result->{err}' );
- ok( is_similar($result->{val}, gsl_sf_bessel_J0(2.0), $result->{err}) , '$result->{val}' );
+ ok_similar($result->{val}, gsl_sf_bessel_J0(2.0), $result->{err}, '$result->{val}' );
+}
+
+sub TEST_ZZZ_MATHIEU: Tests
+{
+ my $result = Math::GSL::SF::gsl_sf_result_struct->new;
+ ok_status(gsl_sf_mathieu_a(2, 1.0, $result));
+ local $TODO = 'mathieu functions';
+ isa_ok('Math::GSL::SF', gsl_sf_mathieu_alloc(10));
+
}
Test::Class->runtests;

0 comments on commit ebfc9a5

Please sign in to comment.