# This file was automatically generated by SWIG (http://www.swig.org). # Version 1.3.36 # # Don't modify this file, modify the SWIG interface instead. package Math::GSL::NTuple; use base qw(Exporter); use base qw(DynaLoader); package Math::GSL::NTuplec; bootstrap Math::GSL::NTuple; package Math::GSL::NTuple; @EXPORT = qw(); # ---------- BASE METHODS ------------- package Math::GSL::NTuple; sub TIEHASH { my ($classname,$obj) = @_; return bless $obj, $classname; } sub CLEAR { } sub FIRSTKEY { } sub NEXTKEY { } sub FETCH { my ($self,$field) = @_; my $member_func = "swig_${field}_get"; $self->$member_func(); } sub STORE { my ($self,$field,$newval) = @_; my $member_func = "swig_${field}_set"; $self->$member_func($newval); } sub this { my $ptr = shift; return tied(%$ptr); } # ------- FUNCTION WRAPPERS -------- package Math::GSL::NTuple; *gsl_ntuple_open = *Math::GSL::NTuplec::gsl_ntuple_open; *gsl_ntuple_create = *Math::GSL::NTuplec::gsl_ntuple_create; *gsl_ntuple_write = *Math::GSL::NTuplec::gsl_ntuple_write; *gsl_ntuple_read = *Math::GSL::NTuplec::gsl_ntuple_read; *gsl_ntuple_bookdata = *Math::GSL::NTuplec::gsl_ntuple_bookdata; *gsl_ntuple_project = *Math::GSL::NTuplec::gsl_ntuple_project; *gsl_ntuple_close = *Math::GSL::NTuplec::gsl_ntuple_close; ############# Class : Math::GSL::NTuple::gsl_ntuple ############## package Math::GSL::NTuple::gsl_ntuple; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( Math::GSL::NTuple ); %OWNER = (); %ITERATORS = (); *swig_file_get = *Math::GSL::NTuplec::gsl_ntuple_file_get; *swig_file_set = *Math::GSL::NTuplec::gsl_ntuple_file_set; *swig_ntuple_data_get = *Math::GSL::NTuplec::gsl_ntuple_ntuple_data_get; *swig_ntuple_data_set = *Math::GSL::NTuplec::gsl_ntuple_ntuple_data_set; *swig_size_get = *Math::GSL::NTuplec::gsl_ntuple_size_get; *swig_size_set = *Math::GSL::NTuplec::gsl_ntuple_size_set; sub new { my $pkg = shift; my $self = Math::GSL::NTuplec::new_gsl_ntuple(@_); bless $self, $pkg if defined($self); } sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { Math::GSL::NTuplec::delete_gsl_ntuple($self); delete $OWNER{$self}; } } sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : Math::GSL::NTuple::gsl_ntuple_select_fn ############## package Math::GSL::NTuple::gsl_ntuple_select_fn; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( Math::GSL::NTuple ); %OWNER = (); %ITERATORS = (); *swig_function_get = *Math::GSL::NTuplec::gsl_ntuple_select_fn_function_get; *swig_function_set = *Math::GSL::NTuplec::gsl_ntuple_select_fn_function_set; *swig_params_get = *Math::GSL::NTuplec::gsl_ntuple_select_fn_params_get; *swig_params_set = *Math::GSL::NTuplec::gsl_ntuple_select_fn_params_set; sub new { my $pkg = shift; my $self = Math::GSL::NTuplec::new_gsl_ntuple_select_fn(@_); bless $self, $pkg if defined($self); } sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { Math::GSL::NTuplec::delete_gsl_ntuple_select_fn($self); delete $OWNER{$self}; } } sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : Math::GSL::NTuple::gsl_ntuple_value_fn ############## package Math::GSL::NTuple::gsl_ntuple_value_fn; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( Math::GSL::NTuple ); %OWNER = (); %ITERATORS = (); *swig_function_get = *Math::GSL::NTuplec::gsl_ntuple_value_fn_function_get; *swig_function_set = *Math::GSL::NTuplec::gsl_ntuple_value_fn_function_set; *swig_params_get = *Math::GSL::NTuplec::gsl_ntuple_value_fn_params_get; *swig_params_set = *Math::GSL::NTuplec::gsl_ntuple_value_fn_params_set; sub new { my $pkg = shift; my $self = Math::GSL::NTuplec::new_gsl_ntuple_value_fn(@_); bless $self, $pkg if defined($self); } sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { Math::GSL::NTuplec::delete_gsl_ntuple_value_fn($self); delete $OWNER{$self}; } } sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } # ------- VARIABLE STUBS -------- package Math::GSL::NTuple; # Intermittent failure happens *after* this # END { warn "This is the end" } @EXPORT_OK = qw/ gsl_ntuple_open gsl_ntuple_create gsl_ntuple_write gsl_ntuple_read gsl_ntuple_bookdata gsl_ntuple_project gsl_ntuple_close /; %EXPORT_TAGS = ( all => [ @EXPORT_OK ] ); __END__ =head1 NAME Math::GSL::NTuple - Functions for creating and manipulating ntuples, sets of values associated with events =head1 SYNOPSIS This module is partially implemented. Patches Welcome! use Math::GSL::NTuple qw /:all/; =head1 DESCRIPTION Here is a list of all the functions in this module : =over =item * - This function opens an existing ntuple file $filename for reading and returns a pointer to a corresponding ntuple struct. The ntuples in the file must have size $size. A pointer to memory for the current ntuple row $ntuple_data, which is an array reference, must be supplied—this is used to copy ntuples in and out of the file. =item * - This function creates a new write-only ntuple file $filename for ntuples of size $size and returns a pointer to the newly created ntuple struct. Any existing file with the same name is truncated to zero length and overwritten. A pointer to memory for the current ntuple row $ntuple_data, which is an array reference, must be supplied—this is used to copy ntuples in and out of the file. =item * - This function writes the current $ntuple $ntuple->{ntuple_data} of size $ntuple->{size} to the corresponding file. =item * - This function is a synonym for gsl_ntuple_write. =item * - This function reads the current row of the ntuple file for ntuple and stores the values in $ntuple->{data}. =item * =item * - This function closes the ntuple file ntuple and frees its associated allocated memory. =back For more informations on the functions, we refer you to the GSL offcial documentation: L Tip : search on google: site:http://www.gnu.org/software/gsl/manual/html_node/ name_of_the_function_you_want =head1 AUTHORS Jonathan Leto and Thierry Moisan =head1 COPYRIGHT AND LICENSE Copyright (C) 2008 Jonathan Leto and Thierry Moisan This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut 1;