Update the Changes file for 0.21 and improve .gitignore
[Math-GSL.git] / pod / NTuple.pod
blob263b4ff94ff5ff51530b4c3f8fb9eb50beb7dca5
1 %perlcode %{
2 use Data::Dumper;
3 use Carp qw/croak/;
4 use Math::GSL::Errno qw/:all/;
6 @EXPORT_OK = qw/
7                gsl_ntuple_open
8                gsl_ntuple_create
9                gsl_ntuple_write
10                gsl_ntuple_read
11                gsl_ntuple_bookdata
12                gsl_ntuple_project
13                gsl_ntuple_close
14              /;
15 %EXPORT_TAGS = ( all => [ @EXPORT_OK ] );
17 =head1 NAME
19 Math::GSL::NTuple - Functions for creating and manipulating ntuples, sets of values
21 =head1 SYNOPSIS
23 This module is partially implemented. Patches Welcome!
25     use Math::GSL::NTuple qw /:all/;
27 =head1 DESCRIPTION
29 Here is a list of all the functions in this module :
31 =over
33 =cut 
35 sub new
37     my ($class,$values) = @_;
38     my $this = {};
39     my $ntuple = Math::GSL::NTuple::gsl_ntuple->new;
40     $this->{_ntuple} = $ntuple;
42     bless $this, $class;
45 sub raw
47     return (shift)->{_ntuple};
49 =item * <gsl_ntuple_open($filename, $ntuple_data, $size)> - 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.
51 =item * <gsl_ntuple_create > - 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.
54 =item * <gsl_ntuple_write($ntuple)> - This function writes the current $ntuple $ntuple->{ntuple_data} of size $ntuple->{size} to the corresponding file.
56 =item * <gsl_ntuple_bookdata($ntuple)> - This function is a synonym for gsl_ntuple_write.
58 =item * <gsl_ntuple_read($ntuple)> - This function reads the current row of the ntuple file for ntuple and stores the values in $ntuple->{data}.
60 =item * <gsl_ntuple_project >
62 =item * <gsl_ntuple_close($ntuple)> - This function closes the ntuple file ntuple and frees its associated allocated memory.
64 =back
66 For more informations on the functions, we refer you to the GSL offcial
67 documentation: L<http://www.gnu.org/software/gsl/manual/html_node/>
69  Tip : search on google: site:http://www.gnu.org/software/gsl/manual/html_node/ name_of_the_function_you_want
72 =head1 AUTHORS
74 Jonathan Leto <jonathan@leto.net> and Thierry Moisan <thierry.moisan@gmail.com>
76 =head1 COPYRIGHT AND LICENSE
78 Copyright (C) 2008-2009-2009 Jonathan Leto and Thierry Moisan
80 This program is free software; you can redistribute it and/or modify it
81 under the same terms as Perl itself.
83 =cut