Code beautification with uncrustify
[alexxy/gromacs.git] / src / gromacs / legacyheaders / gmx_random.h
index 752ae09ef1f33b4ecc1947bc17428d8bf7b1a11e..967f89c1e943446d28fc0a9bb17b2ba7c637e79d 100644 (file)
@@ -1,33 +1,33 @@
 /*
- * 
+ *
  *                This source code is part of
- * 
+ *
  *                 G   R   O   M   A   C   S
- * 
+ *
  *          GROningen MAchine for Chemical Simulations
- * 
+ *
  * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2008, The GROMACS development team,
  * check out http://www.gromacs.org for more information.
+
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
  * as published by the Free Software Foundation; either version 2
  * of the License, or (at your option) any later version.
- * 
+ *
  * If you want to redistribute modifications, please consider that
  * scientific software is very special. Version control is crucial -
  * bugs must be traceable. We will be happy to consider code for
  * inclusion in the official distribution, but derived work must not
  * be called official GROMACS. Details are found in the README & COPYING
  * files - if they are missing, get the official version at www.gromacs.org.
- * 
+ *
  * To help us fund GROMACS development, we humbly ask that you cite
  * the papers on the package - you can find them in the top README file.
- * 
+ *
  * For more info, check our website at http://www.gromacs.org
- * 
+ *
  * And Hey:
  * Gallium Rubidium Oxygen Manganese Argon Carbon Silicon
  */
@@ -44,12 +44,12 @@ extern "C" {
 
 /*! \brief Abstract datatype for a random number generator
  *
- * This is a handle to the full state of a random number generator. 
+ * This is a handle to the full state of a random number generator.
  * You can not access anything inside the gmx_rng structure outside this
  * file.
  */
 typedef struct gmx_rng *
-gmx_rng_t;
+    gmx_rng_t;
 
 
 /*! \brief Returns the size of the RNG integer data structure
@@ -69,12 +69,12 @@ gmx_rng_n(void);
  *
  * \param seed Random seed, unsigned 32-bit integer.
  *
- * \return Reference to a random number generator, or NULL if there was an 
+ * \return Reference to a random number generator, or NULL if there was an
  *         error.
  *
  * \threadsafe Yes.
  */
-gmx_rng_t 
+gmx_rng_t
 gmx_rng_init(unsigned int seed);
 
 
@@ -83,7 +83,7 @@ gmx_rng_init(unsigned int seed);
  * This routine tries to get a seed from /dev/random if present,
  * and if not it uses time-of-day and process id to generate one.
  *
- * \return 32-bit unsigned integer random seed. 
+ * \return 32-bit unsigned integer random seed.
  *
  * Tip: If you use this in your code, it is a good idea to write the
  * returned random seed to a logfile, so you can recreate the exact sequence
@@ -104,20 +104,20 @@ gmx_rng_make_seed(void);
  *  is capable of.
  *
  *  If you really need the full entropy, this routine makes it possible to
- *  initialize the RNG with up to 624 32-bit integers, which will give you 
+ *  initialize the RNG with up to 624 32-bit integers, which will give you
  *  up to 2^19968 bits of entropy.
  *
  *  \param seed Array of unsigned integers to form a seed
  *  \param seed_length Number of integers in the array, up to 624 are used.
  *
- * \return Reference to a random number generator, or NULL if there was an 
+ * \return Reference to a random number generator, or NULL if there was an
  *         error.
  *
  * \threadsafe Yes.
  */
-gmx_rng_t 
-gmx_rng_init_array(unsigned int    seed[], 
-                  int             seed_length);
+gmx_rng_t
+gmx_rng_init_array(unsigned int    seed[],
+                   int             seed_length);
 
 
 /*! \brief Release resources of a RNG
@@ -128,7 +128,7 @@ gmx_rng_init_array(unsigned int    seed[],
  *  \param rng Handle to random number generator previously returned by
  *                    gmx_rng_init() or gmx_rng_init_array().
  *
- * \threadsafe Function itself is threadsafe, but you should only destroy a 
+ * \threadsafe Function itself is threadsafe, but you should only destroy a
  *             certain RNG once (i.e. from one thread).
  */
 void
@@ -144,7 +144,7 @@ gmx_rng_destroy(gmx_rng_t rng);
  *                    gmx_rng_init() or gmx_rng_init_array().
  */
 void
-gmx_rng_get_state(gmx_rng_t rng, unsigned int *mt,int *mti);
+gmx_rng_get_state(gmx_rng_t rng, unsigned int *mt, int *mti);
 
 
 /*! \brief Set the state of a RNG
@@ -156,7 +156,7 @@ gmx_rng_get_state(gmx_rng_t rng, unsigned int *mt,int *mti);
  *                    gmx_rng_init() or gmx_rng_init_array().
  */
 void
-gmx_rng_set_state(gmx_rng_t rng, unsigned int *mt,int mti);
+gmx_rng_set_state(gmx_rng_t rng, unsigned int *mt, int mti);
 
 
 /*! \brief Random 32-bit integer from a uniform distribution
@@ -169,21 +169,21 @@ gmx_rng_set_state(gmx_rng_t rng, unsigned int *mt,int mti);
  *
  *  \return 32-bit unsigned integer from a uniform distribution.
  *
- *  \threadsafe Function yes, input data no. You should not call this function 
+ *  \threadsafe Function yes, input data no. You should not call this function
  *             from two different threads using the same RNG handle at the
- *              same time. For performance reasons we cannot lock the handle 
- *              with a mutex every time we need a random number - that would 
- *              slow the routine down a factor 2-5. There are two simple 
+ *              same time. For performance reasons we cannot lock the handle
+ *              with a mutex every time we need a random number - that would
+ *              slow the routine down a factor 2-5. There are two simple
  *             solutions: either use a mutex and lock it before calling
  *              the function, or use a separate RNG handle for each thread.
  */
-unsigned int 
+unsigned int
 gmx_rng_uniform_uint32(gmx_rng_t rng);
 
 
 /*! \brief Random gmx_real_t 0<=x<1 from a uniform distribution
  *
- *  This routine returns a random floating-point number from the 
+ *  This routine returns a random floating-point number from the
  *  random number generator provided, and updates the state of that RNG.
  *
  *  \param rng Handle to random number generator previously returned by
@@ -191,11 +191,11 @@ gmx_rng_uniform_uint32(gmx_rng_t rng);
  *
  *  \return floating-point number 0<=x<1 from a uniform distribution.
  *
- *  \threadsafe Function yes, input data no. You should not call this function 
+ *  \threadsafe Function yes, input data no. You should not call this function
  *             from two different threads using the same RNG handle at the
- *              same time. For performance reasons we cannot lock the handle 
- *              with a mutex every time we need a random number - that would 
- *              slow the routine down a factor 2-5. There are two simple 
+ *              same time. For performance reasons we cannot lock the handle
+ *              with a mutex every time we need a random number - that would
+ *              slow the routine down a factor 2-5. There are two simple
  *             solutions: either use a mutex and lock it before calling
  *              the function, or use a separate RNG handle for each thread.
  */
@@ -205,9 +205,9 @@ gmx_rng_uniform_real(gmx_rng_t rng);
 
 /*! \brief Random gmx_real_t from a gaussian distribution
  *
- *  This routine returns a random floating-point number from the 
+ *  This routine returns a random floating-point number from the
  *  random number generator provided, and updates the state of that RNG.
- *  
+ *
  *  The Box-Muller algorithm is used to provide gaussian random numbers. This
  *  is not the fastest known algorithm for gaussian numbers, but in contrast
  *  to the alternatives it is very well studied and you can trust the returned
@@ -216,16 +216,16 @@ gmx_rng_uniform_real(gmx_rng_t rng);
  *  \param rng Handle to random number generator previously returned by
  *                       gmx_rng_init() or gmx_rng_init_array().
  *
- *  \return Gaussian random floating-point number with average 0.0 and 
+ *  \return Gaussian random floating-point number with average 0.0 and
  *         standard deviation 1.0. You can get any average/mean you want
  *          by first multiplying with the desired average and then adding
  *          the average you want.
  *
- *  \threadsafe Function yes, input data no. You should not call this function 
+ *  \threadsafe Function yes, input data no. You should not call this function
  *             from two different threads using the same RNG handle at the
- *              same time. For performance reasons we cannot lock the handle 
- *              with a mutex every time we need a random number - that would 
- *              slow the routine down a factor 2-5. There are two simple 
+ *              same time. For performance reasons we cannot lock the handle
+ *              with a mutex every time we need a random number - that would
+ *              slow the routine down a factor 2-5. There are two simple
  *             solutions: either use a mutex and lock it before calling
  *              the function, or use a separate RNG handle for each thread.
  *
@@ -248,7 +248,7 @@ gmx_rng_gaussian_real(gmx_rng_t rng);
  *         than what you get from gmx_rng_gauss_real().
  *          In most cases this is no problem whatsoever,
  *          and it is particularly true for BD/SD integration.
- *         Note that you will NEVER get any really extreme 
+ *         Note that you will NEVER get any really extreme
  *          numbers: the maximum absolute value returned is
  *          4.0255485.
  *
@@ -262,4 +262,3 @@ gmx_rng_gaussian_table(gmx_rng_t rng);
 #endif
 
 #endif /* _GMX_RANDOM_H_ */
-