"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "GENERATED/PDL/Minuit.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).

Minuit.pm  (PDL-2.082):Minuit.pm  (PDL-2.083)
skipping to change at line 39 skipping to change at line 39
A basic fit with Minuit will call three functions in this package. First, a basi c A basic fit with Minuit will call three functions in this package. First, a basi c
initialization is done with mn_init(). Then, the parameters are defined via initialization is done with mn_init(). Then, the parameters are defined via
the function mn_def_pars(), which allows setting upper and lower bounds. Then the function mn_def_pars(), which allows setting upper and lower bounds. Then
the function mn_excm() can be used to issue many Minuit commands, including simp lex the function mn_excm() can be used to issue many Minuit commands, including simp lex
and migrad minimization algorithms (see Minuit manual for more details). and migrad minimization algorithms (see Minuit manual for more details).
See the test file minuit.t in the test (t/) directory for a basic example. See the test file minuit.t in the test (t/) directory for a basic example.
=cut =cut
#line 47 "Minuit.pm" #line 48 "Minuit.pm"
=head1 FUNCTIONS =head1 FUNCTIONS
=cut =cut
#line 37 "minuit.pd" #line 37 "minuit.pd"
use strict; use strict;
use warnings; use warnings;
skipping to change at line 90 skipping to change at line 90
} }
PDL::Minuit::mninit(5,$mn_options->{Unit},$mn_options->{Unit}); PDL::Minuit::mninit(5,$mn_options->{Unit},$mn_options->{Unit});
PDL::Minuit::mnseti($mn_options->{Title}); PDL::Minuit::mnseti($mn_options->{Title});
if (defined (my $logfile = $mn_options->{Log})){ if (defined (my $logfile = $mn_options->{Log})){
PDL::Minuit::mn_cierra($mn_options->{Unit}); PDL::Minuit::mn_cierra($mn_options->{Unit});
} }
} }
#line 107 "Minuit.pm" #line 103 "Minuit.pm"
#line 958 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm"
=head2 mninit =head2 mninit
=for sig =for sig
Signature: (longlong a();longlong b(); longlong c()) Signature: (longlong a();longlong b(); longlong c())
=for ref =for ref
info not available info not available
=for bad =for bad
mninit does not process bad values. mninit 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 134 "Minuit.pm"
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm"
*mninit = \&PDL::Minuit::mninit; *mninit = \&PDL::Minuit::mninit;
#line 141 "Minuit.pm"
#line 958 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm"
=head2 mn_abre =head2 mn_abre
=for sig =for sig
Signature: (longlong l(); char* nombre; char* mode) Signature: (longlong l(); char* nombre; char* mode)
=for ref =for ref
info not available info not available
=for bad =for bad
mn_abre does not process bad values. mn_abre 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 168 "Minuit.pm"
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm"
*mn_abre = \&PDL::Minuit::mn_abre; *mn_abre = \&PDL::Minuit::mn_abre;
#line 175 "Minuit.pm"
#line 958 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm"
=head2 mn_cierra =head2 mn_cierra
=for sig =for sig
Signature: (longlong l()) Signature: (longlong l())
=for ref =for ref
info not available info not available
=for bad =for bad
mn_cierra does not process bad values. mn_cierra 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 202 "Minuit.pm"
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm"
*mn_cierra = \&PDL::Minuit::mn_cierra; *mn_cierra = \&PDL::Minuit::mn_cierra;
#line 209 "Minuit.pm"
#line 108 "minuit.pd" #line 108 "minuit.pd"
sub mn_def_pars{ sub mn_def_pars{
my $pars = shift; my $pars = shift;
my $steps = shift; my $steps = shift;
my $n = nelem($pars); my $n = nelem($pars);
$mn_options->{N} = $n; $mn_options->{N} = $n;
skipping to change at line 214 skipping to change at line 196
$lo_bounds->slice("($i)"), $lo_bounds->slice("($i)"),
$up_bounds->slice("($i)"), $up_bounds->slice("($i)"),
$names[$i]); $names[$i]);
barf "Problem initializing parameter $i in Minuit, got $iflag" unless ($ifl ag == 0); barf "Problem initializing parameter $i in Minuit, got $iflag" unless ($ifl ag == 0);
} }
if (defined (my $logfile = $mn_options->{Log})){ if (defined (my $logfile = $mn_options->{Log})){
PDL::Minuit::mn_cierra($mn_options->{Unit}); PDL::Minuit::mn_cierra($mn_options->{Unit});
} }
} }
#line 261 "Minuit.pm" #line 232 "Minuit.pm"
#line 958 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm"
=head2 mnparm =head2 mnparm
=for sig =for sig
Signature: (longlong a(); double b(); double c(); double d(); double e(); long long [o] ia(); char* str) Signature: (longlong a(); double b(); double c(); double d(); double e(); long long [o] ia(); char* str)
=for ref =for ref
info not available info not available
=for bad =for bad
mnparm does not process bad values. mnparm 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 288 "Minuit.pm"
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm"
*mnparm = \&PDL::Minuit::mnparm; *mnparm = \&PDL::Minuit::mnparm;
#line 295 "Minuit.pm"
#line 164 "minuit.pd" #line 164 "minuit.pd"
sub mn_excm{ sub mn_excm{
my $command = shift; my $command = shift;
my $fun_ref = $mn_options->{Function}; my $fun_ref = $mn_options->{Function};
my ($arglis,$narg); my ($arglis,$narg);
if ( @_ ) { $arglis = shift; $narg = nelem($arglis);} if ( @_ ) { $arglis = shift; $narg = nelem($arglis);}
skipping to change at line 269 skipping to change at line 245
$iflag = PDL::Minuit::mnexcm($arglis, $narg, $command, $fun_ref,$mn_options->{ N}); $iflag = PDL::Minuit::mnexcm($arglis, $narg, $command, $fun_ref,$mn_options->{ N});
warn "Problem executing command '$command' " unless ($iflag == 0); warn "Problem executing command '$command' " unless ($iflag == 0);
if (defined (my $logfile = $mn_options->{Log})){ if (defined (my $logfile = $mn_options->{Log})){
PDL::Minuit::mn_cierra($mn_options->{Unit}); PDL::Minuit::mn_cierra($mn_options->{Unit});
} }
return $iflag; return $iflag;
} }
#line 329 "Minuit.pm" #line 288 "Minuit.pm"
#line 958 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm"
=head2 mnexcm =head2 mnexcm
=for sig =for sig
Signature: (double a(n); longlong ia(); longlong [o] ib(); char* str; SV* func tion; IV numelem) Signature: (double a(n); longlong ia(); longlong [o] ib(); char* str; SV* func tion; IV numelem)
=for ref =for ref
info not available info not available
=for bad =for bad
mnexcm does not process bad values. mnexcm 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 356 "Minuit.pm"
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm"
*mnexcm = \&PDL::Minuit::mnexcm; *mnexcm = \&PDL::Minuit::mnexcm;
#line 363 "Minuit.pm"
#line 205 "minuit.pd" #line 205 "minuit.pd"
sub mn_pout{ sub mn_pout{
barf "Usage: mn_pout(par_number)" unless ($#_ == 0); barf "Usage: mn_pout(par_number)" unless ($#_ == 0);
my $par_num = shift; my $par_num = shift;
my $n = $mn_options->{N}; my $n = $mn_options->{N};
if (($par_num < 1) || ($par_num > $n)) { barf "Parameter numbers range from 1 to $n "; } if (($par_num < 1) || ($par_num > $n)) { barf "Parameter numbers range from 1 to $n "; }
if (defined (my $logfile = $mn_options->{Log})){ if (defined (my $logfile = $mn_options->{Log})){
skipping to change at line 322 skipping to change at line 292
my $ivarbl = pdl(0); my $ivarbl = pdl(0);
my $par_name = " "; my $par_name = " ";
PDL::Minuit::mnpout($par_num,$val,$err,$bnd1,$bnd2,$ivarbl,\$par_name); PDL::Minuit::mnpout($par_num,$val,$err,$bnd1,$bnd2,$ivarbl,\$par_name);
if (defined (my $logfile = $mn_options->{Log})){ if (defined (my $logfile = $mn_options->{Log})){
PDL::Minuit::mn_cierra($mn_options->{Unit}); PDL::Minuit::mn_cierra($mn_options->{Unit});
} }
return ($val,$err,$bnd1,$bnd2,$ivarbl,$par_name); return ($val,$err,$bnd1,$bnd2,$ivarbl,$par_name);
} }
#line 394 "Minuit.pm" #line 342 "Minuit.pm"
#line 958 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm"
=head2 mnpout =head2 mnpout
=for sig =for sig
Signature: (longlong ia(); double [o] a(); double [o] b(); double [o] c(); dou ble [o] d();longlong [o] ib(); SV* str) Signature: (longlong ia(); double [o] a(); double [o] b(); double [o] c(); dou ble [o] d();longlong [o] ib(); SV* str)
=for ref =for ref
info not available info not available
=for bad =for bad
mnpout does not process bad values. mnpout 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 421 "Minuit.pm"
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm"
*mnpout = \&PDL::Minuit::mnpout; *mnpout = \&PDL::Minuit::mnpout;
#line 428 "Minuit.pm"
#line 242 "minuit.pd" #line 242 "minuit.pd"
sub mn_stat{ sub mn_stat{
if (defined (my $logfile = $mn_options->{Log})){ if (defined (my $logfile = $mn_options->{Log})){
PDL::Minuit::mn_abre($mn_options->{Unit},$logfile,'old'); PDL::Minuit::mn_abre($mn_options->{Unit},$logfile,'old');
} }
my ($fmin,$fedm,$errdef,$npari,$nparx,$istat) = PDL::Minuit::mnstat(); my ($fmin,$fedm,$errdef,$npari,$nparx,$istat) = PDL::Minuit::mnstat();
if (defined (my $logfile = $mn_options->{Log})){ if (defined (my $logfile = $mn_options->{Log})){
PDL::Minuit::mn_cierra($mn_options->{Unit}); PDL::Minuit::mn_cierra($mn_options->{Unit});
} }
return ($fmin,$fedm,$errdef,$npari,$nparx,$istat); return ($fmin,$fedm,$errdef,$npari,$nparx,$istat);
} }
#line 449 "Minuit.pm" #line 385 "Minuit.pm"
#line 958 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm"
=head2 mnstat =head2 mnstat
=for sig =for sig
Signature: (double [o] a(); double [o] b(); double [o] c(); longlong [o] ia(); longlong [o] ib(); longlong [o] ic()) Signature: (double [o] a(); double [o] b(); double [o] c(); longlong [o] ia(); longlong [o] ib(); longlong [o] ic())
=for ref =for ref
info not available info not available
=for bad =for bad
mnstat does not process bad values. mnstat 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 476 "Minuit.pm"
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm"
*mnstat = \&PDL::Minuit::mnstat; *mnstat = \&PDL::Minuit::mnstat;
#line 483 "Minuit.pm"
#line 264 "minuit.pd" #line 264 "minuit.pd"
sub mn_emat{ sub mn_emat{
if (defined (my $logfile = $mn_options->{Log})){ if (defined (my $logfile = $mn_options->{Log})){
PDL::Minuit::mn_abre($mn_options->{Unit},$logfile,'old'); PDL::Minuit::mn_abre($mn_options->{Unit},$logfile,'old');
} }
my ($fmin,$fedm,$errdef,$npari,$nparx,$istat) = PDL::Minuit::mnstat(); my ($fmin,$fedm,$errdef,$npari,$nparx,$istat) = PDL::Minuit::mnstat();
skipping to change at line 412 skipping to change at line 370
PDL::Minuit::mnemat($mat); PDL::Minuit::mnemat($mat);
if (defined (my $logfile = $mn_options->{Log})){ if (defined (my $logfile = $mn_options->{Log})){
PDL::Minuit::mn_cierra($mn_options->{Unit}); PDL::Minuit::mn_cierra($mn_options->{Unit});
} }
return $mat; return $mat;
} }
#line 509 "Minuit.pm" #line 434 "Minuit.pm"
#line 958 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm"
=head2 mnemat =head2 mnemat
=for sig =for sig
Signature: (double [o] mat(n,n)) Signature: (double [o] mat(n,n))
=for ref =for ref
info not available info not available
=for bad =for bad
mnemat does not process bad values. mnemat 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 536 "Minuit.pm"
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm"
*mnemat = \&PDL::Minuit::mnemat; *mnemat = \&PDL::Minuit::mnemat;
#line 543 "Minuit.pm"
#line 292 "minuit.pd" #line 292 "minuit.pd"
sub mn_err{ sub mn_err{
barf "Usage: mn_err(par_number)" unless ($#_ == 0); barf "Usage: mn_err(par_number)" unless ($#_ == 0);
my $par_num = shift; my $par_num = shift;
my $n = $mn_options->{N}; my $n = $mn_options->{N};
if (($par_num < 1) || ($par_num > $n)) { barf "Parameter numbers range from 1 to $n "; } if (($par_num < 1) || ($par_num > $n)) { barf "Parameter numbers range from 1 to $n "; }
skipping to change at line 461 skipping to change at line 413
} }
my ($eplus,$eminus,$eparab,$globcc) = PDL::Minuit::mnerrs($par_num); my ($eplus,$eminus,$eparab,$globcc) = PDL::Minuit::mnerrs($par_num);
if (defined (my $logfile = $mn_options->{Log})){ if (defined (my $logfile = $mn_options->{Log})){
PDL::Minuit::mn_cierra($mn_options->{Unit}); PDL::Minuit::mn_cierra($mn_options->{Unit});
} }
return ($eplus,$eminus,$eparab,$globcc); return ($eplus,$eminus,$eparab,$globcc);
} }
#line 570 "Minuit.pm" #line 484 "Minuit.pm"
#line 958 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm"
=head2 mnerrs =head2 mnerrs
=for sig =for sig
Signature: (longlong ia(); double [o] a(); double [o] b(); double [o] c(); dou ble [o] d()) Signature: (longlong ia(); double [o] a(); double [o] b(); double [o] c(); dou ble [o] d())
=for ref =for ref
info not available info not available
=for bad =for bad
mnerrs does not process bad values. mnerrs 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 597 "Minuit.pm"
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm"
*mnerrs = \&PDL::Minuit::mnerrs; *mnerrs = \&PDL::Minuit::mnerrs;
#line 604 "Minuit.pm"
#line 320 "minuit.pd" #line 320 "minuit.pd"
sub mn_contour{ sub mn_contour{
barf "Usage: mn_contour(par_number_1,par_number_2,npt)" unless ($#_ == 2); barf "Usage: mn_contour(par_number_1,par_number_2,npt)" unless ($#_ == 2);
my $par_num_1 = shift; my $par_num_1 = shift;
my $par_num_2 = shift; my $par_num_2 = shift;
my $npt = shift; my $npt = shift;
my $fun_ref = $mn_options->{Function}; my $fun_ref = $mn_options->{Function};
skipping to change at line 515 skipping to change at line 461
my $nfound = pdl->new; my $nfound = pdl->new;
PDL::Minuit::mncont($par_num_1,$par_num_2,$npt,$xpt,$ypt,$nfound,$fun_ref,$n ); PDL::Minuit::mncont($par_num_1,$par_num_2,$npt,$xpt,$ypt,$nfound,$fun_ref,$n );
if (defined (my $logfile = $mn_options->{Log})){ if (defined (my $logfile = $mn_options->{Log})){
PDL::Minuit::mn_cierra($mn_options->{Unit}); PDL::Minuit::mn_cierra($mn_options->{Unit});
} }
return ($xpt,$ypt,$nfound); return ($xpt,$ypt,$nfound);
} }
#line 636 "Minuit.pm" #line 539 "Minuit.pm"
#line 958 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm"
=head2 mncont =head2 mncont
=for sig =for sig
Signature: (longlong ia(); longlong ib(); longlong ic(); double [o] a(n); doub le [o] b(n); longlong [o] id(); SV* function; IV numelem) Signature: (longlong ia(); longlong ib(); longlong ic(); double [o] a(n); doub le [o] b(n); longlong [o] id(); SV* function; IV numelem)
=for ref =for ref
info not available info not available
=for bad =for bad
mncont does not process bad values. mncont 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 663 "Minuit.pm"
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm"
*mncont = \&PDL::Minuit::mncont; *mncont = \&PDL::Minuit::mncont;
#line 670 "Minuit.pm"
#line 358 "minuit.pd" #line 358 "minuit.pd"
=head2 mn_init() =head2 mn_init()
=for ref =for ref
The function mn_init() does the basic initialization of the fit. The first argum ent The function mn_init() does the basic initialization of the fit. The first argum ent
has to be a reference to the function to be minimized. The function has to be a reference to the function to be minimized. The function
to be minimized has to receive five arguments to be minimized has to receive five arguments
skipping to change at line 807 skipping to change at line 747
=head1 AUTHOR =head1 AUTHOR
This file copyright (C) 2007 Andres Jordan <ajordan@eso.org>. This file copyright (C) 2007 Andres Jordan <ajordan@eso.org>.
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.
=cut =cut
#line 945 "Minuit.pm" #line 832 "Minuit.pm"
# Exit with OK status # Exit with OK status
1; 1;
 End of changes. 30 change blocks. 
70 lines changed or deleted 10 lines changed or added

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