Finish pod separation and add stub tests for remaining subsystems
[Math-GSL.git] / pod / Poly.pod
blob948d95f45a456213792acb30910b5822dcd3a684
1 %perlcode %{
3 @EXPORT_OK = qw/
4                 gsl_poly_eval 
5                 gsl_poly_complex_eval 
6                 gsl_complex_poly_complex_eval 
7                 gsl_poly_dd_init 
8                 gsl_poly_dd_eval 
9                 gsl_poly_dd_taylor 
10                 gsl_poly_solve_quadratic 
11                 gsl_poly_complex_solve_quadratic 
12                 gsl_poly_solve_cubic 
13                 gsl_poly_complex_solve_cubic 
14                 gsl_poly_complex_workspace_alloc 
15                 gsl_poly_complex_workspace_free 
16                 gsl_poly_complex_solve 
17                 $GSL_POSZERO $GSL_NEGZERO $GSL_NAN
18              /;
19 our $GSL_NAN = gsl_nan();
21 %EXPORT_TAGS = ( all => \@EXPORT_OK );
23 __END__
25 =head1 NAME
27 Math::GSL::Poly - Functions for evaluating and solving polynomials
29 =head1 SYNOPSIS
31 use Math::GSL::Poly qw/:all/;
33 =head1 DESCRIPTION
35 Here is a list of all the functions included in this module :
37 =over
39 =item * gsl_poly_eval(@values, $length, $x) - This function evaluates a polynomial with real coefficients for the real variable $x. $length is the number of elements inside @values. The function returns a complex number. 
41 =item * gsl_poly_complex_eval(@values, $length, $z) - This function evaluates a polynomial with real coefficients for the complex variable $z. $length is the number of elements inside @valuesi. The function returns a complex number.    
43 =item * gsl_complex_poly_complex_eval(@values, $length, $z) - This function evaluates a polynomial with real coefficients for the complex variable $z. $length is the number of elements inside @values. $length is the number of elements inside @values. The function returns a complex number.
45 =item * gsl_poly_dd_init 
47 =item * gsl_poly_dd_eval 
49 =item * gsl_poly_dd_taylor 
51 =item * gsl_poly_solve_quadratic( $a, $b, $c, \$x0, \$x1) - find the real roots of the quadratic equation $a*x**2+$b*x+$c = 0, return the number of real root (either zero, one or two) and the real roots are returned by $x0, $x1 and $x2 which are deferenced.
53 =item * gsl_poly_complex_solve_quadratic
55 =item * gsl_poly_solve_cubic($a, $b, $c, \$x0, \$x1, \$x2) - find the real roots of the cubic equation x**3+$a*x**2+$b*x+$c = 0, return the number of real root (either one or three) and the real roots are returned by $x0, $x1 and $x2 which are deferenced.
57 =item * gsl_poly_complex_solve_cubic 
59 =item * gsl_poly_complex_workspace_alloc($n) - This function allocates space for a gsl_poly_complex_workspace struct and a workspace suitable for solving a polynomial with $n coefficients using the routine gsl_poly_complex_solve. 
61 =item * gsl_poly_complex_workspace_free($w) - This function frees all the memory associated with the workspace w. 
63 =item * gsl_poly_complex_solve 
65 =back
67 For more informations on the functions, we refer you to the GSL offcial documentation: 
68 L<http://www.gnu.org/software/gsl/manual/html_node/>
70 Tip : search on google: site:http://www.gnu.org/software/gsl/manual/html_node/ name_of_the_function_you_want
72 =head1 EXAMPLES
74 =over 1
76 =item C<use Math::GSL::Poly qw/:all/;>
78 =item C<my ($a,$b,$c) = (1,6,9);>
80 =item C<my ($x0, $x1) = (0,0);>
82 =item C<my $num_roots = gsl_poly_solve_quadratic( $a, $b, $c, \$x0, \$x1);>
84 =item C<print "${a}*x**2 + ${b}*x + $c contains $num_roots roots which are $x0 and $x1. \n";>
86 =back
88 =head1 AUTHORS
90 Jonathan Leto <jonathan@leto.net> and Thierry Moisan <thierry.moisan@gmail.com>
92 =head1 COPYRIGHT AND LICENSE
94 Copyright (C) 2008 Jonathan Leto and Thierry Moisan
96 This program is free software; you can redistribute it and/or modify it
97 under the same terms as Perl itself.
99 =cut