diff options
author | jofret | 2008-05-30 12:49:45 +0000 |
---|---|---|
committer | jofret | 2008-05-30 12:49:45 +0000 |
commit | 0cdd7509898f4425ba5fcda58a21a636fd3eff9c (patch) | |
tree | 37df751a69f56499fb795d6d539be7aeda878c02 /src | |
parent | 5f6b94a4dbd7e1fd6af5a3b18477827175bd73ea (diff) | |
download | scilab2c-0cdd7509898f4425ba5fcda58a21a636fd3eff9c.tar.gz scilab2c-0cdd7509898f4425ba5fcda58a21a636fd3eff9c.tar.bz2 scilab2c-0cdd7509898f4425ba5fcda58a21a636fd3eff9c.zip |
* Adding s-d-c-z array mean function.
Diffstat (limited to 'src')
-rw-r--r-- | src/statisticsFunctions/includes/mean.h | 68 |
1 files changed, 52 insertions, 16 deletions
diff --git a/src/statisticsFunctions/includes/mean.h b/src/statisticsFunctions/includes/mean.h index f2d46c08..07269e5a 100644 --- a/src/statisticsFunctions/includes/mean.h +++ b/src/statisticsFunctions/includes/mean.h @@ -12,36 +12,72 @@ #ifndef __MEAN_H__ #define __MEAN_H__ + +#include "floatComplex.h" +#include "doubleComplex.h" + /* ** \brief Mean of a scalar element, just returns it */ -#define smeans(in) in -#define srowmeans(in) in -#define scolumnsmeans(in) in -#define smatlabmeans(in) in +#define smeans(in) in +#define srowmeans(in) in +#define scolumnsmeans(in) in +#define smatlabmeans(in) in /* ** \brief Mean of a scalar element, just returns it */ -#define dmeans(in) in -#define drowmeans(in) in -#define dcolumnsmeans(in) in -#define dmatlabmeans(in) in +#define dmeans(in) in +#define drowmeans(in) in +#define dcolumnsmeans(in) in +#define dmatlabmeans(in) in /* ** \brief Mean of a scalar element, just returns it */ -#define cmeans(in) in -#define crowmeans(in) in -#define ccolumnsmeans(in) in -#define cmatlabmeans(in) in +#define cmeans(in) in +#define crowmeans(in) in +#define ccolumnsmeans(in) in +#define cmatlabmeans(in) in /* ** \brief Mean of a scalar element, just returns it */ -#define zmeans(in) in -#define zrowmeans(in) in -#define zcolumnsmeans(in) in -#define zmatlabmeans(in) in +#define zmeans(in) in +#define zrowmeans(in) in +#define zcolumnsmeans(in) in +#define zmatlabmeans(in) in + +/* +** \brief Mean of a float array +** \param in the float array to process +** \param size, the size of the array +** \returns the mean. +*/ +float smeana(float *in, int size); + +/* +** \brief Mean of a float array +** \param in the double array to process +** \param size, the size of the array +** \returns the mean. +*/ +double dmeana(double *in, int size); + +/* +** \brief Mean of a float complex array +** \param in the float array to process +** \param size, the size of the array +** \returns the mean. +*/ +floatComplex cmeana(floatComplex *in, int size); + +/* +** \brief Mean of a double complex array +** \param in the double array to process +** \param size, the size of the array +** \returns the mean. +*/ +doubleComplex zmeana(doubleComplex *in, int size); #endif /* !__MEAN_H__ */ |