summaryrefslogtreecommitdiff
path: root/src/c/linearAlgebra/includes/spec.h
diff options
context:
space:
mode:
authorsiddhu89902017-06-21 15:51:35 +0530
committersiddhu89902017-06-21 15:51:35 +0530
commit2c3b9e1055c8c9dfe874df3b7743c4a765042316 (patch)
treeb3df485fe31ad42fde9bb20d553c162c94f27b08 /src/c/linearAlgebra/includes/spec.h
parent7dd99346700740df9480b1f47221e24afc32371d (diff)
parentd8c9e974d3ce553198b487dadc51c7612e92de85 (diff)
downloadScilab2C_fossee_old-2c3b9e1055c8c9dfe874df3b7743c4a765042316.tar.gz
Scilab2C_fossee_old-2c3b9e1055c8c9dfe874df3b7743c4a765042316.tar.bz2
Scilab2C_fossee_old-2c3b9e1055c8c9dfe874df3b7743c4a765042316.zip
Merged new linear algebra functions
Diffstat (limited to 'src/c/linearAlgebra/includes/spec.h')
-rw-r--r--src/c/linearAlgebra/includes/spec.h59
1 files changed, 59 insertions, 0 deletions
diff --git a/src/c/linearAlgebra/includes/spec.h b/src/c/linearAlgebra/includes/spec.h
new file mode 100644
index 0000000..3cd0b18
--- /dev/null
+++ b/src/c/linearAlgebra/includes/spec.h
@@ -0,0 +1,59 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008 - INRIA - Arnaud TORSET
+ *
+ * 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 __SPEC_H__
+#define __SPEC_H__
+
+#include "dynlib_matrixoperations.h"
+#include "doubleComplex.h"
+#include "floatComplex.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* spec gives only the eigenvalues
+ If you want the eigenvalues and the eigenvectors, use spec2 */
+
+/* spec */
+#define sspecs(in) in
+#define dspecs(in) in
+#define cspecs(in) in
+#define zspecs(in) in
+
+EXTERN_MATOPS void sspeca(float* in, int rows, float* out);
+EXTERN_MATOPS void dspeca(double* in, int rows, double* out);
+EXTERN_MATOPS void cspeca(floatComplex* in, int rows, floatComplex* out);
+EXTERN_MATOPS void zspeca(doubleComplex* in, int rows,doubleComplex* out);
+
+
+
+/* spec2 */
+#define sspec2s(in,out) sspecs(1);*out=in;
+#define dspec2s(in,out) dspecs(1);*out=in;
+#define cspec2s(in,out) cspecs(FloatComplex(1,0));*out=FloatComplex(creals(in),cimags(in));
+#define zspec2s(in,out) zspecs(DoubleComplex(1,0));*out=DoubleComplex(zreals(in),zimags(in));
+
+EXTERN_MATOPS void sspec2a(float* in, int rows, float* eigenvalues,float* eigenvectors);
+EXTERN_MATOPS void dspec2a(double* in, int rows, double* eigenvalues,double* eigenvectors);
+EXTERN_MATOPS void cspec2a(floatComplex* in, int rows, floatComplex* eigenvalues,floatComplex* eigenvectors);
+EXTERN_MATOPS void zspec2a(doubleComplex* in, int rows,doubleComplex* eigenvalues,doubleComplex* eigenvectors);
+
+/*Edited by - Sandeep Gupta, IITB FOSSEE*/
+void dspec1a(double *in1,double *in2,int size,int nout,doubleComplex *out1,double *out2,doubleComplex *out3,doubleComplex *out4);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* __SPEC_H__ */