Main Page | Modules | Class List | File List | Class Members | File Members

numerics.h

Go to the documentation of this file.
00001 
00014 /* This library is free software; you can redistribute it and/or
00015    modify it under the terms of the GNU Lesser General Public
00016    License as published by the Free Software Foundation; either
00017    version 2.1 of the License, or (at your option) any later version.
00018 
00019    This library is distributed in the hope that it will be useful,
00020    but WITHOUT ANY WARRANTY; without even the implied warranty of
00021    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00022    Lesser General Public License for more details.
00023 
00024    You should have received a copy of the GNU Lesser General Public
00025    License along with this library; if not, write to the Free Software
00026    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00027 */
00028 
00029 #ifndef _GAN_NUMERICS_H
00030 #define _GAN_NUMERICS_H
00031 
00032 #include <stdlib.h>
00033 #include <gandalf/common/misc_defs.h>
00034 #include <gandalf/common/complex.h>
00035 
00036 #ifdef __cplusplus
00037 extern "C" {
00038 #endif
00039 
00050 /* declarations of functions */
00051  int      gan_sqr_i  ( int       x );
00052  unsigned gan_sqr_ui ( unsigned  x );
00053  long     gan_sqr_l  ( long      x );
00054  float    gan_sqr_f  ( float     x );
00055  double   gan_sqr_d  ( double    x );
00056  double gan_cbrt ( double x );
00057  double gan_normal_sample ( double mu, double sigma );
00058  int gan_solve_quadratic ( double a, double b, double c,
00059                           Gan_Complex x[2] );
00060  int gan_solve_cubic ( double a, double b, double c, double d,
00061                       Gan_Complex x[3] );
00062 
00066  double gan_sqr ( double x );
00067 
00071  long gan_random(void);
00072 
00076  void gan_random_set_seed ( unsigned seed );
00077 
00081  double gan_random_01(void);
00082 
00086  double gan_random_m11(void);
00087 
00088 void *gan_kth_highest ( void *base, size_t nmemb, size_t size,
00089                         unsigned int k,
00090                         int (*compar)(const void *, const void *) );
00091 
00100 #ifdef __cplusplus
00101 }
00102 #endif
00103 
00104 #endif /* #ifndef _GAN_NUMERICS_H */

Generated on Fri Mar 17 12:44:48 2006 by  doxygen 1.3.9.1