summaryrefslogtreecommitdiff
path: root/src/c/statisticsFunctions/includes
diff options
context:
space:
mode:
authorsimon2009-07-30 08:36:46 +0000
committersimon2009-07-30 08:36:46 +0000
commitc740030d9faa5fd160f1bb1b311c5efd6d0d532c (patch)
treefbc7b6cbad731cb4839dbb0d35040fa061e29830 /src/c/statisticsFunctions/includes
parente32e264022ce45e272612623c17a649823859130 (diff)
downloadscilab2c-c740030d9faa5fd160f1bb1b311c5efd6d0d532c.tar.gz
scilab2c-c740030d9faa5fd160f1bb1b311c5efd6d0d532c.tar.bz2
scilab2c-c740030d9faa5fd160f1bb1b311c5efd6d0d532c.zip
added all stdevf-related files (except interfaces)
updated the Makefile.am remove remaing printf from scolumnvariancefa
Diffstat (limited to 'src/c/statisticsFunctions/includes')
-rw-r--r--src/c/statisticsFunctions/includes/stdevf.h119
-rw-r--r--src/c/statisticsFunctions/includes/variancef.h6
2 files changed, 122 insertions, 3 deletions
diff --git a/src/c/statisticsFunctions/includes/stdevf.h b/src/c/statisticsFunctions/includes/stdevf.h
new file mode 100644
index 00000000..5ccec182
--- /dev/null
+++ b/src/c/statisticsFunctions/includes/stdevf.h
@@ -0,0 +1,119 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008-2008 - INRIA - Allan SIMON
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ */
+
+#ifndef __STDEVF_H__
+#define __STDEVF_H__
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <math.h>
+
+
+#include "dynlib_statisticsfunctions.h"
+#include "subtraction.h"
+#include "division.h"
+
+
+#include "pow.h"
+#include "sum.h"
+#include "size.h"
+#include "sqrt.h"
+#include "meanf.h"
+
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+
+
+
+/*
+** \brief Standard deviation of a scalar element, just returns it
+*/
+#define sstdevfs(in1,in2) 0.0f
+#define srowstdevfs(in1,in2) 0.0f
+#define scolumnstdevfs(in1,in2) 0.0f
+
+
+/*
+** \brief Standard deviation of a scalar element, just returns it
+*/
+#define dstdevfs(in1,in2) 0.0
+#define drowstdevfs(in1,in2) 0.0
+#define dcolumnstdevfs(in1,in2) 0.0
+
+
+/*
+** \brief Standard deviation of a scalar element, just returns it
+*/
+#define cstdevfs(in1,in2) FloatComplex(0.0f , 0.0f)
+#define crowstdevfs(in1,in2) FloatComplex(0.0f , 0.0f)
+#define ccolumnstdevfs(in1,in2) FloatComplex(0.0f , 0.0f)
+
+
+/*
+** \brief Standard deviation of a scalar element, just returns it
+*/
+#define zstdevfs(in1,in2) DoubleComplex(0.0 , 0.0)
+#define zrowstdevfs(in1,in2) DoubleComplex(0.0 , 0.0)
+#define zcolumnstdevfs(in1,in2) DoubleComplex(0.0 , 0.0)
+
+
+/*
+** \brief Standard deviation of a float array
+** \param in the float array to process
+** \param size, the size of the array
+** \returns the stdevf.
+*/
+EXTERN_STATFUNC float sstdevfa(float *in1, int lines, int columns, float *in2);
+EXTERN_STATFUNC void srowstdevfa(float *in1, int lines, int columns, float *in2, float* out);
+EXTERN_STATFUNC void scolumnstdevfa(float *in1, int lines, int columns, float *in2, float* out);
+
+/*
+** \brief Standard deviation of a double array
+** \param in the double array to process
+** \param size, the size of the array
+** \returns the stdevf.
+*/
+EXTERN_STATFUNC double dstdevfa(double *in1, int lines, int columns, double *in2);
+EXTERN_STATFUNC void drowstdevfa(double *in1, int lines, int columns, double *in2, double* out);
+EXTERN_STATFUNC void dcolumnstdevfa(double *in1, int lines, int columns, double *in2, double* out);
+
+/*
+** \brief Standard deviation of a float complex array
+** \param in the float array to process
+** \param size, the size of the array
+** \returns the stdevf.
+*/
+EXTERN_STATFUNC floatComplex cstdevfa(floatComplex *in1, int lines, int columns, floatComplex *in2);
+EXTERN_STATFUNC void crowstdevfa(floatComplex *in1, int lines, int columns, floatComplex *in2, floatComplex* out);
+EXTERN_STATFUNC void ccolumnstdevfa(floatComplex *in1, int lines, int columns, floatComplex *in2, floatComplex* out);
+
+/*
+** \brief Standard deviation of a double complex array
+** \param in the double array to process
+** \param size, the size of the array
+** \returns the stdevf.
+*/
+EXTERN_STATFUNC doubleComplex zstdevfa(doubleComplex *in1, int lines, int columns, doubleComplex *in2);
+EXTERN_STATFUNC void zrowstdevfa(doubleComplex *in1, int lines, int columns, doubleComplex *in2, doubleComplex* out);
+EXTERN_STATFUNC void zcolumnstdevfa(doubleComplex *in1, int lines, int columns, doubleComplex *in2, doubleComplex* out);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+
+#endif /* !__STDEVF_H__ */
diff --git a/src/c/statisticsFunctions/includes/variancef.h b/src/c/statisticsFunctions/includes/variancef.h
index e86a65eb..e682a187 100644
--- a/src/c/statisticsFunctions/includes/variancef.h
+++ b/src/c/statisticsFunctions/includes/variancef.h
@@ -10,8 +10,8 @@
*
*/
-#ifndef __VARIANCE_H__
-#define __VARIANCE_H__
+#ifndef __VARIANCEF_H__
+#define __VARIANCEF_H__
#include <stdio.h>
#include <stdlib.h>
@@ -114,4 +114,4 @@ EXTERN_STATFUNC void zcolumnvariancefa(doubleComplex *in1, int lines, int colum
#endif
-#endif /* !__VARIANCE_H__ */
+#endif /* !__VARIANCEF_H__ */