File Coverage

blib/lib/PerlGSL.pm
Criterion Covered Total %
statement 10 12 83.3
branch n/a
condition n/a
subroutine 4 4 100.0
pod n/a
total 14 16 87.5


line stmt bran cond sub pod time code
1             package PerlGSL;
2              
3 1     1   769 use strict;
  1         3  
  1         37  
4 1     1   5 use warnings;
  1         3  
  1         59  
5              
6             our $VERSION = '0.002';
7             $VERSION = eval $VERSION;
8              
9 1     1   14 use base 'Exporter';
  1         2  
  1         134  
10              
11             our %EXPORT_TAGS;
12             our @EXPORT_OK;
13              
14             BEGIN {
15 1     1   421 if ( eval { use PerlGSL::DiffEq 0.08 qw/ode_solver/; 1; } ) {
  0            
  0            
16             $EXPORT_TAGS{'diffeq'} = [ qw/ode_solver/ ];
17             }
18             }
19              
20             use PerlGSL::Integration::SingleDim 0.002 qw/int_1d/;
21             use PerlGSL::Integration::MultiDim 0.003 qw/int_multi/;
22             $EXPORT_TAGS{'integration'} = [ qw/int_1d int_multi/ ];
23              
24             use PerlGSL::RootFinding::SingleDim 0.001 qw/findroot_1d/;
25             $EXPORT_TAGS{'root_finding'} = [ qw/findroot_1d/ ];
26              
27             push @EXPORT_OK, @$_ for values %EXPORT_TAGS;
28             $EXPORT_TAGS{'all'} = \@EXPORT_OK;
29              
30             1;
31              
32              
33             =head1 NAME
34              
35             PerlGSL - A Collection of Perlish Interfaces to the Gnu Scientific Library
36              
37             =head1 SYNOPSIS
38              
39             =head1 DESCRIPTION
40              
41             L defines both a namespace (with certain goals) and a distribution. The aim is to flexibly and modularly provide the GSL to Perl.
42              
43             =head1 PerlGSL: The Namespace
44              
45             C is primarily a concept, a namespace in which to put Perlish interfaces to the Gnu Scientific Library. The GSL provides a large number of C routines for doing scientific/mathematical calculations. To use the GSL from Perl you need to use a I module which interfaces Perl with the GSL. Perl/C interfaces can come in many flavors; some feel more like C (see L) while others strive to feel more like Perl. C is meant to be a namespace to collect such modules.
46              
47             Authors are encouraged to upload your modules to the C namespace. For consistency, please attempt to:
48              
49             =over
50              
51             =item *
52              
53             Use a functional formalism if possible
54              
55             =item *
56              
57             Think of mathematical functions as Perl closures if possible
58              
59             =item *
60              
61             Wrap your C level functions in Perl level functions for easier argument munging in the future
62              
63             =item *
64              
65             Choose your module's name with care and consideration for future authors
66              
67             =item *
68              
69             Don't use the name of the library as the name of your module. Using these names may make it hard for others to name interfaces to the same library. Unfortunately, this may be unavoidable in some cases. In other cases, the library name may be used by central modules to farm out computations to other modules. For example a L library is planned which will smartly farm out integration to the most appropriate solver (by dimensionality and complexity).
70              
71             =item *
72              
73             Be sane
74              
75             =back
76              
77             =head1 PerlGSL: The Standard Distribution
78              
79             Beyond defining a namespace, the C module is a central module for installing/loading the "Standard" PerlGSL modules. Installing L will install all of the following modules. Loading L does nothing, however loading with a tag (e.g. C) will import certain functions from these modules; the number in square brackets indicated the C version number that the module was added to the standard distribution. Those tags are:
80              
81             =over
82              
83             =item integration
84              
85             =over
86              
87             =item *
88              
89             C - from L [since 0.001]
90              
91             =item *
92              
93             C - from L [since 0.001]
94              
95             =back
96              
97             =item root_finding
98              
99             =over
100              
101             =item *
102              
103             C - from L [since 0.002]
104              
105             =back
106              
107             =item diffeq
108              
109             =over
110              
111             =item *
112              
113             C - from L [since 0.001; requires GSL >= 1.15]
114              
115             =back
116              
117             =item all
118              
119             loads all of the above functions.
120              
121             =back
122              
123             Note also that any of the individual functions may be imported individully by name.
124              
125             If you are an author and would like your module added to this central framework please file a GitHub issue.
126              
127             =head1 Future Goals
128              
129             =over
130              
131             =item *
132              
133             Integrate L with L to provide the GSL library via CPAN
134              
135             =item *
136              
137             Continue to add modules to the namespace and the "Stardard Distribution", eventually forming a well rounded GSL implementation.
138              
139             =back
140              
141             =head1 Other Perl GSL Bindings
142              
143             L is by no means the only bindings for GSL available via CPAN. Its purpose is to feel Perlish, as such it is slower than a C-level binding set and it is only as complete as authors have provided. Other bindings have other strengths and weaknesses.
144              
145             =over
146              
147             =item *
148              
149             L - L is a C-level matrix-like sublanguage for Perl. It is in the vein of MatLab or IDL. It has bindings to many of the GSL libraries. It is fast, but only as Perlish as PDL is itself.
150              
151             =item *
152              
153             L - This set of bindings is generated by L; it is therefore ostensibly complete, though this is only partially true. Many modules will still need some massaging before they are functional. Even those that are may feel more like C than Perl.
154              
155             =back
156              
157             =head1 SOURCE REPOSITORY
158              
159             L
160              
161             =head1 AUTHOR
162              
163             Joel Berger, Ejoel.a.berger@gmail.comE
164              
165             =head1 COPYRIGHT AND LICENSE
166              
167             Copyright (C) 2012 by Joel Berger
168              
169             This library is free software; you can redistribute it and/or modify
170             it under the same terms as Perl itself.
171              
172             The GSL is licensed under the terms of the GNU General Public License (GPL)
173