"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "GENERATED/PDL/Ops.pm" between
PDL-2.079.tar.gz and PDL-2.080.tar.gz

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

Ops.pm  (PDL-2.079):Ops.pm  (PDL-2.080)
skipping to change at line 51 skipping to change at line 51
none none
=cut =cut
#line 54 "Ops.pm" #line 54 "Ops.pm"
=head1 FUNCTIONS =head1 FUNCTIONS
=cut =cut
#line 133 "ops.pd" #line 132 "ops.pd"
{ {
my ($foo, $overload_sub); my ($foo, $overload_sub);
BEGIN { $OVERLOADS{'+'} = $overload_sub = sub(;@) { BEGIN { $OVERLOADS{'+'} = $overload_sub = sub(;@) {
return PDL::plus(@_) unless ref $_[1] return PDL::plus(@_) unless ref $_[1]
&& (ref $_[1] ne 'PDL') && (ref $_[1] ne 'PDL')
&& defined($foo = overload::Method($_[1], '+')) && defined($foo = overload::Method($_[1], '+'))
&& $foo != $overload_sub; # recursion guard && $foo != $overload_sub; # recursion guard
$foo->($_[1], $_[0], !$_[2]); $foo->($_[1], $_[0], !$_[2]);
}; } }; }
skipping to change at line 106 skipping to change at line 106
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 123 "Ops.pm" #line 123 "Ops.pm"
#line 1060 "../../blib/lib/PDL/PP.pm" #line 1060 "../../blib/lib/PDL/PP.pm"
*plus = \&PDL::plus; *plus = \&PDL::plus;
#line 130 "Ops.pm" #line 130 "Ops.pm"
#line 133 "ops.pd" #line 132 "ops.pd"
{ {
my ($foo, $overload_sub); my ($foo, $overload_sub);
BEGIN { $OVERLOADS{'*'} = $overload_sub = sub(;@) { BEGIN { $OVERLOADS{'*'} = $overload_sub = sub(;@) {
return PDL::mult(@_) unless ref $_[1] return PDL::mult(@_) unless ref $_[1]
&& (ref $_[1] ne 'PDL') && (ref $_[1] ne 'PDL')
&& defined($foo = overload::Method($_[1], '*')) && defined($foo = overload::Method($_[1], '*'))
&& $foo != $overload_sub; # recursion guard && $foo != $overload_sub; # recursion guard
$foo->($_[1], $_[0], !$_[2]); $foo->($_[1], $_[0], !$_[2]);
}; } }; }
skipping to change at line 161 skipping to change at line 161
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 189 "Ops.pm" #line 189 "Ops.pm"
#line 1060 "../../blib/lib/PDL/PP.pm" #line 1060 "../../blib/lib/PDL/PP.pm"
*mult = \&PDL::mult; *mult = \&PDL::mult;
#line 196 "Ops.pm" #line 196 "Ops.pm"
#line 133 "ops.pd" #line 132 "ops.pd"
{ {
my ($foo, $overload_sub); my ($foo, $overload_sub);
BEGIN { $OVERLOADS{'-'} = $overload_sub = sub(;@) { BEGIN { $OVERLOADS{'-'} = $overload_sub = sub(;@) {
return PDL::minus(@_) unless ref $_[1] return PDL::minus(@_) unless ref $_[1]
&& (ref $_[1] ne 'PDL') && (ref $_[1] ne 'PDL')
&& defined($foo = overload::Method($_[1], '-')) && defined($foo = overload::Method($_[1], '-'))
&& $foo != $overload_sub; # recursion guard && $foo != $overload_sub; # recursion guard
$foo->($_[1], $_[0], !$_[2]); $foo->($_[1], $_[0], !$_[2]);
}; } }; }
skipping to change at line 216 skipping to change at line 216
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 255 "Ops.pm" #line 255 "Ops.pm"
#line 1060 "../../blib/lib/PDL/PP.pm" #line 1060 "../../blib/lib/PDL/PP.pm"
*minus = \&PDL::minus; *minus = \&PDL::minus;
#line 262 "Ops.pm" #line 262 "Ops.pm"
#line 133 "ops.pd" #line 132 "ops.pd"
{ {
my ($foo, $overload_sub); my ($foo, $overload_sub);
BEGIN { $OVERLOADS{'/'} = $overload_sub = sub(;@) { BEGIN { $OVERLOADS{'/'} = $overload_sub = sub(;@) {
return PDL::divide(@_) unless ref $_[1] return PDL::divide(@_) unless ref $_[1]
&& (ref $_[1] ne 'PDL') && (ref $_[1] ne 'PDL')
&& defined($foo = overload::Method($_[1], '/')) && defined($foo = overload::Method($_[1], '/'))
&& $foo != $overload_sub; # recursion guard && $foo != $overload_sub; # recursion guard
$foo->($_[1], $_[0], !$_[2]); $foo->($_[1], $_[0], !$_[2]);
}; } }; }
skipping to change at line 271 skipping to change at line 271
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 321 "Ops.pm" #line 321 "Ops.pm"
#line 1060 "../../blib/lib/PDL/PP.pm" #line 1060 "../../blib/lib/PDL/PP.pm"
*divide = \&PDL::divide; *divide = \&PDL::divide;
#line 328 "Ops.pm" #line 328 "Ops.pm"
#line 133 "ops.pd" #line 132 "ops.pd"
{ {
my ($foo, $overload_sub); my ($foo, $overload_sub);
BEGIN { $OVERLOADS{'>'} = $overload_sub = sub(;@) { BEGIN { $OVERLOADS{'>'} = $overload_sub = sub(;@) {
return PDL::gt(@_) unless ref $_[1] return PDL::gt(@_) unless ref $_[1]
&& (ref $_[1] ne 'PDL') && (ref $_[1] ne 'PDL')
&& defined($foo = overload::Method($_[1], '>')) && defined($foo = overload::Method($_[1], '>'))
&& $foo != $overload_sub; # recursion guard && $foo != $overload_sub; # recursion guard
$foo->($_[1], $_[0], !$_[2]); $foo->($_[1], $_[0], !$_[2]);
}; } }; }
skipping to change at line 322 skipping to change at line 322
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 383 "Ops.pm" #line 383 "Ops.pm"
#line 1060 "../../blib/lib/PDL/PP.pm" #line 1060 "../../blib/lib/PDL/PP.pm"
*gt = \&PDL::gt; *gt = \&PDL::gt;
#line 390 "Ops.pm" #line 390 "Ops.pm"
#line 133 "ops.pd" #line 132 "ops.pd"
{ {
my ($foo, $overload_sub); my ($foo, $overload_sub);
BEGIN { $OVERLOADS{'<'} = $overload_sub = sub(;@) { BEGIN { $OVERLOADS{'<'} = $overload_sub = sub(;@) {
return PDL::lt(@_) unless ref $_[1] return PDL::lt(@_) unless ref $_[1]
&& (ref $_[1] ne 'PDL') && (ref $_[1] ne 'PDL')
&& defined($foo = overload::Method($_[1], '<')) && defined($foo = overload::Method($_[1], '<'))
&& $foo != $overload_sub; # recursion guard && $foo != $overload_sub; # recursion guard
$foo->($_[1], $_[0], !$_[2]); $foo->($_[1], $_[0], !$_[2]);
}; } }; }
skipping to change at line 373 skipping to change at line 373
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 445 "Ops.pm" #line 445 "Ops.pm"
#line 1060 "../../blib/lib/PDL/PP.pm" #line 1060 "../../blib/lib/PDL/PP.pm"
*lt = \&PDL::lt; *lt = \&PDL::lt;
#line 452 "Ops.pm" #line 452 "Ops.pm"
#line 133 "ops.pd" #line 132 "ops.pd"
{ {
my ($foo, $overload_sub); my ($foo, $overload_sub);
BEGIN { $OVERLOADS{'<='} = $overload_sub = sub(;@) { BEGIN { $OVERLOADS{'<='} = $overload_sub = sub(;@) {
return PDL::le(@_) unless ref $_[1] return PDL::le(@_) unless ref $_[1]
&& (ref $_[1] ne 'PDL') && (ref $_[1] ne 'PDL')
&& defined($foo = overload::Method($_[1], '<=')) && defined($foo = overload::Method($_[1], '<='))
&& $foo != $overload_sub; # recursion guard && $foo != $overload_sub; # recursion guard
$foo->($_[1], $_[0], !$_[2]); $foo->($_[1], $_[0], !$_[2]);
}; } }; }
skipping to change at line 424 skipping to change at line 424
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 507 "Ops.pm" #line 507 "Ops.pm"
#line 1060 "../../blib/lib/PDL/PP.pm" #line 1060 "../../blib/lib/PDL/PP.pm"
*le = \&PDL::le; *le = \&PDL::le;
#line 514 "Ops.pm" #line 514 "Ops.pm"
#line 133 "ops.pd" #line 132 "ops.pd"
{ {
my ($foo, $overload_sub); my ($foo, $overload_sub);
BEGIN { $OVERLOADS{'>='} = $overload_sub = sub(;@) { BEGIN { $OVERLOADS{'>='} = $overload_sub = sub(;@) {
return PDL::ge(@_) unless ref $_[1] return PDL::ge(@_) unless ref $_[1]
&& (ref $_[1] ne 'PDL') && (ref $_[1] ne 'PDL')
&& defined($foo = overload::Method($_[1], '>=')) && defined($foo = overload::Method($_[1], '>='))
&& $foo != $overload_sub; # recursion guard && $foo != $overload_sub; # recursion guard
$foo->($_[1], $_[0], !$_[2]); $foo->($_[1], $_[0], !$_[2]);
}; } }; }
skipping to change at line 475 skipping to change at line 475
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 569 "Ops.pm" #line 569 "Ops.pm"
#line 1060 "../../blib/lib/PDL/PP.pm" #line 1060 "../../blib/lib/PDL/PP.pm"
*ge = \&PDL::ge; *ge = \&PDL::ge;
#line 576 "Ops.pm" #line 576 "Ops.pm"
#line 133 "ops.pd" #line 132 "ops.pd"
{ {
my ($foo, $overload_sub); my ($foo, $overload_sub);
BEGIN { $OVERLOADS{'=='} = $overload_sub = sub(;@) { BEGIN { $OVERLOADS{'=='} = $overload_sub = sub(;@) {
return PDL::eq(@_) unless ref $_[1] return PDL::eq(@_) unless ref $_[1]
&& (ref $_[1] ne 'PDL') && (ref $_[1] ne 'PDL')
&& defined($foo = overload::Method($_[1], '==')) && defined($foo = overload::Method($_[1], '=='))
&& $foo != $overload_sub; # recursion guard && $foo != $overload_sub; # recursion guard
$foo->($_[1], $_[0], !$_[2]); $foo->($_[1], $_[0], !$_[2]);
}; } }; }
skipping to change at line 526 skipping to change at line 526
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 631 "Ops.pm" #line 631 "Ops.pm"
#line 1060 "../../blib/lib/PDL/PP.pm" #line 1060 "../../blib/lib/PDL/PP.pm"
*eq = \&PDL::eq; *eq = \&PDL::eq;
#line 638 "Ops.pm" #line 638 "Ops.pm"
#line 133 "ops.pd" #line 132 "ops.pd"
{ {
my ($foo, $overload_sub); my ($foo, $overload_sub);
BEGIN { $OVERLOADS{'!='} = $overload_sub = sub(;@) { BEGIN { $OVERLOADS{'!='} = $overload_sub = sub(;@) {
return PDL::ne(@_) unless ref $_[1] return PDL::ne(@_) unless ref $_[1]
&& (ref $_[1] ne 'PDL') && (ref $_[1] ne 'PDL')
&& defined($foo = overload::Method($_[1], '!=')) && defined($foo = overload::Method($_[1], '!='))
&& $foo != $overload_sub; # recursion guard && $foo != $overload_sub; # recursion guard
$foo->($_[1], $_[0], !$_[2]); $foo->($_[1], $_[0], !$_[2]);
}; } }; }
skipping to change at line 577 skipping to change at line 577
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 693 "Ops.pm" #line 693 "Ops.pm"
#line 1060 "../../blib/lib/PDL/PP.pm" #line 1060 "../../blib/lib/PDL/PP.pm"
*ne = \&PDL::ne; *ne = \&PDL::ne;
#line 700 "Ops.pm" #line 700 "Ops.pm"
#line 133 "ops.pd" #line 132 "ops.pd"
{ {
my ($foo, $overload_sub); my ($foo, $overload_sub);
BEGIN { $OVERLOADS{'<<'} = $overload_sub = sub(;@) { BEGIN { $OVERLOADS{'<<'} = $overload_sub = sub(;@) {
return PDL::shiftleft(@_) unless ref $_[1] return PDL::shiftleft(@_) unless ref $_[1]
&& (ref $_[1] ne 'PDL') && (ref $_[1] ne 'PDL')
&& defined($foo = overload::Method($_[1], '<<')) && defined($foo = overload::Method($_[1], '<<'))
&& $foo != $overload_sub; # recursion guard && $foo != $overload_sub; # recursion guard
$foo->($_[1], $_[0], !$_[2]); $foo->($_[1], $_[0], !$_[2]);
}; } }; }
skipping to change at line 632 skipping to change at line 632
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 759 "Ops.pm" #line 759 "Ops.pm"
#line 1060 "../../blib/lib/PDL/PP.pm" #line 1060 "../../blib/lib/PDL/PP.pm"
*shiftleft = \&PDL::shiftleft; *shiftleft = \&PDL::shiftleft;
#line 766 "Ops.pm" #line 766 "Ops.pm"
#line 133 "ops.pd" #line 132 "ops.pd"
{ {
my ($foo, $overload_sub); my ($foo, $overload_sub);
BEGIN { $OVERLOADS{'>>'} = $overload_sub = sub(;@) { BEGIN { $OVERLOADS{'>>'} = $overload_sub = sub(;@) {
return PDL::shiftright(@_) unless ref $_[1] return PDL::shiftright(@_) unless ref $_[1]
&& (ref $_[1] ne 'PDL') && (ref $_[1] ne 'PDL')
&& defined($foo = overload::Method($_[1], '>>')) && defined($foo = overload::Method($_[1], '>>'))
&& $foo != $overload_sub; # recursion guard && $foo != $overload_sub; # recursion guard
$foo->($_[1], $_[0], !$_[2]); $foo->($_[1], $_[0], !$_[2]);
}; } }; }
skipping to change at line 687 skipping to change at line 687
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 825 "Ops.pm" #line 825 "Ops.pm"
#line 1060 "../../blib/lib/PDL/PP.pm" #line 1060 "../../blib/lib/PDL/PP.pm"
*shiftright = \&PDL::shiftright; *shiftright = \&PDL::shiftright;
#line 832 "Ops.pm" #line 832 "Ops.pm"
#line 133 "ops.pd" #line 132 "ops.pd"
{ {
my ($foo, $overload_sub); my ($foo, $overload_sub);
BEGIN { $OVERLOADS{'|'} = $overload_sub = sub(;@) { BEGIN { $OVERLOADS{'|'} = $overload_sub = sub(;@) {
return PDL::or2($_[2]?@_[1,0]:@_[0,1]) unless ref $_[1] return PDL::or2($_[2]?@_[1,0]:@_[0,1]) unless ref $_[1]
&& (ref $_[1] ne 'PDL') && (ref $_[1] ne 'PDL')
&& defined($foo = overload::Method($_[1], '|')) && defined($foo = overload::Method($_[1], '|'))
&& $foo != $overload_sub; # recursion guard && $foo != $overload_sub; # recursion guard
$foo->($_[1], $_[0], !$_[2]); $foo->($_[1], $_[0], !$_[2]);
}; } }; }
skipping to change at line 742 skipping to change at line 742
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 891 "Ops.pm" #line 891 "Ops.pm"
#line 1060 "../../blib/lib/PDL/PP.pm" #line 1060 "../../blib/lib/PDL/PP.pm"
*or2 = \&PDL::or2; *or2 = \&PDL::or2;
#line 898 "Ops.pm" #line 898 "Ops.pm"
#line 133 "ops.pd" #line 132 "ops.pd"
{ {
my ($foo, $overload_sub); my ($foo, $overload_sub);
BEGIN { $OVERLOADS{'&'} = $overload_sub = sub(;@) { BEGIN { $OVERLOADS{'&'} = $overload_sub = sub(;@) {
return PDL::and2($_[2]?@_[1,0]:@_[0,1]) unless ref $_[1] return PDL::and2($_[2]?@_[1,0]:@_[0,1]) unless ref $_[1]
&& (ref $_[1] ne 'PDL') && (ref $_[1] ne 'PDL')
&& defined($foo = overload::Method($_[1], '&')) && defined($foo = overload::Method($_[1], '&'))
&& $foo != $overload_sub; # recursion guard && $foo != $overload_sub; # recursion guard
$foo->($_[1], $_[0], !$_[2]); $foo->($_[1], $_[0], !$_[2]);
}; } }; }
skipping to change at line 797 skipping to change at line 797
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 957 "Ops.pm" #line 957 "Ops.pm"
#line 1060 "../../blib/lib/PDL/PP.pm" #line 1060 "../../blib/lib/PDL/PP.pm"
*and2 = \&PDL::and2; *and2 = \&PDL::and2;
#line 964 "Ops.pm" #line 964 "Ops.pm"
#line 133 "ops.pd" #line 132 "ops.pd"
{ {
my ($foo, $overload_sub); my ($foo, $overload_sub);
BEGIN { $OVERLOADS{'^'} = $overload_sub = sub(;@) { BEGIN { $OVERLOADS{'^'} = $overload_sub = sub(;@) {
return PDL::xor($_[2]?@_[1,0]:@_[0,1]) unless ref $_[1] return PDL::xor($_[2]?@_[1,0]:@_[0,1]) unless ref $_[1]
&& (ref $_[1] ne 'PDL') && (ref $_[1] ne 'PDL')
&& defined($foo = overload::Method($_[1], '^')) && defined($foo = overload::Method($_[1], '^'))
&& $foo != $overload_sub; # recursion guard && $foo != $overload_sub; # recursion guard
$foo->($_[1], $_[0], !$_[2]); $foo->($_[1], $_[0], !$_[2]);
}; } }; }
skipping to change at line 852 skipping to change at line 852
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 1023 "Ops.pm" #line 1023 "Ops.pm"
#line 1060 "../../blib/lib/PDL/PP.pm" #line 1060 "../../blib/lib/PDL/PP.pm"
*xor = \&PDL::xor; *xor = \&PDL::xor;
#line 1030 "Ops.pm" #line 1030 "Ops.pm"
#line 309 "ops.pd" #line 308 "ops.pd"
BEGIN { $OVERLOADS{'~'} = sub { PDL::bitnot($_[0]) } } BEGIN { $OVERLOADS{'~'} = sub { PDL::bitnot($_[0]) } }
#line 1037 "Ops.pm" #line 1037 "Ops.pm"
#line 1058 "../../blib/lib/PDL/PP.pm" #line 1058 "../../blib/lib/PDL/PP.pm"
=head2 bitnot =head2 bitnot
=for sig =for sig
skipping to change at line 890 skipping to change at line 890
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 1072 "Ops.pm" #line 1072 "Ops.pm"
#line 1060 "../../blib/lib/PDL/PP.pm" #line 1060 "../../blib/lib/PDL/PP.pm"
*bitnot = \&PDL::bitnot; *bitnot = \&PDL::bitnot;
#line 1079 "Ops.pm" #line 1079 "Ops.pm"
#line 242 "ops.pd" #line 241 "ops.pd"
{ {
my ($foo, $overload_sub); my ($foo, $overload_sub);
BEGIN { $OVERLOADS{'**'} = $overload_sub = sub(;@) { BEGIN { $OVERLOADS{'**'} = $overload_sub = sub(;@) {
return PDL::power(@_) unless ref $_[1] return PDL::power(@_) unless ref $_[1]
&& (ref $_[1] ne 'PDL') && (ref $_[1] ne 'PDL')
&& defined($foo = overload::Method($_[1], '**')) && defined($foo = overload::Method($_[1], '**'))
&& $foo != $overload_sub; # recursion guard && $foo != $overload_sub; # recursion guard
$foo->($_[1], $_[0], !$_[2]); $foo->($_[1], $_[0], !$_[2]);
}; } }; }
skipping to change at line 945 skipping to change at line 945
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 1138 "Ops.pm" #line 1138 "Ops.pm"
#line 1060 "../../blib/lib/PDL/PP.pm" #line 1060 "../../blib/lib/PDL/PP.pm"
*power = \&PDL::power; *power = \&PDL::power;
#line 1145 "Ops.pm" #line 1145 "Ops.pm"
#line 242 "ops.pd" #line 241 "ops.pd"
{ {
my ($foo, $overload_sub); my ($foo, $overload_sub);
BEGIN { $OVERLOADS{'atan2'} = $overload_sub = sub(;@) { BEGIN { $OVERLOADS{'atan2'} = $overload_sub = sub(;@) {
return PDL::atan2(@_) unless ref $_[1] return PDL::atan2(@_) unless ref $_[1]
&& (ref $_[1] ne 'PDL') && (ref $_[1] ne 'PDL')
&& defined($foo = overload::Method($_[1], 'atan2')) && defined($foo = overload::Method($_[1], 'atan2'))
&& $foo != $overload_sub; # recursion guard && $foo != $overload_sub; # recursion guard
$foo->($_[1], $_[0], !$_[2]); $foo->($_[1], $_[0], !$_[2]);
}; } }; }
skipping to change at line 996 skipping to change at line 996
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 1200 "Ops.pm" #line 1200 "Ops.pm"
#line 1060 "../../blib/lib/PDL/PP.pm" #line 1060 "../../blib/lib/PDL/PP.pm"
*atan2 = \&PDL::atan2; *atan2 = \&PDL::atan2;
#line 1207 "Ops.pm" #line 1207 "Ops.pm"
#line 242 "ops.pd" #line 241 "ops.pd"
{ {
my ($foo, $overload_sub); my ($foo, $overload_sub);
BEGIN { $OVERLOADS{'%'} = $overload_sub = sub(;@) { BEGIN { $OVERLOADS{'%'} = $overload_sub = sub(;@) {
return PDL::modulo(@_) unless ref $_[1] return PDL::modulo(@_) unless ref $_[1]
&& (ref $_[1] ne 'PDL') && (ref $_[1] ne 'PDL')
&& defined($foo = overload::Method($_[1], '%')) && defined($foo = overload::Method($_[1], '%'))
&& $foo != $overload_sub; # recursion guard && $foo != $overload_sub; # recursion guard
$foo->($_[1], $_[0], !$_[2]); $foo->($_[1], $_[0], !$_[2]);
}; } }; }
skipping to change at line 1051 skipping to change at line 1051
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 1266 "Ops.pm" #line 1266 "Ops.pm"
#line 1060 "../../blib/lib/PDL/PP.pm" #line 1060 "../../blib/lib/PDL/PP.pm"
*modulo = \&PDL::modulo; *modulo = \&PDL::modulo;
#line 1273 "Ops.pm" #line 1273 "Ops.pm"
#line 242 "ops.pd" #line 241 "ops.pd"
{ {
my ($foo, $overload_sub); my ($foo, $overload_sub);
BEGIN { $OVERLOADS{'<=>'} = $overload_sub = sub(;@) { BEGIN { $OVERLOADS{'<=>'} = $overload_sub = sub(;@) {
return PDL::spaceship(@_) unless ref $_[1] return PDL::spaceship(@_) unless ref $_[1]
&& (ref $_[1] ne 'PDL') && (ref $_[1] ne 'PDL')
&& defined($foo = overload::Method($_[1], '<=>')) && defined($foo = overload::Method($_[1], '<=>'))
&& $foo != $overload_sub; # recursion guard && $foo != $overload_sub; # recursion guard
$foo->($_[1], $_[0], !$_[2]); $foo->($_[1], $_[0], !$_[2]);
}; } }; }
skipping to change at line 1102 skipping to change at line 1102
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 1328 "Ops.pm" #line 1328 "Ops.pm"
#line 1060 "../../blib/lib/PDL/PP.pm" #line 1060 "../../blib/lib/PDL/PP.pm"
*spaceship = \&PDL::spaceship; *spaceship = \&PDL::spaceship;
#line 1335 "Ops.pm" #line 1335 "Ops.pm"
#line 309 "ops.pd" #line 308 "ops.pd"
BEGIN { $OVERLOADS{'sqrt'} = sub { PDL::sqrt($_[0]) } } BEGIN { $OVERLOADS{'sqrt'} = sub { PDL::sqrt($_[0]) } }
#line 1342 "Ops.pm" #line 1342 "Ops.pm"
#line 1058 "../../blib/lib/PDL/PP.pm" #line 1058 "../../blib/lib/PDL/PP.pm"
=head2 sqrt =head2 sqrt
=for sig =for sig
skipping to change at line 1140 skipping to change at line 1140
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 1377 "Ops.pm" #line 1377 "Ops.pm"
#line 1060 "../../blib/lib/PDL/PP.pm" #line 1060 "../../blib/lib/PDL/PP.pm"
*sqrt = \&PDL::sqrt; *sqrt = \&PDL::sqrt;
#line 1384 "Ops.pm" #line 1384 "Ops.pm"
#line 309 "ops.pd" #line 308 "ops.pd"
BEGIN { $OVERLOADS{'sin'} = sub { PDL::sin($_[0]) } } BEGIN { $OVERLOADS{'sin'} = sub { PDL::sin($_[0]) } }
#line 1391 "Ops.pm" #line 1391 "Ops.pm"
#line 1058 "../../blib/lib/PDL/PP.pm" #line 1058 "../../blib/lib/PDL/PP.pm"
=head2 sin =head2 sin
=for sig =for sig
skipping to change at line 1178 skipping to change at line 1178
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 1426 "Ops.pm" #line 1426 "Ops.pm"
#line 1060 "../../blib/lib/PDL/PP.pm" #line 1060 "../../blib/lib/PDL/PP.pm"
*sin = \&PDL::sin; *sin = \&PDL::sin;
#line 1433 "Ops.pm" #line 1433 "Ops.pm"
#line 309 "ops.pd" #line 308 "ops.pd"
BEGIN { $OVERLOADS{'cos'} = sub { PDL::cos($_[0]) } } BEGIN { $OVERLOADS{'cos'} = sub { PDL::cos($_[0]) } }
#line 1440 "Ops.pm" #line 1440 "Ops.pm"
#line 1058 "../../blib/lib/PDL/PP.pm" #line 1058 "../../blib/lib/PDL/PP.pm"
=head2 cos =head2 cos
=for sig =for sig
skipping to change at line 1216 skipping to change at line 1216
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 1475 "Ops.pm" #line 1475 "Ops.pm"
#line 1060 "../../blib/lib/PDL/PP.pm" #line 1060 "../../blib/lib/PDL/PP.pm"
*cos = \&PDL::cos; *cos = \&PDL::cos;
#line 1482 "Ops.pm" #line 1482 "Ops.pm"
#line 309 "ops.pd" #line 308 "ops.pd"
BEGIN { $OVERLOADS{'!'} = sub { PDL::not($_[0]) } } BEGIN { $OVERLOADS{'!'} = sub { PDL::not($_[0]) } }
#line 1489 "Ops.pm" #line 1489 "Ops.pm"
#line 1058 "../../blib/lib/PDL/PP.pm" #line 1058 "../../blib/lib/PDL/PP.pm"
=head2 not =head2 not
=for sig =for sig
skipping to change at line 1254 skipping to change at line 1254
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 1524 "Ops.pm" #line 1524 "Ops.pm"
#line 1060 "../../blib/lib/PDL/PP.pm" #line 1060 "../../blib/lib/PDL/PP.pm"
*not = \&PDL::not; *not = \&PDL::not;
#line 1531 "Ops.pm" #line 1531 "Ops.pm"
#line 309 "ops.pd" #line 308 "ops.pd"
BEGIN { $OVERLOADS{'exp'} = sub { PDL::exp($_[0]) } } BEGIN { $OVERLOADS{'exp'} = sub { PDL::exp($_[0]) } }
#line 1538 "Ops.pm" #line 1538 "Ops.pm"
#line 1058 "../../blib/lib/PDL/PP.pm" #line 1058 "../../blib/lib/PDL/PP.pm"
=head2 exp =head2 exp
=for sig =for sig
skipping to change at line 1292 skipping to change at line 1292
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 1573 "Ops.pm" #line 1573 "Ops.pm"
#line 1060 "../../blib/lib/PDL/PP.pm" #line 1060 "../../blib/lib/PDL/PP.pm"
*exp = \&PDL::exp; *exp = \&PDL::exp;
#line 1580 "Ops.pm" #line 1580 "Ops.pm"
#line 309 "ops.pd" #line 308 "ops.pd"
BEGIN { $OVERLOADS{'log'} = sub { PDL::log($_[0]) } } BEGIN { $OVERLOADS{'log'} = sub { PDL::log($_[0]) } }
#line 1587 "Ops.pm" #line 1587 "Ops.pm"
#line 1058 "../../blib/lib/PDL/PP.pm" #line 1058 "../../blib/lib/PDL/PP.pm"
=head2 log =head2 log
=for sig =for sig
skipping to change at line 1597 skipping to change at line 1597
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 1963 "Ops.pm" #line 1963 "Ops.pm"
#line 1060 "../../blib/lib/PDL/PP.pm" #line 1060 "../../blib/lib/PDL/PP.pm"
*ipow = \&PDL::ipow; *ipow = \&PDL::ipow;
#line 1970 "Ops.pm" #line 1970 "Ops.pm"
#line 571 "ops.pd" #line 570 "ops.pd"
=head2 abs =head2 abs
=for ref =for ref
Returns the absolute value of a number. Returns the absolute value of a number.
=cut =cut
sub PDL::abs { $_[0]->type->real ? goto &PDL::_rabs : goto &PDL::_cabs } sub PDL::abs { $_[0]->type->real ? goto &PDL::_rabs : goto &PDL::_cabs }
#line 1986 "Ops.pm" #line 1986 "Ops.pm"
#line 583 "ops.pd" #line 582 "ops.pd"
BEGIN { $OVERLOADS{'abs'} = sub { PDL::abs($_[0]) } } BEGIN { $OVERLOADS{'abs'} = sub { PDL::abs($_[0]) } }
#line 1993 "Ops.pm" #line 1993 "Ops.pm"
#line 585 "ops.pd" #line 584 "ops.pd"
=head2 abs2 =head2 abs2
=for ref =for ref
Returns the square of the absolute value of a number. Returns the square of the absolute value of a number.
=cut =cut
sub PDL::abs2 ($) { my $r = &PDL::abs; $r * $r } sub PDL::abs2 ($) { my $r = &PDL::abs; $r * $r }
skipping to change at line 1698 skipping to change at line 1698
PDL::_i2C_int($_[0], $r); PDL::_i2C_int($_[0], $r);
$r; $r;
} }
#line 2090 "Ops.pm" #line 2090 "Ops.pm"
#line 1060 "../../blib/lib/PDL/PP.pm" #line 1060 "../../blib/lib/PDL/PP.pm"
*i2C = \&PDL::i2C; *i2C = \&PDL::i2C;
#line 2097 "Ops.pm" #line 2097 "Ops.pm"
#line 628 "ops.pd" #line 627 "ops.pd"
# This is to used warn if an operand is non-numeric or non-PDL. # This is to used warn if an operand is non-numeric or non-PDL.
sub warn_non_numeric_op_wrapper { sub warn_non_numeric_op_wrapper {
require Scalar::Util; require Scalar::Util;
my ($cb, $op_name) = @_; my ($cb, $op_name) = @_;
return sub { return sub {
my ($op1, $op2) = @_; my ($op1, $op2) = @_;
warn "'$op2' is not numeric nor a PDL in operator $op_name" warn "'$op2' is not numeric nor a PDL in operator $op_name"
unless Scalar::Util::looks_like_number($op2) unless Scalar::Util::looks_like_number($op2)
|| ( Scalar::Util::blessed($op2) && $op2->isa('PDL') ); || ( Scalar::Util::blessed($op2) && $op2->isa('PDL') );
 End of changes. 30 change blocks. 
30 lines changed or deleted 30 lines changed or added

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