---
name: "Math::GSL::NTuple"
section: "3pm"
platform: "linux"
package: "libmath-gsl-perl"
version: "0.45-2+b1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Math::GSL::NTuple"
---

# Math::GSL::NTuple(3pm)

Functions for creating and manipulating ntuples, sets of values

## NAME

Math::GSL::NTuple - Functions for creating and manipulating ntuples, sets of values

## SYNOPSIS

This module is partially implemented. Patches Welcome!

```
    use Math::GSL::NTuple qw /:all/;
```

## DESCRIPTION

Here is a list of all the functions in this module :

- •

  \<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.

- •

  \<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.

- •

  \<gsl\_ntuple\_write($ntuple)\>

  This function writes the current `$ntuple` `$ntuple`-\>{ntuple\_data} of size `$ntuple`-\>{size} to the corresponding file.

- •

  \<gsl\_ntuple\_bookdata($ntuple)\>

  This function is a synonym for gsl\_ntuple\_write.

- •

  \<gsl\_ntuple\_read($ntuple)\>

  This function reads the current row of the ntuple file for ntuple and stores the values in `$ntuple`-\>{data}.

- •

  \<**gsl\_ntuple\_project()**\>

- •

  \<gsl\_ntuple\_close($ntuple)\>

  This function closes the ntuple file ntuple and frees its associated allocated memory.

For more information on the functions, we refer you to the GSL official documentation: \<http://www.gnu.org/software/gsl/manual/html\_node/\>

## AUTHORS

Jonathan "Duke" Leto \<jonathan@leto.net\> and Thierry Moisan \<thierry.moisan@gmail.com\>

## COPYRIGHT AND LICENSE

Copyright (C) 2008-2024 Jonathan "Duke" Leto and Thierry Moisan

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
