CXC-PDL-Bin1D
view release on metacpan or search on metacpan
lib/CXC/PDL/Bin1D.pd view on Meta::CPAN
PMFunc => q{},
Doc => undef,
);
push @EXPORT_OK, 'bin_on_index';
pp_def(
'bin_on_index',
Pars => join(
q{;},
# inputs
'data(n)', # piddle containing data to bin
"$IndexParsType index(n)", # input index
'weight(n)', # populated if flags && HAVE_WEIGHT
"$IndexParsType imin(nt)", # minimum index value to consider
"$IndexParsType nbins(nt)", # number of bins
# outputs
"$IndexParsType [o] b_count(nb)", # number of data values
'double [o] b_data(nb)', # sum of the data
'double [o] b_weight(nb)',
'double [o] b_weight2(nb)',
'double [o] b_mean(nb)',
'double [o] b_dmin(nb)',
'double [o] b_dmax(nb)',
'double [o] b_dev2(nb)',
# temporaries
'double [t] b_data_error(nb)',
'double [t] b_weight_error(nb)',
'double [t] b_weight2_error(nb)',
),
OtherPars => fill_in_string(
join(
q{;},
'unsigned long optflags', # can't call it flags; clashes with PDL internals
'PDL_Indx nbins_max', # maximum number of bins
),
),
RedoDimsCode =>
q/ $SIZE(nb) = $COMP(nbins_max) + ($COMP(optflags) & BIN_ARG_SAVE_OOB ? 2 : 0 ); /,
Code => fill_in(
file => 'bin_on_index.c',
package => 'bin_on_index',
),
HandleBad => 1,
BadCode => fill_in(
file => 'bin_on_index.c',
package => 'bin_on_index_bad',
hash => { PDL_BAD_CODE => 1 },
),
PMCode => slurp( 'bin_on_index.pl' ),
PMFunc => q{},
Doc => undef,
);
pp_addpm( { At => 'Bot' }, <<'EOD' );
=head1 BUGS AND LIMITATIONS
No bugs have been reported.
=head1 AUTHOR
Diab Jerius, E<lt>djerius@cpan.orgE<gt>
=head1 COPYRIGHT AND LICENSE
Copyright 2008 Smithsonian Astrophysical Observatory
CXC::PDL::Bin1D is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or (at
your option) any later version.
This program is distributed in the hope that it will be useful,
but without any warranty; without even the implied warranty of
merchantability or fitness for a particular purpose. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see L<http://www.gnu.org/licenses/>.
=cut
EOD
pp_export_nothing();
pp_addpm( { At => 'Top' },
qq[\$EXPORT_TAGS{constants} = [ qw(\n@{[ join "\n", @CONSTANT_NAMES ]}\n)];\n] );
pp_addpm( { At => 'Top' }, qq[\$EXPORT_TAGS{Func} = [ qw(\n@{[ join "\n", @EXPORT_OK ]}\n)];\n] );
pp_addpm( { At => 'Top' }, q[@EXPORT_OK = map { @{$_} } values %EXPORT_TAGS] . ";\n" );
pp_done();
1;
( run in 1.172 second using v1.01-cache-2.11-cpan-5c0b1e786e0 )