"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "GENERATED/PDL/GSL/INTERP.pm" between
PDL-2.082.tar.gz and PDL-2.083.tar.gz

About: PDL (Perl Data Language) aims to turn perl into an efficient numerical language for scientific computing (similar to IDL and MatLab).

INTERP.pm  (PDL-2.082):INTERP.pm  (PDL-2.083)
skipping to change at line 55 skipping to change at line 55
=head1 NOMENCLATURE =head1 NOMENCLATURE
Throughout this documentation we strive to use the same variables that Throughout this documentation we strive to use the same variables that
are present in the original GSL documentation (see L<See are present in the original GSL documentation (see L<See
Also|"SEE-ALSO">). Oftentimes those variables are called C<a> and Also|"SEE-ALSO">). Oftentimes those variables are called C<a> and
C<b>. Since good Perl coding practices discourage the use of Perl C<b>. Since good Perl coding practices discourage the use of Perl
variables C<$a> and C<$b>, here we refer to Parameters C<a> and C<b> variables C<$a> and C<$b>, here we refer to Parameters C<a> and C<b>
as C<$pa> and C<$pb>, respectively, and Limits (of domain or as C<$pa> and C<$pb>, respectively, and Limits (of domain or
integration) as C<$la> and C<$lb>. integration) as C<$la> and C<$lb>.
#line 63 "INTERP.pm" #line 64 "INTERP.pm"
=head1 FUNCTIONS =head1 FUNCTIONS
=cut =cut
#line 958 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm"
=head2 init =head2 init
=for sig =for sig
Signature: (double x(n); double y(n); gsl_spline *spl) Signature: (double x(n); double y(n); gsl_spline *spl)
=for ref =for ref
The init method initializes a new instance of INTERP. It needs as The init method initializes a new instance of INTERP. It needs as
input an interpolation type and two ndarrays holding the x and y input an interpolation type and two ndarrays holding the x and y
skipping to change at line 123 skipping to change at line 121
# no sorting done on x, user is certain that x is monotonically increasing # no sorting done on x, user is certain that x is monotonically increasing
$spl = PDL::GSL::INTERP->init('cspline',$x,$y,{Sort => 0}); $spl = PDL::GSL::INTERP->init('cspline',$x,$y,{Sort => 0});
=for bad =for bad
init does not process bad values. init does not process bad values.
It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
=cut =cut
#line 143 "INTERP.pm"
#line 959 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm"
sub init { sub init {
my $opt; my $opt;
if (ref($_[$#_]) eq 'HASH'){ $opt = pop @_; } if (ref($_[$#_]) eq 'HASH'){ $opt = pop @_; }
else{ $opt = {Sort => 1}; } else{ $opt = {Sort => 1}; }
my ($class,$type,$x,$y) = @_; my ($class,$type,$x,$y) = @_;
if( (ref($x) ne 'PDL') || (ref($y) ne 'PDL') ){ if( (ref($x) ne 'PDL') || (ref($y) ne 'PDL') ){
barf("Have to pass ndarrays as arguments to init method\n"); barf("Have to pass ndarrays as arguments to init method\n");
} }
if($$opt{Sort} != 0){ if($$opt{Sort} != 0){
skipping to change at line 147 skipping to change at line 142
$x = $x->index($idx); $x = $x->index($idx);
$y = $y->index($idx); $y = $y->index($idx);
} }
my $ene = nelem($x); my $ene = nelem($x);
my $obj1 = new_spline($type,$ene); my $obj1 = new_spline($type,$ene);
my $obj2 = new_accel(); my $obj2 = new_accel();
_init_int($x,$y,$$obj1); _init_int($x,$y,$$obj1);
my @ret_a = ($obj1,$obj2); my @ret_a = ($obj1,$obj2);
return bless(\@ret_a, $class); return bless(\@ret_a, $class);
} }
#line 169 "INTERP.pm"
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm"
*init = \&PDL::GSL::INTERP::init; *init = \&PDL::GSL::INTERP::init;
#line 176 "INTERP.pm"
#line 958 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm"
=head2 eval =head2 eval
=for sig =for sig
Signature: (double x(); double [o] out(); gsl_spline *spl;gsl_interp_accel *ac c) Signature: (double x(); double [o] out(); gsl_spline *spl;gsl_interp_accel *ac c)
=for ref =for ref
The function eval returns the interpolating function at a given point. The function eval returns the interpolating function at a given point.
skipping to change at line 185 skipping to change at line 174
Example: Example:
my $res = $spl->eval($x) my $res = $spl->eval($x)
=for bad =for bad
eval processes bad values. eval processes bad values.
It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
=cut =cut
#line 216 "INTERP.pm"
#line 959 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm"
sub eval { sub eval {
my $opt; my $opt;
my ($obj,$x) = @_; my ($obj,$x) = @_;
my $s_obj = $$obj[0]; my $s_obj = $$obj[0];
my $a_obj = $$obj[1]; my $a_obj = $$obj[1];
_eval_int($x,my $o=PDL->null,$$s_obj,$$a_obj); _eval_int($x,my $o=PDL->null,$$s_obj,$$a_obj);
$o; $o;
} }
#line 230 "INTERP.pm"
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm"
*eval = \&PDL::GSL::INTERP::eval; *eval = \&PDL::GSL::INTERP::eval;
#line 237 "INTERP.pm"
#line 958 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm"
=head2 deriv =head2 deriv
=for sig =for sig
Signature: (double x(); double [o] out(); gsl_spline *spl;gsl_interp_accel *ac c) Signature: (double x(); double [o] out(); gsl_spline *spl;gsl_interp_accel *ac c)
=for ref =for ref
The deriv function returns the derivative of the The deriv function returns the derivative of the
skipping to change at line 236 skipping to change at line 216
Example: Example:
my $res = $spl->deriv($x) my $res = $spl->deriv($x)
=for bad =for bad
deriv does not process bad values. deriv does not process bad values.
It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
=cut =cut
#line 278 "INTERP.pm"
#line 959 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm"
sub deriv { sub deriv {
my ($obj,$x) = @_; my ($obj,$x) = @_;
my $s_obj = $$obj[0]; my $s_obj = $$obj[0];
my $a_obj = $$obj[1]; my $a_obj = $$obj[1];
_deriv_int($x,my $o=PDL->null,$$s_obj,$$a_obj); _deriv_int($x,my $o=PDL->null,$$s_obj,$$a_obj);
$o; $o;
} }
#line 291 "INTERP.pm"
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm"
*deriv = \&PDL::GSL::INTERP::deriv; *deriv = \&PDL::GSL::INTERP::deriv;
#line 298 "INTERP.pm"
#line 958 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm"
=head2 deriv2 =head2 deriv2
=for sig =for sig
Signature: (double x(); double [o] out(); gsl_spline *spl;gsl_interp_accel *ac c) Signature: (double x(); double [o] out(); gsl_spline *spl;gsl_interp_accel *ac c)
=for ref =for ref
The deriv2 function returns the second derivative The deriv2 function returns the second derivative
skipping to change at line 286 skipping to change at line 257
Example: Example:
my $res = $spl->deriv2($x) my $res = $spl->deriv2($x)
=for bad =for bad
deriv2 does not process bad values. deriv2 does not process bad values.
It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
=cut =cut
#line 339 "INTERP.pm"
#line 959 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm"
sub deriv2 { sub deriv2 {
my ($obj,$x) = @_; my ($obj,$x) = @_;
my $s_obj = $$obj[0]; my $s_obj = $$obj[0];
my $a_obj = $$obj[1]; my $a_obj = $$obj[1];
_deriv2_int($x,my $o=PDL->null,$$s_obj,$$a_obj); _deriv2_int($x,my $o=PDL->null,$$s_obj,$$a_obj);
$o; $o;
} }
#line 352 "INTERP.pm"
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm"
*deriv2 = \&PDL::GSL::INTERP::deriv2; *deriv2 = \&PDL::GSL::INTERP::deriv2;
#line 359 "INTERP.pm"
#line 958 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm"
=head2 integ =head2 integ
=for sig =for sig
Signature: (double a(); double b(); double [o] out(); gsl_spline *spl;gsl_inte rp_accel *acc) Signature: (double a(); double b(); double [o] out(); gsl_spline *spl;gsl_inte rp_accel *acc)
=for ref =for ref
The integ function returns the integral The integ function returns the integral
skipping to change at line 336 skipping to change at line 298
Example: Example:
my $res = $spl->integ($la,$lb) my $res = $spl->integ($la,$lb)
=for bad =for bad
integ does not process bad values. integ does not process bad values.
It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
=cut =cut
#line 400 "INTERP.pm"
#line 959 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm"
sub integ { sub integ {
my ($obj,$la,$lb) = @_; my ($obj,$la,$lb) = @_;
my $s_obj = $$obj[0]; my $s_obj = $$obj[0];
my $a_obj = $$obj[1]; my $a_obj = $$obj[1];
_integ_int($la,$lb,my $o=PDL->null,$$s_obj,$$a_obj); _integ_int($la,$lb,my $o=PDL->null,$$s_obj,$$a_obj);
$o; $o;
} }
#line 413 "INTERP.pm"
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm"
*integ = \&PDL::GSL::INTERP::integ; *integ = \&PDL::GSL::INTERP::integ;
#line 420 "INTERP.pm"
#line 45 "gsl_interp.pd" #line 45 "gsl_interp.pd"
=head1 BUGS =head1 BUGS
Feedback is welcome. Feedback is welcome.
=head1 SEE ALSO =head1 SEE ALSO
L<PDL> L<PDL>
skipping to change at line 378 skipping to change at line 333
This file copyright (C) 2003 Andres Jordan <andresj@physics.rutgers.edu> This file copyright (C) 2003 Andres Jordan <andresj@physics.rutgers.edu>
All rights reserved. There is no warranty. You are allowed to redistribute this All rights reserved. There is no warranty. You are allowed to redistribute this
software/documentation under certain conditions. For details, see the file software/documentation under certain conditions. For details, see the file
COPYING in the PDL distribution. If this file is separated from the COPYING in the PDL distribution. If this file is separated from the
PDL distribution, the copyright notice should be included in the file. PDL distribution, the copyright notice should be included in the file.
The GSL interpolation module was written by Gerard Jungman. The GSL interpolation module was written by Gerard Jungman.
=cut =cut
#line 450 "INTERP.pm" #line 398 "INTERP.pm"
# Exit with OK status # Exit with OK status
1; 1;
 End of changes. 18 change blocks. 
47 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)