From db464f35f5a10b58d9ed1085e0b462689adee583 Mon Sep 17 00:00:00 2001 From: Siddhesh Wani Date: Mon, 25 May 2015 14:46:31 +0530 Subject: Original Version --- src/c/matrixOperations/includes/cat.h | 105 +++++++++++++++++++++ src/c/matrixOperations/includes/chol.h | 43 +++++++++ src/c/matrixOperations/includes/determ.h | 39 ++++++++ src/c/matrixOperations/includes/dist.h | 48 ++++++++++ .../includes/dynlib_matrixoperations.h | 26 +++++ src/c/matrixOperations/includes/eye.h | 69 ++++++++++++++ src/c/matrixOperations/includes/fill.h | 40 ++++++++ src/c/matrixOperations/includes/hilb.h | 46 +++++++++ src/c/matrixOperations/includes/infiniteNorm.h | 67 +++++++++++++ src/c/matrixOperations/includes/jmat.h | 29 ++++++ src/c/matrixOperations/includes/logm.h | 37 ++++++++ src/c/matrixOperations/includes/matrixDivision.h | 102 ++++++++++++++++++++ .../matrixOperations/includes/matrixExponential.h | 51 ++++++++++ src/c/matrixOperations/includes/matrixInversion.h | 66 +++++++++++++ src/c/matrixOperations/includes/matrixMagnitude.h | 41 ++++++++ .../includes/matrixMultiplication.h | 91 ++++++++++++++++++ src/c/matrixOperations/includes/matrixPow.h | 43 +++++++++ .../includes/matrixSquaredMagnitude.h | 41 ++++++++ src/c/matrixOperations/includes/matrixTrace.h | 70 ++++++++++++++ src/c/matrixOperations/includes/matrixTranspose.h | 61 ++++++++++++ src/c/matrixOperations/includes/ones.h | 69 ++++++++++++++ src/c/matrixOperations/includes/spec.h | 56 +++++++++++ src/c/matrixOperations/includes/zeros.h | 74 +++++++++++++++ 23 files changed, 1314 insertions(+) create mode 100644 src/c/matrixOperations/includes/cat.h create mode 100644 src/c/matrixOperations/includes/chol.h create mode 100644 src/c/matrixOperations/includes/determ.h create mode 100644 src/c/matrixOperations/includes/dist.h create mode 100644 src/c/matrixOperations/includes/dynlib_matrixoperations.h create mode 100644 src/c/matrixOperations/includes/eye.h create mode 100644 src/c/matrixOperations/includes/fill.h create mode 100644 src/c/matrixOperations/includes/hilb.h create mode 100644 src/c/matrixOperations/includes/infiniteNorm.h create mode 100644 src/c/matrixOperations/includes/jmat.h create mode 100644 src/c/matrixOperations/includes/logm.h create mode 100644 src/c/matrixOperations/includes/matrixDivision.h create mode 100644 src/c/matrixOperations/includes/matrixExponential.h create mode 100644 src/c/matrixOperations/includes/matrixInversion.h create mode 100644 src/c/matrixOperations/includes/matrixMagnitude.h create mode 100644 src/c/matrixOperations/includes/matrixMultiplication.h create mode 100644 src/c/matrixOperations/includes/matrixPow.h create mode 100644 src/c/matrixOperations/includes/matrixSquaredMagnitude.h create mode 100644 src/c/matrixOperations/includes/matrixTrace.h create mode 100644 src/c/matrixOperations/includes/matrixTranspose.h create mode 100644 src/c/matrixOperations/includes/ones.h create mode 100644 src/c/matrixOperations/includes/spec.h create mode 100644 src/c/matrixOperations/includes/zeros.h (limited to 'src/c/matrixOperations/includes') diff --git a/src/c/matrixOperations/includes/cat.h b/src/c/matrixOperations/includes/cat.h new file mode 100644 index 0000000..9f64a15 --- /dev/null +++ b/src/c/matrixOperations/includes/cat.h @@ -0,0 +1,105 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * 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 __CAT_H__ +#define __CAT_H__ + +#include "dynlib_matrixoperations.h" +#include "floatComplex.h" +#include "doubleComplex.h" + + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** \brief concat 2 floats scalars +*/ +EXTERN_MATOPS void srowcats(float in1, float in2, float *out); +EXTERN_MATOPS void scolumncats(float in1, float in2, float *out); + +/* +** \brief concat 2 double scalars +*/ +EXTERN_MATOPS void drowcats(double in1, double in2, double *out); +EXTERN_MATOPS void dcolumncats(double in1, double in2, double *out); + +/* +** \brief concat 2 floats complex scalars +*/ +EXTERN_MATOPS void crowcats(floatComplex in1, floatComplex in2, floatComplex *out); +EXTERN_MATOPS void ccolumncats(floatComplex in1, floatComplex in2, floatComplex *out); + +/* +** \brief concat 2 double complex scalars +*/ +EXTERN_MATOPS void zrowcats(doubleComplex in1, doubleComplex in2, doubleComplex *out); +EXTERN_MATOPS void zcolumncats(doubleComplex in1, doubleComplex in2, doubleComplex *out); + +/* +** \brief Concat float arrays +** \param in1 the float array to process +** \param lines1 +** \param columns1 +** \param in2 the float array to process to concat +** \param lines2 +** \param columns2 +** \param out the concatenation +*/ +EXTERN_MATOPS void srowcata(float *in1, int lines1, int columns1, float *in2, int lines2, int columns2, float* out); +EXTERN_MATOPS void scolumncata(float *in1, int lines1, int columns1, float *in2, int lines2, int columns2, float* out); + +/* +** \brief Concat double arrays +** \param in1 the double array to process +** \param lines1 +** \param columns1 +** \param in2 the double array to process to concat +** \param lines2 +** \param columns2 +** \param out the concatenation +*/ +EXTERN_MATOPS void drowcata(double *in1, int lines1, int columns1, double *in2, int lines2, int columns2, double* out); +EXTERN_MATOPS void dcolumncata(double *in1, int lines1, int columns1, double *in2, int lines2, int columns2, double* out); + +/* +** \brief Concat Complex float arrays +** \param in1 the Complex float array to process +** \param lines1 +** \param columns1 +** \param in2 the Complex float array to process to concat +** \param lines2 +** \param columns2 +** \param out the concatenation +*/ +EXTERN_MATOPS void crowcata(floatComplex *in1, int lines1, int columns1, floatComplex *in2, int lines2, int columns2, floatComplex* out); +EXTERN_MATOPS void ccolumncata(floatComplex *in1, int lines1, int columns1, floatComplex *in2, int lines2, int columns2, floatComplex* out); + +/* +** \brief Concat Complex double arrays +** \param in1 the Complex double array to process +** \param lines1 +** \param columns1 +** \param in2 the Complex double array to process to concat +** \param lines2 +** \param columns2 +** \param out the concatenation +*/ +EXTERN_MATOPS void zrowcata(doubleComplex *in1, int lines1, int columns1, doubleComplex *in2, int lines2, int columns2, doubleComplex* out); +EXTERN_MATOPS void zcolumncata(doubleComplex *in1, int lines1, int columns1, doubleComplex *in2, int lines2, int columns2, doubleComplex* out); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* !__CAT_H__ */ diff --git a/src/c/matrixOperations/includes/chol.h b/src/c/matrixOperations/includes/chol.h new file mode 100644 index 0000000..0a17406 --- /dev/null +++ b/src/c/matrixOperations/includes/chol.h @@ -0,0 +1,43 @@ +/* + * 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 __CHOL_H__ +#define __CHOL_H__ + +#include "dynlib_matrixoperations.h" +#include "doubleComplex.h" +#include "floatComplex.h" + +#ifdef __cplusplus +extern "C" { +#endif + +EXTERN_MATOPS double dchols(double in); +EXTERN_MATOPS void dchola(double *in, int size, double *out); + +EXTERN_MATOPS float schols(float in); +EXTERN_MATOPS void schola(float *in, int size, float *out); + +#define zchols(in) DoubleComplex(dchols(zreals(in)),0) + +EXTERN_MATOPS void zchola (doubleComplex *in, int size, doubleComplex *out); + +#define cchols(in) FloatComplex(schols(creals(in)),0) +EXTERN_MATOPS void cchola(floatComplex *in, int size, floatComplex *out); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* __CHOL_H__ */ + diff --git a/src/c/matrixOperations/includes/determ.h b/src/c/matrixOperations/includes/determ.h new file mode 100644 index 0000000..d915c31 --- /dev/null +++ b/src/c/matrixOperations/includes/determ.h @@ -0,0 +1,39 @@ +/* + * 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 __DETERM_H__ +#define __DETERM_H__ + +#include "dynlib_matrixoperations.h" +#include "doubleComplex.h" +#include "floatComplex.h" + + +#ifdef __cplusplus +extern "C" { +#endif + +EXTERN_MATOPS double ddeterma (double *in, int rows); + +EXTERN_MATOPS float sdeterma (float *in, int rows); + +EXTERN_MATOPS doubleComplex zdeterma (doubleComplex *in, int rows); + +EXTERN_MATOPS floatComplex cdeterma (floatComplex *in, int rows); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* __DETERM_H__ */ + diff --git a/src/c/matrixOperations/includes/dist.h b/src/c/matrixOperations/includes/dist.h new file mode 100644 index 0000000..bf45a8d --- /dev/null +++ b/src/c/matrixOperations/includes/dist.h @@ -0,0 +1,48 @@ +/* + * 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 __DIST_H__ +#define __DIST_H__ + +#include "dynlib_matrixoperations.h" +#include "floatComplex.h" +#include "doubleComplex.h" + +#ifdef __cplusplus +extern "C" { +#endif + /* Computes the euclidian distance + between 2 scalars/arrays. + We assume both arrays have the same + numbers of lines and columns.*/ + +EXTERN_MATOPS float sdists( float in1, float in2); +EXTERN_MATOPS float sdista( float* in1, float* in2, int lines, int columns); + +EXTERN_MATOPS double ddists( double in1, double in2); +EXTERN_MATOPS double ddista( double* in1, double* in2, int lines, int columns); + +EXTERN_MATOPS float cdists( floatComplex in1, floatComplex in2); +EXTERN_MATOPS float cdista( floatComplex* in1, floatComplex* in2, int lines, int columns); + +EXTERN_MATOPS double zdists( doubleComplex in1, doubleComplex in2); +EXTERN_MATOPS double zdista( doubleComplex* in1, doubleComplex* in2, int lines, int columns); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /*__DIST_H__*/ + diff --git a/src/c/matrixOperations/includes/dynlib_matrixoperations.h b/src/c/matrixOperations/includes/dynlib_matrixoperations.h new file mode 100644 index 0000000..a0597a5 --- /dev/null +++ b/src/c/matrixOperations/includes/dynlib_matrixoperations.h @@ -0,0 +1,26 @@ +/* +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2009 - DIGITEO - Allan CORNET +* +* 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 __DYNLIB_MATRIXOPERATIONS_H__ +#define __DYNLIB_MATRIXOPERATIONS_H__ + +#if defined(_MSC_VER) && defined(_USRDLL) + #if MATRIXOPERATIONS_EXPORTS + #define EXTERN_MATOPS __declspec (dllexport) + #else + #define EXTERN_MATOPS __declspec (dllimport) + #endif +#else + #define EXTERN_MATOPS +#endif + +#endif /* __DYNLIB_MATRIXOPERATIONS_H__ */ diff --git a/src/c/matrixOperations/includes/eye.h b/src/c/matrixOperations/includes/eye.h new file mode 100644 index 0000000..f7f2ef2 --- /dev/null +++ b/src/c/matrixOperations/includes/eye.h @@ -0,0 +1,69 @@ +/* + * 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 __EYE_H__ +#define __EYE_H__ + +#include "dynlib_matrixoperations.h" +#include "floatComplex.h" +#include "doubleComplex.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** \brief create a float Eye value +*/ +#define seyes(in) 1.0f + +/* +** \brief create a Double Eye value +*/ +#define deyes(in) 1.0 + +/* +** \brief create a float complex Eye value +*/ +#define ceyes(in) FloatComplex(1.0f, 0) + +/* +** \brief create a Double complex Eye value +*/ +#define zeyes(in) DoubleComplex(1, 0) + +/* +** \brief create a float Eye matrix +*/ +EXTERN_MATOPS void seyea(float* in, int _iRows, int _iCols); + +/* +** \brief create a Double Eye matrix +*/ +EXTERN_MATOPS void deyea(double* in, int _iRows, int _iCols); + +/* +** \brief create a float complex Eye matrix +*/ +EXTERN_MATOPS void ceyea(floatComplex* in, int _iRows, int _iCols); + +/* +** \brief create a Double complex Eye matrix +*/ +EXTERN_MATOPS void zeyea(doubleComplex* in, int _iRows, int _iCols); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* !__EYE_H__ */ + diff --git a/src/c/matrixOperations/includes/fill.h b/src/c/matrixOperations/includes/fill.h new file mode 100644 index 0000000..09b8d81 --- /dev/null +++ b/src/c/matrixOperations/includes/fill.h @@ -0,0 +1,40 @@ +/* + * 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 __FILL_H__ +#define __FILL_H__ + +#include "dynlib_matrixoperations.h" +#include "floatComplex.h" +#include "doubleComplex.h" + +#ifdef __cplusplus +extern "C" { +#endif +/*filling of a array with constant*/ + +EXTERN_MATOPS void dfilla (double* in, int rows, int cols, double constant); + +EXTERN_MATOPS void sfilla (float* in, int rows, int cols, float constant); + +EXTERN_MATOPS void cfilla (floatComplex* in, int rows, int cols, floatComplex constant); + +EXTERN_MATOPS void zfilla (doubleComplex* in, int rows, int cols, doubleComplex constant); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* __FILL_H__ */ + + diff --git a/src/c/matrixOperations/includes/hilb.h b/src/c/matrixOperations/includes/hilb.h new file mode 100644 index 0000000..65efd0e --- /dev/null +++ b/src/c/matrixOperations/includes/hilb.h @@ -0,0 +1,46 @@ +/* + * 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 __HILB_H__ +#define __HILB_H__ + +#include "dynlib_matrixoperations.h" +#include "floatComplex.h" +#include "doubleComplex.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif +/* +** generate an Hilbert's matrix +** param out : the hilbert's matrix in float precision +** param size: matrix's size +*/ + +EXTERN_MATOPS void shilba ( float* out, int size) ; + +/* +** generate an Hilbert's matrix +** param out : the hilbert's matrix in double precision +** param size: matrix's size +*/ + + +EXTERN_MATOPS void dhilba ( double* out, int size ) ; + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* !__HILB_H__ */ + diff --git a/src/c/matrixOperations/includes/infiniteNorm.h b/src/c/matrixOperations/includes/infiniteNorm.h new file mode 100644 index 0000000..130cfea --- /dev/null +++ b/src/c/matrixOperations/includes/infiniteNorm.h @@ -0,0 +1,67 @@ +/* + * 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 __INFINITENORM_H__ +#define __INFINITENORM_H__ + +#include "dynlib_matrixoperations.h" +#include "sign.h" +#include "pythag.h" +#include "floatComplex.h" +#include "doubleComplex.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** \brief Compute the infinite norm of a given floats matrix. +** \param in : input matrix. +** \param _iRows : number of rows of the matrix . +** \param _iCols : number of columns of the matrix . +*/ + +EXTERN_MATOPS float sinfnorma(float* in, int _iRows, int _iCols); + +/* +** \brief Compute the infinite norm of a given doubles matrix. +** \param in : input matrix. +** \param leadDimIn : the leading dimension of the matrix . +** \param out : the matrix inverse of the input . +*/ + +EXTERN_MATOPS double dinfnorma(double* in, int _iRows, int _iCols); + +/* +** \brief Compute the infinite norm of a given complex floats matrix. +** \param in : input matrix. +** \param _iRows : number of rows of the matrix . +** \param _iCols : number of columns of the matrix . +*/ + +EXTERN_MATOPS float cinfnorma(floatComplex* in, int _iRows, int _iCols); + +/* +** \brief Compute the infinite norm of a given complex doubles matrix. +** \param in : input matrix. +** \param _iRows : number of rows of the matrix . +** \param _iCols : number of columns of the matrix . +*/ + +EXTERN_MATOPS double zinfnorma(doubleComplex* in, int _iRows, int _iCols); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* !__INFINITENORM_H__ */ + diff --git a/src/c/matrixOperations/includes/jmat.h b/src/c/matrixOperations/includes/jmat.h new file mode 100644 index 0000000..38a8b1e --- /dev/null +++ b/src/c/matrixOperations/includes/jmat.h @@ -0,0 +1,29 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-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 __JMAT_H__ +#define __JMAT_H__ + +#include "dynlib_matrixoperations.h" + +#ifdef __cplusplus +extern "C" { +#endif + +EXTERN_MATOPS void sjmata(float in1, float in2, float* out); +EXTERN_MATOPS void djmata(double in1, double in2, double* out); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* !__JMAT_H__ */ diff --git a/src/c/matrixOperations/includes/logm.h b/src/c/matrixOperations/includes/logm.h new file mode 100644 index 0000000..7eec569 --- /dev/null +++ b/src/c/matrixOperations/includes/logm.h @@ -0,0 +1,37 @@ +/* + * 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 __LOGM_H__ +#define __LOGM_H__ + +#include "dynlib_matrixoperations.h" +#include "floatComplex.h" +#include "doubleComplex.h" + +#ifdef __cplusplus +extern "C" { +#endif + +EXTERN_MATOPS void slogma (float* in, int size, float* out); + +EXTERN_MATOPS void dlogma (double* in, int size, double* out); + +EXTERN_MATOPS void clogma (floatComplex* in, int size, floatComplex* out); + +EXTERN_MATOPS void zlogma (doubleComplex* in, int size, doubleComplex* out); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* __LOGM_H__ */ diff --git a/src/c/matrixOperations/includes/matrixDivision.h b/src/c/matrixOperations/includes/matrixDivision.h new file mode 100644 index 0000000..7702313 --- /dev/null +++ b/src/c/matrixOperations/includes/matrixDivision.h @@ -0,0 +1,102 @@ +/* + * 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 __MATRIXDIVISION_H__ +#define __MATRIXDIVISION_H__ + +#include "dynlib_matrixoperations.h" +#include "floatComplex.h" +#include "doubleComplex.h" +#include "lapack.h" +#include "cat.h" +#include "matrixTranspose.h" +#include "conj.h" +#include "min.h" +#include "max.h" + + +#ifdef __cplusplus +extern "C" { +#endif + +EXTERN_MATOPS void srdivma ( float* in1, int lines1, int columns1 , + float* in2, int lines2, int columns2 , + float* out ); + +EXTERN_MATOPS void sldivma ( float* in1, int lines1, int columns1 , + float* in2, int lines2, int columns2 , + float* out ); + + +EXTERN_MATOPS void drdivma ( double* in1, int lines1, int columns1 , + double* in2, int lines2, int columns2 , + double* out ); + + +EXTERN_MATOPS void dldivma ( double* in1, int lines1, int columns1 , + double* in2, int lines2, int columns2 , + double* out ); + +EXTERN_MATOPS void zrdivma( doubleComplex* in1, int lines1, int columns1 , + doubleComplex* in2, int lines2, int columns2 , + doubleComplex* out ); + +EXTERN_MATOPS void zldivma( doubleComplex* in1, int lines1, int columns1 , + doubleComplex* in2, int lines2, int columns2 , + doubleComplex* out ); + +EXTERN_MATOPS void crdivma( floatComplex* in1, int lines1, int columns1 , + floatComplex* in2, int lines2, int columns2 , + floatComplex* out ); + +EXTERN_MATOPS void cldivma( floatComplex* in1, int lines1, int columns1 , + floatComplex* in2, int lines2, int columns2 , + floatComplex* out ); + +/*special case row vector /row vector => scalar */ +/* +** \brief Compute a division for double. +** \param in1 : input array. +** \param in2 : input array. +** \param size : size of in2 array. +** \return : scalar that contains the right division of the two vectors = in1 .* in2. +*/ +EXTERN_MATOPS double drdivv(double *in1, double *in2, int size2); + +EXTERN_MATOPS doubleComplex zrdivv(doubleComplex *in1, doubleComplex *in2, int size2); + +EXTERN_MATOPS doubleComplex zrdivzdv(doubleComplex *in1, double *in2, int size2); + +EXTERN_MATOPS doubleComplex zrdivdzv(double *in1, doubleComplex *in2, int size2); + +/* +** \brief Compute a division for float. +** \param in1 : input array. +** \param in2 : input array. +** \param size : size of in2 array. +** \return : scalar that contains the division of the two vectors = in1 .* in2. +*/ +EXTERN_MATOPS float srdivv(float *in1, float *in2, int size2); + +EXTERN_MATOPS floatComplex crdivv(floatComplex *in1, floatComplex *in2, int size2); + +EXTERN_MATOPS floatComplex crdivcsv(floatComplex *in1, float *in2, int size2); + +EXTERN_MATOPS floatComplex crdivscv(float *in1, floatComplex *in2, int size2); + + + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* !__MATRIXDIVISION_H__ */ diff --git a/src/c/matrixOperations/includes/matrixExponential.h b/src/c/matrixOperations/includes/matrixExponential.h new file mode 100644 index 0000000..4b3cd8a --- /dev/null +++ b/src/c/matrixOperations/includes/matrixExponential.h @@ -0,0 +1,51 @@ +/* + * 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 __MATRIXEXPONENTIAL_H__ +#define __MATRIXEXPONENTIAL_H__ + +#include +#include +#include "dynlib_matrixoperations.h" +#include "lapack.h" +#include "blas.h" +#include "abs.h" +#include "exp.h" +#include "max.h" +#include "pow.h" +#include "matrixDivision.h" +#include "matrixMultiplication.h" +#include "addition.h" +#include "subtraction.h" +#include "eye.h" +#include "infiniteNorm.h" +#include "frexp.h" +#include "division.h" + +#ifdef __cplusplus +extern "C" { +#endif + +EXTERN_MATOPS void sexpma (float* in, float* out, int _iLeadDim); + +EXTERN_MATOPS void dexpma (double* in, double* out, int _iLeadDim); + +EXTERN_MATOPS void cexpma(floatComplex * in, floatComplex * out, int _iLeadDim); + +EXTERN_MATOPS void zexpma (doubleComplex * in, doubleComplex * out, int _iLeadDim); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* !__MATRIXEXPONENTIAL_H__ */ + diff --git a/src/c/matrixOperations/includes/matrixInversion.h b/src/c/matrixOperations/includes/matrixInversion.h new file mode 100644 index 0000000..9031245 --- /dev/null +++ b/src/c/matrixOperations/includes/matrixInversion.h @@ -0,0 +1,66 @@ +/* + * 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 __MATRIXINVERSION_H__ +#define __MATRIXINVERSION_H__ + +#include "abs.h" +#include "dynlib_matrixoperations.h" + +#ifdef __cplusplus +extern "C" { +#endif +/* +** \brief Compute the matrix inverse for floats. +** \param in : input matrix. +** \param leadDimIn : the leading dimension of the matrix . +** \param out : the matrix inverse of the input . +*/ + +EXTERN_MATOPS void sinverma ( float* in, float* out, int leadDimIn ); + +/* +** \brief Compute the matrix inverse for doubles. +** \param in : input matrix. +** \param leadDimIn : the leading dimension of the matrix . +** \param out : the matrix inverse of the input . +*/ + + +EXTERN_MATOPS void dinverma ( double* in, double* out, int leadDimIn ); + +/* +** \brief Compute the matrix inverse for complex floats . +** \param in : input matrix. +** \param leadDimIn : the leading dimension of the matrix . +** \param out : the matrix inverse of the input . +*/ + + +EXTERN_MATOPS void cinverma ( floatComplex* in, floatComplex* out, int leadDimIn ); + +/* +** \brief Compute the matrix inverse for complex doubles. +** \param in : input matrix. +** \param leadDimIn : the leading dimension of the matrix . +** \param out : the matrix inverse of the input . +*/ + + +EXTERN_MATOPS void zinverma ( doubleComplex* in, doubleComplex* out, int leadDimIn ); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* !__MATRIXINVERSION_H__ */ diff --git a/src/c/matrixOperations/includes/matrixMagnitude.h b/src/c/matrixOperations/includes/matrixMagnitude.h new file mode 100644 index 0000000..7b65c6d --- /dev/null +++ b/src/c/matrixOperations/includes/matrixMagnitude.h @@ -0,0 +1,41 @@ + +/* + * 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 __MAGNITUDE_H__ +#define __MAGNITUDE_H__ + +#include "dynlib_matrixoperations.h" +#include "floatComplex.h" +#include "doubleComplex.h" + +#ifdef __cplusplus +extern "C" { +#endif + +EXTERN_MATOPS float smagns(float in); +EXTERN_MATOPS float smagna(float* in, int rows, int cols); + +EXTERN_MATOPS double dmagns(double in); +EXTERN_MATOPS double dmagna(double* in, int rows, int cols); + +EXTERN_MATOPS float cmagns(floatComplex in); +EXTERN_MATOPS float cmagna(floatComplex* in, int rows, int cols); + +EXTERN_MATOPS double zmagns(doubleComplex in); +EXTERN_MATOPS double zmagna(doubleComplex* in, int rows, int cols); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* __MAGNITUDE_H__*/ diff --git a/src/c/matrixOperations/includes/matrixMultiplication.h b/src/c/matrixOperations/includes/matrixMultiplication.h new file mode 100644 index 0000000..228dd16 --- /dev/null +++ b/src/c/matrixOperations/includes/matrixMultiplication.h @@ -0,0 +1,91 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * 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 __MATRIXMULTIPLICATION_H__ +#define __MATRIXMULTIPLICATION_H__ + +#include "dynlib_matrixoperations.h" +#include "multiplication.h" +#include "addition.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** +** WARNING WE ASSUME MATRIXES TO BE CONSCISTENT +** columns1 = lines2; +** +*/ + +/* +** \brief Compute a multiplication for floats matrixes. +** \param in1 : input matrix. +** \param lines1 : lines of in1 matrix. +** \param columns1 : columns of in1 matrix. +** \param in2 : input arry. +** \param lines2 : lines of in2 matrix. +** \param columns2 : columns of in2 matrix. +** \param out : Matrix that contains the multiplication in1 * in2. +*/ +EXTERN_MATOPS void smulma(float *in1, int lines1, int columns1, + float *in2, int lines2, int columns2, + float *out); + +/* +** \brief Compute a multiplication for doubles matrixes. +** \param in1 : input matrix. +** \param lines1 : lines of in1 matrix. +** \param columns1 : columns of in1 matrix. +** \param in2 : input arry. +** \param lines2 : lines of in2 matrix. +** \param columns2 : columns of in2 matrix. +** \param out : Matrix that contains the multiplication in1 * in2. +*/ +EXTERN_MATOPS void dmulma(double *in1, int lines1, int columns1, + double *in2, int lines2, int columns2, + double *out); + +/* +** \brief Compute a multiplication for floats complex matrixes. +** \param in1 : input matrix. +** \param lines1 : lines of in1 matrix. +** \param columns1 : columns of in1 matrix. +** \param in2 : input arry. +** \param lines2 : lines of in2 matrix. +** \param columns2 : columns of in2 matrix. +** \param out : Matrix that contains the multiplication in1 * in2. +*/ +EXTERN_MATOPS void cmulma(floatComplex *in1, int lines1, int columns1, + floatComplex *in2, int lines2, int columns2, + floatComplex *out); + +/* +** \brief Compute a multiplication for doubles matrixes. +** \param in1 : input matrix. +** \param lines1 : lines of in1 matrix. +** \param columns1 : columns of in1 matrix. +** \param in2 : input arry. +** \param lines2 : lines of in2 matrix. +** \param columns2 : columns of in2 matrix. +** \param out : Matrix that contains the multiplication in1 * in2. +*/ +EXTERN_MATOPS void zmulma(doubleComplex *in1, int lines1, int columns1, + doubleComplex *in2, int lines2, int columns2, + doubleComplex *out); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* !__MATRIXMULTIPLICATION_H__ */ diff --git a/src/c/matrixOperations/includes/matrixPow.h b/src/c/matrixOperations/includes/matrixPow.h new file mode 100644 index 0000000..d7ffab3 --- /dev/null +++ b/src/c/matrixOperations/includes/matrixPow.h @@ -0,0 +1,43 @@ + +/* + * 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 __MATRIXPOW_H__ +#define __MATRIXPOW_H__ + +#include "dynlib_matrixoperations.h" +#include "floatComplex.h" +#include "doubleComplex.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* + powm is only working on square matrix + so the size is limited to rows +*/ +EXTERN_MATOPS void spowma(float* in, int rows, float expand, float* out); + +EXTERN_MATOPS void dpowma(double* in, int rows, double expand, double* out); + +EXTERN_MATOPS void cpowma(floatComplex* in, int rows, floatComplex expand, floatComplex* out); + +EXTERN_MATOPS void zpowma(doubleComplex* in, int rows, doubleComplex expand, doubleComplex* out); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + + + +#endif/*__MATRIXPOW_H__*/ diff --git a/src/c/matrixOperations/includes/matrixSquaredMagnitude.h b/src/c/matrixOperations/includes/matrixSquaredMagnitude.h new file mode 100644 index 0000000..9ee64c3 --- /dev/null +++ b/src/c/matrixOperations/includes/matrixSquaredMagnitude.h @@ -0,0 +1,41 @@ + +/* + * 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 __SQUAREDMAGNITUDE_H__ +#define __SQUAREDMAGNITUDE_H__ + +#include "dynlib_matrixoperations.h" +#include "floatComplex.h" +#include "doubleComplex.h" + +#ifdef __cplusplus +extern "C" { +#endif + +EXTERN_MATOPS float ssquMagns(float in); +EXTERN_MATOPS float ssquMagna(float* in, int rows, int cols); + +EXTERN_MATOPS double dsquMagns(double in); +EXTERN_MATOPS double dsquMagna(double* in, int rows, int cols); + +EXTERN_MATOPS float csquMagns(floatComplex in); +EXTERN_MATOPS float csquMagna(floatComplex* in, int rows, int cols); + +EXTERN_MATOPS double zsquMagns(doubleComplex in); +EXTERN_MATOPS double zsquMagna(doubleComplex* in, int rows, int cols); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* __SQUAREDMAGNITUDE_H__*/ diff --git a/src/c/matrixOperations/includes/matrixTrace.h b/src/c/matrixOperations/includes/matrixTrace.h new file mode 100644 index 0000000..76b7745 --- /dev/null +++ b/src/c/matrixOperations/includes/matrixTrace.h @@ -0,0 +1,70 @@ +/* + * 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 __MATRICXTRACE_H__ +#define __MATRICXTRACE_H__ + +#include "dynlib_matrixoperations.h" +#include "floatComplex.h" +#include "doubleComplex.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** +** WARNING WE ASSUME MATRIXES TO BE SQUARE +** +*/ + + +/* +** \brief Compute the trace of a float scalar matrix. +** \param in : input array. +** \param lines : number of lines +** \param out : float scalar containing the trace. +*/ + +EXTERN_MATOPS float stracea ( float* in ,int lines ) ; + + +/* +** \brief Compute the trace of a double scalar matrix. +** \param in : input array. +** \param lines : number of lines +** \param out : double scalar containing the trace. +*/ +EXTERN_MATOPS double dtracea ( double* in ,int lines ) ; + +/* +** \brief Compute the trace of a float complex matrix. +** \param in : input array. +** \param lines : number of lines +** \param out : float complex containing the trace. +*/ +EXTERN_MATOPS floatComplex ctracea ( floatComplex* in ,int lines ) ; + + +/* +** \brief Compute the trace of a double complex matrix. +** \param in : input array. +** \param lines : number of lines +** \param out : double complex containing the trace. +*/ +EXTERN_MATOPS doubleComplex ztracea ( doubleComplex* in ,int lines ) ; + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* !__MATRICXTRACE_H__ */ diff --git a/src/c/matrixOperations/includes/matrixTranspose.h b/src/c/matrixOperations/includes/matrixTranspose.h new file mode 100644 index 0000000..122b618 --- /dev/null +++ b/src/c/matrixOperations/includes/matrixTranspose.h @@ -0,0 +1,61 @@ +/* + * 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 __MATRIXTRANSPOSE_H__ +#define __MATRIXTRANSPOSE_H__ + +#include "dynlib_matrixoperations.h" +#include "floatComplex.h" +#include "doubleComplex.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif +/* +** \brief Compute the transpose of a float matrix. +** \param in : input matrix. +** \param lines1 : number of lines +** \param column1 : number of column1 +** \param out : the transposed float matrix. +*/ +EXTERN_MATOPS void stransposea ( float* in , int lines1 , int column1, float* out ); +/* +** \brief Compute the transpose of a double matrix. +** \param in : input matrix. +** \param lines1 : number of lines +** \param column1 : number of column1 +** \param out : the transposed double matrix. +*/ +EXTERN_MATOPS void dtransposea ( double* in , int lines1 , int column1, double* out ); +/* +** \brief Compute the transpose of a float complex matrix. +** \param in : input matrix. +** \param lines1 : number of lines +** \param column1 : number of column1 +** \param out : the transposed float complex matrix. +*/ +EXTERN_MATOPS void ctransposea ( floatComplex* in , int lines1 , int column1, floatComplex* out ); +/* +** \brief Compute the transpose of a double complex matrix. +** \param in : input matrix. +** \param lines1 : number of lines +** \param column1 : number of column1 +** \param out : the transposed double complex matrix. +*/ +EXTERN_MATOPS void ztransposea ( doubleComplex* in , int lines1 , int column1, doubleComplex* out ); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* !__MATRIXTRANSPOSE_H__ */ diff --git a/src/c/matrixOperations/includes/ones.h b/src/c/matrixOperations/includes/ones.h new file mode 100644 index 0000000..63d8bd4 --- /dev/null +++ b/src/c/matrixOperations/includes/ones.h @@ -0,0 +1,69 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 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 __ONES_H__ +#define __ONES_H__ + +#include "dynlib_matrixoperations.h" +#include "floatComplex.h" +#include "doubleComplex.h" + + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** \brief create a float one value +*/ +#define soness(in) 1.0f + +/* +** \brief create a Double one value +*/ +#define doness(in) 1.0 + +/* +** \brief create a float complex one value +*/ +#define coness(in) FloatComplex(1.0f, 0) + +/* +** \brief create a Double complex one value +*/ +#define zoness(in) DoubleComplex(1, 0) + + + +/* +** \brief create a float matrix full of one +*/ +EXTERN_MATOPS void sonesa ( float* in , int rows , int cols ); +/* +** \brief create a float complex matrix full of one +*/ +EXTERN_MATOPS void conesa ( floatComplex* in , int rows ,int cols ); +/* +** \brief create a double matrix full of one +*/ +EXTERN_MATOPS void donesa ( double* in , int rows ,int cols ); +/* +** \brief create a double complex matrix full of one +*/ +EXTERN_MATOPS void zonesa ( doubleComplex* in , int rows ,int cols ); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* !__ONES_H__ */ diff --git a/src/c/matrixOperations/includes/spec.h b/src/c/matrixOperations/includes/spec.h new file mode 100644 index 0000000..b7b7d35 --- /dev/null +++ b/src/c/matrixOperations/includes/spec.h @@ -0,0 +1,56 @@ +/* + * 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); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* __SPEC_H__ */ diff --git a/src/c/matrixOperations/includes/zeros.h b/src/c/matrixOperations/includes/zeros.h new file mode 100644 index 0000000..06b2e5a --- /dev/null +++ b/src/c/matrixOperations/includes/zeros.h @@ -0,0 +1,74 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 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 __ZEROS_H__ +#define __ZEROS_H__ + +#include "dynlib_matrixoperations.h" +#include "floatComplex.h" +#include "doubleComplex.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** \brief create a float one value +*/ +#define szeross(in) 0.0f + +/* +** \brief create a Double one value +*/ +#define dzeross(in) 0 + +/* +** \brief create a float complex one value +*/ +#define czeross(in) FloatComplex(0.0f, 0) + +/* +** \brief create a Double complex one value +*/ +#define zzeross(in) DoubleComplex(0, 0) + + + +/* +** \brief create a float matrix full of one +*/ +EXTERN_MATOPS void szerosa ( float* in , int rows , int cols ); +/* +** \brief create a float complex matrix full of one +*/ +EXTERN_MATOPS void czerosa ( floatComplex* in , int rows ,int cols ); +/* +** \brief create a double matrix full of one +*/ +EXTERN_MATOPS void dzerosa ( double* in , int rows ,int cols ); +/* +** \brief create a double complex matrix full of one +*/ +EXTERN_MATOPS void zzerosa ( doubleComplex* in , int rows ,int cols ); + +/* +** \brief create a double complex matrix full of one +*/ +EXTERN_MATOPS void dzerosh ( double* in , int rows ,int cols , int levels); + + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* !__ZEROS_H__ */ -- cgit From 222a3e39441ad408dacdc39d46d687dee5a6bf3c Mon Sep 17 00:00:00 2001 From: siddhu8990 Date: Thu, 20 Aug 2015 01:20:26 +0530 Subject: Support for disp added --- src/c/matrixOperations/includes/eye.h | 41 +++++++++++++++++++++ src/c/matrixOperations/includes/matrixInversion.h | 38 ++++++++++++++++++++ src/c/matrixOperations/includes/ones.h | 43 +++++++++++++++++++++++ src/c/matrixOperations/includes/zeros.h | 40 +++++++++++++++++++++ 4 files changed, 162 insertions(+) (limited to 'src/c/matrixOperations/includes') diff --git a/src/c/matrixOperations/includes/eye.h b/src/c/matrixOperations/includes/eye.h index f7f2ef2..95bdd79 100644 --- a/src/c/matrixOperations/includes/eye.h +++ b/src/c/matrixOperations/includes/eye.h @@ -16,6 +16,7 @@ #include "dynlib_matrixoperations.h" #include "floatComplex.h" #include "doubleComplex.h" +#include "ones.h" #ifdef __cplusplus extern "C" { @@ -41,6 +42,26 @@ extern "C" { */ #define zeyes(in) DoubleComplex(1, 0) +/* +** \brief create a Uint8 Eye value +*/ +#define u8eyes(in) (uint8)1 + +/* +** \brief create a int8 Eye value +*/ +#define i8eyes(in) (int8)1 + +/* +** \brief create a Uint16 Eye value +*/ +#define u16eyes(in) (uint16)1 + +/* +** \brief create a int16 Eye value +*/ +#define i16eyes(in) (int16)1 + /* ** \brief create a float Eye matrix */ @@ -61,6 +82,26 @@ EXTERN_MATOPS void ceyea(floatComplex* in, int _iRows, int _iCols); */ EXTERN_MATOPS void zeyea(doubleComplex* in, int _iRows, int _iCols); +/* +** \brief create a uint8 Eye matrix +*/ +EXTERN_MATOPS void u8eyea(uint8* in, int _iRows, int _iCols); + +/* +** \brief create a int8 Eye matrix +*/ +EXTERN_MATOPS void i8eyea(int8* in, int _iRows, int _iCols); + +/* +** \brief create a uint16 Eye matrix +*/ +EXTERN_MATOPS void u16eyea(uint16* in, int _iRows, int _iCols); + +/* +** \brief create a int16 Eye matrix +*/ +EXTERN_MATOPS void i16eyea(int16* in, int _iRows, int _iCols); + #ifdef __cplusplus } /* extern "C" */ #endif diff --git a/src/c/matrixOperations/includes/matrixInversion.h b/src/c/matrixOperations/includes/matrixInversion.h index 9031245..e547bb9 100644 --- a/src/c/matrixOperations/includes/matrixInversion.h +++ b/src/c/matrixOperations/includes/matrixInversion.h @@ -16,6 +16,7 @@ #include "abs.h" #include "dynlib_matrixoperations.h" +#include "types.h" #ifdef __cplusplus extern "C" { @@ -59,6 +60,43 @@ EXTERN_MATOPS void cinverma ( floatComplex* in, floatComplex* out, int leadDimIn EXTERN_MATOPS void zinverma ( doubleComplex* in, doubleComplex* out, int leadDimIn ); +/* +** \brief Compute the matrix inverse for uint8. +** \param in : input matrix. +** \param leadDimIn : the leading dimension of the matrix . +** \param out : the matrix inverse of the input . +*/ + +EXTERN_MATOPS void u8inverma ( uint8* in, float* out, int leadDimIn ); + +/* +** \brief Compute the matrix inverse for int8. +** \param in : input matrix. +** \param leadDimIn : the leading dimension of the matrix . +** \param out : the matrix inverse of the input . +*/ + +EXTERN_MATOPS void i8inverma ( int8* in, float* out, int leadDimIn ); + +/* +** \brief Compute the matrix inverse for uint16. +** \param in : input matrix. +** \param leadDimIn : the leading dimension of the matrix . +** \param out : the matrix inverse of the input . +*/ + +EXTERN_MATOPS void u16inverma ( uint16* in, float* out, int leadDimIn ); + +/* +** \brief Compute the matrix inverse for int16. +** \param in : input matrix. +** \param leadDimIn : the leading dimension of the matrix . +** \param out : the matrix inverse of the input . +*/ + +EXTERN_MATOPS void i16inverma ( int16* in, float* out, int leadDimIn ); + + #ifdef __cplusplus } /* extern "C" */ #endif diff --git a/src/c/matrixOperations/includes/ones.h b/src/c/matrixOperations/includes/ones.h index 63d8bd4..6734017 100644 --- a/src/c/matrixOperations/includes/ones.h +++ b/src/c/matrixOperations/includes/ones.h @@ -17,6 +17,7 @@ #include "dynlib_matrixoperations.h" #include "floatComplex.h" #include "doubleComplex.h" +#include "types.h" #ifdef __cplusplus @@ -43,25 +44,67 @@ extern "C" { */ #define zoness(in) DoubleComplex(1, 0) +/* +** \brief create a uint8 one value +*/ +#define u8oness(in) (uint8)1 + +/* +** \brief create a int8 one value +*/ +#define i8oness(in) (int8)1 + +/* +** \brief create a uint16 one value +*/ +#define u16oness(in) (uint16)1 + +/* +** \brief create a int16 one value +*/ +#define i16oness(in) (int16)1 /* ** \brief create a float matrix full of one */ EXTERN_MATOPS void sonesa ( float* in , int rows , int cols ); + /* ** \brief create a float complex matrix full of one */ EXTERN_MATOPS void conesa ( floatComplex* in , int rows ,int cols ); + /* ** \brief create a double matrix full of one */ EXTERN_MATOPS void donesa ( double* in , int rows ,int cols ); + /* ** \brief create a double complex matrix full of one */ EXTERN_MATOPS void zonesa ( doubleComplex* in , int rows ,int cols ); +/* +** \brief create a uint8 matrix full of one +*/ +EXTERN_MATOPS void u8onesa ( uint8* in , int rows , int cols ); + +/* +** \brief create a int8 matrix full of one +*/ +EXTERN_MATOPS void i8onesa ( int8* in , int rows , int cols ); + +/* +** \brief create a uint16 matrix full of one +*/ +EXTERN_MATOPS void u16onesa ( uint16* in , int rows , int cols ); + +/* +** \brief create a int16 matrix full of one +*/ +EXTERN_MATOPS void i16onesa ( int16* in , int rows , int cols ); + #ifdef __cplusplus } /* extern "C" */ #endif diff --git a/src/c/matrixOperations/includes/zeros.h b/src/c/matrixOperations/includes/zeros.h index 06b2e5a..993940f 100644 --- a/src/c/matrixOperations/includes/zeros.h +++ b/src/c/matrixOperations/includes/zeros.h @@ -17,6 +17,7 @@ #include "dynlib_matrixoperations.h" #include "floatComplex.h" #include "doubleComplex.h" +#include "types.h" #ifdef __cplusplus extern "C" { @@ -43,6 +44,25 @@ extern "C" { #define zzeross(in) DoubleComplex(0, 0) +/* +** \brief create a single uint8 zero +*/ +#define u8zerosu8(in) (uint8)0 + +/* +** \brief create a single int8 zero +*/ +#define i8zerosi8(in) (int8)0 + +/* +** \brief create a single uint8 zero +*/ +#define u16zerosu16(in) (uint16)0 + +/* +** \brief create a single int8 zero +*/ +#define i16zerosi16(in) (int16)0 /* ** \brief create a float matrix full of one @@ -66,6 +86,26 @@ EXTERN_MATOPS void zzerosa ( doubleComplex* in , int rows ,int cols ); */ EXTERN_MATOPS void dzerosh ( double* in , int rows ,int cols , int levels); +/* +** \brief create a uint8 matrix full of zero +*/ +EXTERN_MATOPS void u8zerosa ( uint8* in , int rows , int cols ); + +/* +** \brief create a int8 matrix full of zero +*/ +EXTERN_MATOPS void i8zerosa ( int8* in , int rows , int cols ); + +/* +** \brief create a uint16 matrix full of zero +*/ +EXTERN_MATOPS void u16zerosa ( uint16* in , int rows , int cols ); + +/* +** \brief create a int16 matrix full of zero +*/ +EXTERN_MATOPS void i16zerosa ( int16* in , int rows , int cols ); + #ifdef __cplusplus } /* extern "C" */ -- cgit From b4de19f848751783259164cf02fc965a0ab77925 Mon Sep 17 00:00:00 2001 From: imushir Date: Fri, 27 Nov 2015 15:42:52 +0530 Subject: #define for u8 u16 i8 i16 added --- src/c/matrixOperations/includes/matrixTrace.h | 39 ++++++++++++++++++++++ src/c/matrixOperations/includes/matrixTranspose.h | 40 +++++++++++++++++++++++ 2 files changed, 79 insertions(+) (limited to 'src/c/matrixOperations/includes') diff --git a/src/c/matrixOperations/includes/matrixTrace.h b/src/c/matrixOperations/includes/matrixTrace.h index 76b7745..80f895d 100644 --- a/src/c/matrixOperations/includes/matrixTrace.h +++ b/src/c/matrixOperations/includes/matrixTrace.h @@ -16,6 +16,7 @@ #include "dynlib_matrixoperations.h" #include "floatComplex.h" #include "doubleComplex.h" +#include "types.h" #ifdef __cplusplus extern "C" { @@ -63,6 +64,44 @@ EXTERN_MATOPS floatComplex ctracea ( floatComplex* in ,int lines ) ; */ EXTERN_MATOPS doubleComplex ztracea ( doubleComplex* in ,int lines ) ; + +/* +** \brief Compute the trace of a uint8 matrix. +** \param in : input array. +** \param lines : number of lines +** \param out : uint8 containing the trace. +*/ +EXTERN_MATOPS uint8 u8tracea ( uint8* in ,int lines ) ; + + +/* +** \brief Compute the trace of a uint16 matrix. +** \param in : input array. +** \param lines : number of lines +** \param out : uint16 containing the trace. +*/ +EXTERN_MATOPS uint16 u16tracea ( uint16* in ,int lines ) ; + + +/* +** \brief Compute the trace of a int8 matrix. +** \param in : input array. +** \param lines : number of lines +** \param out : int8 containing the trace. +*/ +EXTERN_MATOPS int8 i8tracea ( int8* in ,int lines ) ; + + +/* +** \brief Compute the trace of a int16 matrix. +** \param in : input array. +** \param lines : number of lines +** \param out : int16 containing the trace. +*/ +EXTERN_MATOPS int16 i16tracea ( int16* in ,int lines ) ; + + + #ifdef __cplusplus } /* extern "C" */ #endif diff --git a/src/c/matrixOperations/includes/matrixTranspose.h b/src/c/matrixOperations/includes/matrixTranspose.h index 122b618..7e2acbf 100644 --- a/src/c/matrixOperations/includes/matrixTranspose.h +++ b/src/c/matrixOperations/includes/matrixTranspose.h @@ -16,6 +16,7 @@ #include "dynlib_matrixoperations.h" #include "floatComplex.h" #include "doubleComplex.h" +#include "types.h" #include #ifdef __cplusplus @@ -54,6 +55,45 @@ EXTERN_MATOPS void ctransposea ( floatComplex* in , int lines1 , int column1, fl */ EXTERN_MATOPS void ztransposea ( doubleComplex* in , int lines1 , int column1, doubleComplex* out ); + +/* +** \brief Compute the transpose of a uint8 matrix. +** \param in : input matrix. +** \param lines1 : number of lines +** \param column1 : number of column1 +** \param out : the transposed uint8 matrix. +*/ +EXTERN_MATOPS void u8transposea ( uint8* in , int lines1 , int column1, uint8* out ); + +/* +** \brief Compute the transpose of a uint16 matrix. +** \param in : input matrix. +** \param lines1 : number of lines +** \param column1 : number of column1 +** \param out : the transposed uint16 matrix. +*/ +EXTERN_MATOPS void u16transposea ( uint16* in , int lines1 , int column1, uint16* out ); + +/* +** \brief Compute the transpose of a int8 matrix. +** \param in : input matrix. +** \param lines1 : number of lines +** \param column1 : number of column1 +** \param out : the transposed int8 matrix. +*/ +EXTERN_MATOPS void i8transposea ( int8* in , int lines1 , int column1, int8* out ); + +/* +** \brief Compute the transpose of a int16 matrix. +** \param in : input matrix. +** \param lines1 : number of lines +** \param column1 : number of column1 +** \param out : the transposed int16 matrix. +*/ +EXTERN_MATOPS void i16transposea ( int16* in , int lines1 , int column1, int16* out ); + + + #ifdef __cplusplus } /* extern "C" */ #endif -- cgit From 52780e449df15747b1339b1fa2c8caf8d69b2c56 Mon Sep 17 00:00:00 2001 From: imushir Date: Mon, 28 Dec 2015 17:01:05 +0530 Subject: added support for uint8 uin16 int8 int16 --- src/c/matrixOperations/includes/cat.h | 59 ++++++++++++++++++++++++++++++++++- 1 file changed, 58 insertions(+), 1 deletion(-) (limited to 'src/c/matrixOperations/includes') diff --git a/src/c/matrixOperations/includes/cat.h b/src/c/matrixOperations/includes/cat.h index 9f64a15..dde6b9b 100644 --- a/src/c/matrixOperations/includes/cat.h +++ b/src/c/matrixOperations/includes/cat.h @@ -12,7 +12,7 @@ #ifndef __CAT_H__ #define __CAT_H__ - +#include "types.h" #include "dynlib_matrixoperations.h" #include "floatComplex.h" #include "doubleComplex.h" @@ -98,6 +98,63 @@ EXTERN_MATOPS void ccolumncata(floatComplex *in1, int lines1, int columns1, flo EXTERN_MATOPS void zrowcata(doubleComplex *in1, int lines1, int columns1, doubleComplex *in2, int lines2, int columns2, doubleComplex* out); EXTERN_MATOPS void zcolumncata(doubleComplex *in1, int lines1, int columns1, doubleComplex *in2, int lines2, int columns2, doubleComplex* out); +/* +** \brief Concat uint8 arrays +** \param in1 the uint8 array to process +** \param lines1 +** \param columns1 +** \param in2 the uint8 array to process to concat +** \param lines2 +** \param columns2 +** \param out the concatenation +*/ + +EXTERN_MATOPS void u8rowcata(uint8 *in1, int lines1, int columns1, uint8 *in2, int lines2, int columns2, uint8* out); +EXTERN_MATOPS void u8columncata(uint8 *in1, int lines1, int columns1, uint8 *in2, int lines2, int columns2, uint8* out); + +/* +** \brief Concat uint16 arrays +** \param in1 the uint16 array to process +** \param lines1 +** \param columns1 +** \param in2 the uint16 array to process to concat +** \param lines2 +** \param columns2 +** \param out the concatenation +*/ + +EXTERN_MATOPS void u16rowcata(uint16 *in1, int lines1, int columns1, uint16 *in2, int lines2, int columns2, uint16* out); +EXTERN_MATOPS void u16columncata(uint16 *in1, int lines1, int columns1, uint16 *in2, int lines2, int columns2, uint16* out); + + +/* +** \brief Concat int8 arrays +** \param in1 the int8 array to process +** \param lines1 +** \param columns1 +** \param in2 the int8 array to process to concat +** \param lines2 +** \param columns2 +** \param out the concatenation +*/ + +EXTERN_MATOPS void i8rowcata(int8 *in1, int lines1, int columns1, int8 *in2, int lines2, int columns2, int8* out); +EXTERN_MATOPS void i8columncata(int8 *in1, int lines1, int columns1, int8 *in2, int lines2, int columns2, int8* out); + +/* +** \brief Concat int16 arrays +** \param in1 the int16 array to process +** \param lines1 +** \param columns1 +** \param in2 the int16 array to process to concat +** \param lines2 +** \param columns2 +** \param out the concatenation +*/ + +EXTERN_MATOPS void i16rowcata(int16 *in1, int lines1, int columns1, int16 *in2, int lines2, int columns2, int16* out); +EXTERN_MATOPS void i16columncata(int16 *in1, int lines1, int columns1, int16 *in2, int lines2, int columns2, int16* out); + #ifdef __cplusplus } /* extern "C" */ #endif -- cgit From a8627e204617fc212c4f05d232208890d9d1cad6 Mon Sep 17 00:00:00 2001 From: imushir Date: Tue, 29 Dec 2015 11:55:07 +0530 Subject: added support for matrixMultiplication --- .../includes/matrixMultiplication.h | 59 ++++++++++++++++++++++ 1 file changed, 59 insertions(+) (limited to 'src/c/matrixOperations/includes') diff --git a/src/c/matrixOperations/includes/matrixMultiplication.h b/src/c/matrixOperations/includes/matrixMultiplication.h index 228dd16..c2235c8 100644 --- a/src/c/matrixOperations/includes/matrixMultiplication.h +++ b/src/c/matrixOperations/includes/matrixMultiplication.h @@ -16,6 +16,7 @@ #include "dynlib_matrixoperations.h" #include "multiplication.h" #include "addition.h" +#include "types.h" #ifdef __cplusplus extern "C" { @@ -84,6 +85,64 @@ EXTERN_MATOPS void zmulma(doubleComplex *in1, int lines1, int columns1, doubleComplex *in2, int lines2, int columns2, doubleComplex *out); +/* +** \brief Compute a multiplication for uint8 matrixes. +** \param in1 : input matrix. +** \param lines1 : lines of in1 matrix. +** \param columns1 : columns of in1 matrix. +** \param in2 : input arry. +** \param lines2 : lines of in2 matrix. +** \param columns2 : columns of in2 matrix. +** \param out : Matrix that contains the multiplication in1 * in2. +*/ +EXTERN_MATOPS void u8mulma(uint8 *in1, int lines1, int columns1, + uint8 *in2, int lines2, int columns2, + uint8 *out); + +/* +** \brief Compute a multiplication for uint16 matrixes. +** \param in1 : input matrix. +** \param lines1 : lines of in1 matrix. +** \param columns1 : columns of in1 matrix. +** \param in2 : input arry. +** \param lines2 : lines of in2 matrix. +** \param columns2 : columns of in2 matrix. +** \param out : Matrix that contains the multiplication in1 * in2. +*/ +EXTERN_MATOPS void u16mulma(uint16 *in1, int lines1, int columns1, + uint16 *in2, int lines2, int columns2, + uint16 *out); + +/* +** \brief Compute a multiplication for int8 matrixes. +** \param in1 : input matrix. +** \param lines1 : lines of in1 matrix. +** \param columns1 : columns of in1 matrix. +** \param in2 : input arry. +** \param lines2 : lines of in2 matrix. +** \param columns2 : columns of in2 matrix. +** \param out : Matrix that contains the multiplication in1 * in2. +*/ +EXTERN_MATOPS void i8mulma(int8 *in1, int lines1, int columns1, + int8 *in2, int lines2, int columns2, + int8 *out); + +/* +** \brief Compute a multiplication for int16 matrixes. +** \param in1 : input matrix. +** \param lines1 : lines of in1 matrix. +** \param columns1 : columns of in1 matrix. +** \param in2 : input arry. +** \param lines2 : lines of in2 matrix. +** \param columns2 : columns of in2 matrix. +** \param out : Matrix that contains the multiplication in1 * in2. +*/ +EXTERN_MATOPS void i16mulma(int16 *in1, int lines1, int columns1, + int16 *in2, int lines2, int columns2, + int16 *out); + + + #ifdef __cplusplus } /* extern "C" */ #endif -- cgit From 7382a75d68141d72562f219a839543c9c6fc83aa Mon Sep 17 00:00:00 2001 From: imushir Date: Tue, 29 Dec 2015 12:21:00 +0530 Subject: added support for magnitude --- src/c/matrixOperations/includes/matrixMagnitude.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/c/matrixOperations/includes') diff --git a/src/c/matrixOperations/includes/matrixMagnitude.h b/src/c/matrixOperations/includes/matrixMagnitude.h index 7b65c6d..a9f4e71 100644 --- a/src/c/matrixOperations/includes/matrixMagnitude.h +++ b/src/c/matrixOperations/includes/matrixMagnitude.h @@ -17,6 +17,7 @@ #include "dynlib_matrixoperations.h" #include "floatComplex.h" #include "doubleComplex.h" +#include "types.h" #ifdef __cplusplus extern "C" { @@ -34,6 +35,18 @@ EXTERN_MATOPS float cmagna(floatComplex* in, int rows, int cols); EXTERN_MATOPS double zmagns(doubleComplex in); EXTERN_MATOPS double zmagna(doubleComplex* in, int rows, int cols); +EXTERN_MATOPS uint8 u8magns(uint8 in); +EXTERN_MATOPS uint8 u8magna(uint8* in, int rows, int cols); + +EXTERN_MATOPS uint16 u16magns(uint16 in); +EXTERN_MATOPS uint16 u16magna(uint16* in, int rows, int cols); + +EXTERN_MATOPS int8 i8magns(int8 in); +EXTERN_MATOPS int8 i8magna(int8* in, int rows, int cols); + +EXTERN_MATOPS int16 i16magns(int16 in); +EXTERN_MATOPS int16 i16magna(int16* in, int rows, int cols); + #ifdef __cplusplus } /* extern "C" */ #endif -- cgit From ee5bf4d90f78673d1e4d5a9dd304ee53c503c085 Mon Sep 17 00:00:00 2001 From: imushir Date: Tue, 9 Feb 2016 16:38:27 +0530 Subject: Support for Servo motor for Arduino. Support for'diag' in c --- src/c/matrixOperations/includes/diag.h | 96 ++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 src/c/matrixOperations/includes/diag.h (limited to 'src/c/matrixOperations/includes') diff --git a/src/c/matrixOperations/includes/diag.h b/src/c/matrixOperations/includes/diag.h new file mode 100644 index 0000000..b4ca929 --- /dev/null +++ b/src/c/matrixOperations/includes/diag.h @@ -0,0 +1,96 @@ +/* + * 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 __DIAG_H__ +#define __DIAG_H__ + +#include "dynlib_matrixoperations.h" +#include "types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +EXTERN_MATOPS double ddiags(double in ); + +EXTERN_MATOPS void ddiaga(double in, int size,int insert_post,double *out); + +EXTERN_MATOPS void ddiagina(double *in, int _row,int _column,int insert_post,double *out); + +EXTERN_MATOPS void ddiagins(double* in, int size, double* out ); + +EXTERN_MATOPS void ddiagexa(double* in,int row,int column,int insert_pos,double* out); + +EXTERN_MATOPS double ddiagexs(double* in,int row,int column,int extract_pos); + +EXTERN_MATOPS uint8 u8diags(uint8 in ); + +EXTERN_MATOPS void u8diaga(uint8 in, int size,int insert_post,uint8 *out); + +EXTERN_MATOPS void u8diagina(uint8 *in, int _row,int _column,int insert_post,uint8 *out); + +EXTERN_MATOPS void u8diagins(uint8* in, int size, uint8* out ); + +EXTERN_MATOPS void u8diagexa(uint8* in,int row,int column,int insert_pos,uint8* out); + +EXTERN_MATOPS uint8 u8diagexs(uint8* in,int row,int column,int extract_pos); + +EXTERN_MATOPS uint16 u16diags(uint16 in ); + +EXTERN_MATOPS void u16diaga(uint16 in, int size,int insert_post,uint16 *out); + +EXTERN_MATOPS void u16diagina(uint16 *in, int _row,int _column,int insert_post,uint16 *out); + +EXTERN_MATOPS void u16diagins(uint16* in, int size, uint16* out ); + +EXTERN_MATOPS void u16diagexa(uint16* in,int row,int column,int insert_pos,uint16* out); + +EXTERN_MATOPS uint16 u16diagexs(uint16* in,int row,int column,int extract_pos); + +EXTERN_MATOPS int8 i8diags(int8 in ); + +EXTERN_MATOPS void i8diaga(int8 in, int size,int insert_post,int8 *out); + +EXTERN_MATOPS void i8diagina(int8 *in, int _row,int _column,int insert_post,int8 *out); + +EXTERN_MATOPS void i8diagins(int8* in, int size, int8* out ); + +EXTERN_MATOPS void i8diagexa(int8* in,int row,int column,int insert_pos,int8* out); + +EXTERN_MATOPS int8 i8diagexs(int8* in,int row,int column,int extract_pos); + +EXTERN_MATOPS int16 i16diags(int8 in ); + +EXTERN_MATOPS void i16diaga(int16 in, int size,int insert_post,int16 *out); + +EXTERN_MATOPS void i16diagina(int16 *in, int _row,int _column,int insert_post,int16 *out); + +EXTERN_MATOPS void i16diagins(int16* in, int size, int16* out ); + +EXTERN_MATOPS void i16diagexa(int16* in,int row,int column,int insert_pos,int16* out); + +EXTERN_MATOPS int16 i16diagexs(int16* in,int row,int column,int extract_pos); + + + + + + + + + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* !__DIAG_H__ */ + -- cgit From 7c0ddc7446f79332bb624503902f261c3ffc18c6 Mon Sep 17 00:00:00 2001 From: imushir Date: Mon, 22 Feb 2016 14:31:36 +0530 Subject: changed parameter in i16diags --- src/c/matrixOperations/includes/diag.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/c/matrixOperations/includes') diff --git a/src/c/matrixOperations/includes/diag.h b/src/c/matrixOperations/includes/diag.h index b4ca929..24c167a 100644 --- a/src/c/matrixOperations/includes/diag.h +++ b/src/c/matrixOperations/includes/diag.h @@ -68,7 +68,7 @@ EXTERN_MATOPS void i8diagexa(int8* in,int row,int column,int insert_pos,int8* ou EXTERN_MATOPS int8 i8diagexs(int8* in,int row,int column,int extract_pos); -EXTERN_MATOPS int16 i16diags(int8 in ); +EXTERN_MATOPS int16 i16diags(int16 in ); EXTERN_MATOPS void i16diaga(int16 in, int size,int insert_post,int16 *out); -- cgit From a9d0c72c839428a17956fa0530977fc058d8a799 Mon Sep 17 00:00:00 2001 From: siddhu8990 Date: Tue, 10 May 2016 17:17:41 +0530 Subject: Added support for cumprod, cumsum, triu, tril functions --- src/c/matrixOperations/includes/cumprod.h | 52 +++++++++++++++++++++++++++++++ src/c/matrixOperations/includes/cumsum.h | 52 +++++++++++++++++++++++++++++++ src/c/matrixOperations/includes/tril.h | 33 ++++++++++++++++++++ src/c/matrixOperations/includes/triu.h | 33 ++++++++++++++++++++ 4 files changed, 170 insertions(+) create mode 100644 src/c/matrixOperations/includes/cumprod.h create mode 100644 src/c/matrixOperations/includes/cumsum.h create mode 100644 src/c/matrixOperations/includes/tril.h create mode 100644 src/c/matrixOperations/includes/triu.h (limited to 'src/c/matrixOperations/includes') diff --git a/src/c/matrixOperations/includes/cumprod.h b/src/c/matrixOperations/includes/cumprod.h new file mode 100644 index 0000000..bc08aba --- /dev/null +++ b/src/c/matrixOperations/includes/cumprod.h @@ -0,0 +1,52 @@ +// Copyright (C) 2016 - IIT Bombay - FOSSEE +// +// 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 +// Author: Siddhesh Wani +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + + +#ifndef __CUMPROD_H__ +#define __CUMPROD_H__ + +#include "types.h" + +#ifdef __cplusplus +#extern "C" { +#endif + +void dcumproda(double *in1, int row, int column, double *out); +void drowcumproda(double *in1, int row, int column, double *out); +void dcolumncumproda(double *in1, int row, int column, double *out); + +void scumproda(float *in1, int row, int column, float *out); +void srowcumproda(float *in1, int row, int column, float *out); +void scolumncumproda(float *in1, int row, int column, float *out); + +void u8cumproda(uint8 *in1, int row, int column, uint8 *out); +void u8rowcumproda(uint8 *in1, int row, int column, uint8 *out); +void u8columncumproda(uint8 *in1, int row, int column, uint8 *out); + +void i8cumproda(int8 *in1, int row, int column, int8 *out); +void i8rowcumproda(int8 *in1, int row, int column, int8 *out); +void i8columncumproda(int8 *in1, int row, int column, int8 *out); + +void u16cumproda(uint16 *in1, int row, int column, uint16 *out); +void u16rowcumproda(uint16 *in1, int row, int column, uint16 *out); +void u16columncumproda(uint16 *in1, int row, int column, uint16 *out); + +void i16cumproda(int16 *in1, int row, int column, int16 *out); +void i16rowcumproda(int16 *in1, int row, int column, int16 *out); +void i16columncumproda(int16 *in1, int row, int column, int16 *out); + + + +#ifdef __cplusplus +#} /* extern "C" */ +#endif + +#endif /*__CUMPROD_H__*/ diff --git a/src/c/matrixOperations/includes/cumsum.h b/src/c/matrixOperations/includes/cumsum.h new file mode 100644 index 0000000..4c6a3b3 --- /dev/null +++ b/src/c/matrixOperations/includes/cumsum.h @@ -0,0 +1,52 @@ +// Copyright (C) 2016 - IIT Bombay - FOSSEE +// +// 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 +// Author: Siddhesh Wani +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + + +#ifndef __CUMSUM_H__ +#define __CUMSUM_H__ + +#include "types.h" + +#ifdef __cplusplus +#extern "C" { +#endif + +void dcumsuma(double *in1, int row, int column, double *out); +void drowcumsuma(double *in1, int row, int column, double *out); +void dcolumncumsuma(double *in1, int row, int column, double *out); + +void scumsuma(float *in1, int row, int column, float *out); +void srowcumsuma(float *in1, int row, int column, float *out); +void scolumncumsuma(float *in1, int row, int column, float *out); + +void u8cumsuma(uint8 *in1, int row, int column, uint8 *out); +void u8rowcumsuma(uint8 *in1, int row, int column, uint8 *out); +void u8columncumsuma(uint8 *in1, int row, int column, uint8 *out); + +void i8cumsuma(int8 *in1, int row, int column, int8 *out); +void i8rowcumsuma(int8 *in1, int row, int column, int8 *out); +void i8columncumsuma(int8 *in1, int row, int column, int8 *out); + +void u16cumsuma(uint16 *in1, int row, int column, uint16 *out); +void u16rowcumsuma(uint16 *in1, int row, int column, uint16 *out); +void u16columncumsuma(uint16 *in1, int row, int column, uint16 *out); + +void i16cumsuma(int16 *in1, int row, int column, int16 *out); +void i16rowcumsuma(int16 *in1, int row, int column, int16 *out); +void i16columncumsuma(int16 *in1, int row, int column, int16 *out); + + + +#ifdef __cplusplus +#} /* extern "C" */ +#endif + +#endif /*__CUMSUM_H__*/ diff --git a/src/c/matrixOperations/includes/tril.h b/src/c/matrixOperations/includes/tril.h new file mode 100644 index 0000000..e61a3b7 --- /dev/null +++ b/src/c/matrixOperations/includes/tril.h @@ -0,0 +1,33 @@ +// Copyright (C) 2016 - IIT Bombay - FOSSEE +// +// 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 +// Author: Siddhesh Wani +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + + +#ifndef __TRIL_H__ +#define __TRIL_H__ + +#include "types.h" + +#ifdef __cplusplus +#extern "C" { +#endif + +void dtrila (double *in, int row, int column, double diag, double *out); +void strila (float *in, int row, int column, double diag, float *out); +void u8trila (uint8 *in, int row, int column, double diag, uint8 *out); +void u16trila (uint16 *in, int row, int column, double diag, uint16 *out); +void i8trila (int8 *in, int row, int column, double diag, int8 *out); +void i16trila (int16 *in, int row, int column, double diag, int16 *out); + +#ifdef __cplusplus +#} /* extern "C" */ +#endif + +#endif /*__TRIL_H__*/ diff --git a/src/c/matrixOperations/includes/triu.h b/src/c/matrixOperations/includes/triu.h new file mode 100644 index 0000000..1dda279 --- /dev/null +++ b/src/c/matrixOperations/includes/triu.h @@ -0,0 +1,33 @@ +// Copyright (C) 2016 - IIT Bombay - FOSSEE +// +// 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 +// Author: Siddhesh Wani +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + + +#ifndef __TRIU_H__ +#define __TRIU_H__ + +#include "types.h" + +#ifdef __cplusplus +#extern "C" { +#endif + +void dtriua (double *in, int row, int column, double diag, double *out); +void striua (float *in, int row, int column, double diag, float *out); +void u8triua (uint8 *in, int row, int column, double diag, uint8 *out); +void u16triua (uint16 *in, int row, int column, double diag, uint16 *out); +void i8triua (int8 *in, int row, int column, double diag, int8 *out); +void i16triua (int16 *in, int row, int column, double diag, int16 *out); + +#ifdef __cplusplus +#} /* extern "C" */ +#endif + +#endif /*__TRIU_H__*/ -- cgit From a6d6a9c1e88b75668868af691c9731075a514ffb Mon Sep 17 00:00:00 2001 From: siddhu8990 Date: Wed, 18 May 2016 09:44:43 +0530 Subject: Support added for kron, flipdim --- src/c/matrixOperations/includes/flipdim.h | 39 +++++++++++++++++++++++++++++++ src/c/matrixOperations/includes/kron.h | 31 ++++++++++++++++++++++++ 2 files changed, 70 insertions(+) create mode 100644 src/c/matrixOperations/includes/flipdim.h create mode 100644 src/c/matrixOperations/includes/kron.h (limited to 'src/c/matrixOperations/includes') diff --git a/src/c/matrixOperations/includes/flipdim.h b/src/c/matrixOperations/includes/flipdim.h new file mode 100644 index 0000000..c6dd91d --- /dev/null +++ b/src/c/matrixOperations/includes/flipdim.h @@ -0,0 +1,39 @@ +// Copyright (C) 2016 - IIT Bombay - FOSSEE +// +// 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 +// Author: Siddhesh Wani +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + + +#ifndef __FLIPDIM_H__ +#define __FLIPDIM_H__ + +#include "types.h" + + +#ifdef __cplusplus +#extern "C" { +#endif + +void dflipdima (double *in, int row, int col, int dim, int blk_size, double *out); + +void sflipdima (float *in, int row, int col, int dim, int blk_size, float *out); + +void u8flipdima (uint8 *in, int row, int col, int dim, int blk_size, uint8 *out); + +void i8flipdima (int8 *in, int row, int col, int dim, int blk_size, int8 *out); + +void u16flipdima (uint16 *in, int row, int col, int dim, int blk_size, uint16 *out); + +void i16flipdima (int16 *in, int row, int col, int dim, int blk_size, int16 *out); + +#ifdef __cplusplus +#} /* extern "C" */ +#endif + +#endif /*__FLIPDIM_H__*/ diff --git a/src/c/matrixOperations/includes/kron.h b/src/c/matrixOperations/includes/kron.h new file mode 100644 index 0000000..f635d5e --- /dev/null +++ b/src/c/matrixOperations/includes/kron.h @@ -0,0 +1,31 @@ +// Copyright (C) 2016 - IIT Bombay - FOSSEE +// +// 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 +// Author: Siddhesh Wani +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + + +#ifndef __KRON_H__ +#define __KRON_H__ + +#include "kron.h" + +#ifdef __cplusplus +#extern "C" { +#endif + +void dkrona (double *in1, int row1, int col1, double *in2, int row2, \ + int col2, double *out); +void skrona (float *in1, int row1, int col1, float *in2, int row2, \ + int col2, float *out); + +#ifdef __cplusplus +#} /* extern "C" */ +#endif + +#endif /*__KRON_H__*/ -- cgit From c75fb67154fb5679d6ede9a52d5f5ae15600f9f9 Mon Sep 17 00:00:00 2001 From: siddhu8990 Date: Mon, 6 Jun 2016 09:18:33 +0530 Subject: File handling functions added --- src/c/matrixOperations/includes/cumprod.h | 27 ++++++++++++++------------- src/c/matrixOperations/includes/cumsum.h | 27 ++++++++++++++------------- src/c/matrixOperations/includes/flipdim.h | 27 ++++++++++++++------------- src/c/matrixOperations/includes/kron.h | 25 +++++++++++++------------ src/c/matrixOperations/includes/tril.h | 25 +++++++++++++------------ src/c/matrixOperations/includes/triu.h | 25 +++++++++++++------------ 6 files changed, 81 insertions(+), 75 deletions(-) (limited to 'src/c/matrixOperations/includes') diff --git a/src/c/matrixOperations/includes/cumprod.h b/src/c/matrixOperations/includes/cumprod.h index bc08aba..f47fd77 100644 --- a/src/c/matrixOperations/includes/cumprod.h +++ b/src/c/matrixOperations/includes/cumprod.h @@ -1,14 +1,15 @@ -// Copyright (C) 2016 - IIT Bombay - FOSSEE -// -// 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 -// Author: Siddhesh Wani -// Organization: FOSSEE, IIT Bombay -// Email: toolbox@scilab.in - +/* Copyright (C) 2016 - IIT Bombay - FOSSEE + + 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 + Author: Siddhesh Wani + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + #ifndef __CUMPROD_H__ #define __CUMPROD_H__ @@ -16,7 +17,7 @@ #include "types.h" #ifdef __cplusplus -#extern "C" { +extern "C" { #endif void dcumproda(double *in1, int row, int column, double *out); @@ -46,7 +47,7 @@ void i16columncumproda(int16 *in1, int row, int column, int16 *out); #ifdef __cplusplus -#} /* extern "C" */ +} /* extern "C" */ #endif #endif /*__CUMPROD_H__*/ diff --git a/src/c/matrixOperations/includes/cumsum.h b/src/c/matrixOperations/includes/cumsum.h index 4c6a3b3..24d81bd 100644 --- a/src/c/matrixOperations/includes/cumsum.h +++ b/src/c/matrixOperations/includes/cumsum.h @@ -1,14 +1,15 @@ -// Copyright (C) 2016 - IIT Bombay - FOSSEE -// -// 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 -// Author: Siddhesh Wani -// Organization: FOSSEE, IIT Bombay -// Email: toolbox@scilab.in - +/* Copyright (C) 2016 - IIT Bombay - FOSSEE + + 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 + Author: Siddhesh Wani + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + #ifndef __CUMSUM_H__ #define __CUMSUM_H__ @@ -16,7 +17,7 @@ #include "types.h" #ifdef __cplusplus -#extern "C" { +extern "C" { #endif void dcumsuma(double *in1, int row, int column, double *out); @@ -46,7 +47,7 @@ void i16columncumsuma(int16 *in1, int row, int column, int16 *out); #ifdef __cplusplus -#} /* extern "C" */ +} /* extern "C" */ #endif #endif /*__CUMSUM_H__*/ diff --git a/src/c/matrixOperations/includes/flipdim.h b/src/c/matrixOperations/includes/flipdim.h index c6dd91d..bdf4a68 100644 --- a/src/c/matrixOperations/includes/flipdim.h +++ b/src/c/matrixOperations/includes/flipdim.h @@ -1,14 +1,15 @@ -// Copyright (C) 2016 - IIT Bombay - FOSSEE -// -// 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 -// Author: Siddhesh Wani -// Organization: FOSSEE, IIT Bombay -// Email: toolbox@scilab.in - +/* Copyright (C) 2016 - IIT Bombay - FOSSEE + + 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 + Author: Siddhesh Wani + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + #ifndef __FLIPDIM_H__ #define __FLIPDIM_H__ @@ -17,7 +18,7 @@ #ifdef __cplusplus -#extern "C" { +extern "C" { #endif void dflipdima (double *in, int row, int col, int dim, int blk_size, double *out); @@ -33,7 +34,7 @@ void u16flipdima (uint16 *in, int row, int col, int dim, int blk_size, uint16 *o void i16flipdima (int16 *in, int row, int col, int dim, int blk_size, int16 *out); #ifdef __cplusplus -#} /* extern "C" */ +} /* extern "C" */ #endif #endif /*__FLIPDIM_H__*/ diff --git a/src/c/matrixOperations/includes/kron.h b/src/c/matrixOperations/includes/kron.h index f635d5e..e4cff2d 100644 --- a/src/c/matrixOperations/includes/kron.h +++ b/src/c/matrixOperations/includes/kron.h @@ -1,14 +1,15 @@ -// Copyright (C) 2016 - IIT Bombay - FOSSEE -// -// 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 -// Author: Siddhesh Wani -// Organization: FOSSEE, IIT Bombay -// Email: toolbox@scilab.in +/* Copyright (C) 2016 - IIT Bombay - FOSSEE + 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 + Author: Siddhesh Wani + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + #ifndef __KRON_H__ #define __KRON_H__ @@ -16,7 +17,7 @@ #include "kron.h" #ifdef __cplusplus -#extern "C" { +extern "C" { #endif void dkrona (double *in1, int row1, int col1, double *in2, int row2, \ @@ -25,7 +26,7 @@ void skrona (float *in1, int row1, int col1, float *in2, int row2, \ int col2, float *out); #ifdef __cplusplus -#} /* extern "C" */ +} /* extern "C" */ #endif #endif /*__KRON_H__*/ diff --git a/src/c/matrixOperations/includes/tril.h b/src/c/matrixOperations/includes/tril.h index e61a3b7..486e81f 100644 --- a/src/c/matrixOperations/includes/tril.h +++ b/src/c/matrixOperations/includes/tril.h @@ -1,14 +1,15 @@ -// Copyright (C) 2016 - IIT Bombay - FOSSEE -// -// 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 -// Author: Siddhesh Wani -// Organization: FOSSEE, IIT Bombay -// Email: toolbox@scilab.in +/* Copyright (C) 2016 - IIT Bombay - FOSSEE + 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 + Author: Siddhesh Wani + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + #ifndef __TRIL_H__ #define __TRIL_H__ @@ -16,7 +17,7 @@ #include "types.h" #ifdef __cplusplus -#extern "C" { +extern "C" { #endif void dtrila (double *in, int row, int column, double diag, double *out); @@ -27,7 +28,7 @@ void i8trila (int8 *in, int row, int column, double diag, int8 *out); void i16trila (int16 *in, int row, int column, double diag, int16 *out); #ifdef __cplusplus -#} /* extern "C" */ +} /* extern "C" */ #endif #endif /*__TRIL_H__*/ diff --git a/src/c/matrixOperations/includes/triu.h b/src/c/matrixOperations/includes/triu.h index 1dda279..2b62e22 100644 --- a/src/c/matrixOperations/includes/triu.h +++ b/src/c/matrixOperations/includes/triu.h @@ -1,14 +1,15 @@ -// Copyright (C) 2016 - IIT Bombay - FOSSEE -// -// 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 -// Author: Siddhesh Wani -// Organization: FOSSEE, IIT Bombay -// Email: toolbox@scilab.in +/* Copyright (C) 2016 - IIT Bombay - FOSSEE + 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 + Author: Siddhesh Wani + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + #ifndef __TRIU_H__ #define __TRIU_H__ @@ -16,7 +17,7 @@ #include "types.h" #ifdef __cplusplus -#extern "C" { +extern "C" { #endif void dtriua (double *in, int row, int column, double diag, double *out); @@ -27,7 +28,7 @@ void i8triua (int8 *in, int row, int column, double diag, int8 *out); void i16triua (int16 *in, int row, int column, double diag, int16 *out); #ifdef __cplusplus -#} /* extern "C" */ +} /* extern "C" */ #endif #endif /*__TRIU_H__*/ -- cgit From 396de3715ed2615f81325661c264341165f0edb2 Mon Sep 17 00:00:00 2001 From: siddhu8990 Date: Tue, 14 Jun 2016 12:30:32 +0530 Subject: Support added for diff, norm functions --- src/c/matrixOperations/includes/norm.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 src/c/matrixOperations/includes/norm.h (limited to 'src/c/matrixOperations/includes') diff --git a/src/c/matrixOperations/includes/norm.h b/src/c/matrixOperations/includes/norm.h new file mode 100644 index 0000000..6ac4c06 --- /dev/null +++ b/src/c/matrixOperations/includes/norm.h @@ -0,0 +1,32 @@ + /* Copyright (C) 2016 - IIT Bombay - FOSSEE + + 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 + Author: Siddhesh Wani + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in + */ +#ifndef __NORM_H__ +#define __NORM_H__ + + +#ifdef __cplusplus +extern "C" { +#endif + +double dnormv (double *in, int size, int norm); + +double dnorma (double *in, int row, int col, int norm); + +float dnormv (float *in, int size, int norm); + +float dnorma (float *in, int row, int col, int norm); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /*__NORM_H__*/ -- cgit From 169db0082ebd07baea82d00213db6ffd4dee7cf6 Mon Sep 17 00:00:00 2001 From: siddhu8990 Date: Mon, 27 Jun 2016 19:16:41 +0530 Subject: test commit --- src/c/matrixOperations/includes/norm.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/c/matrixOperations/includes') diff --git a/src/c/matrixOperations/includes/norm.h b/src/c/matrixOperations/includes/norm.h index 6ac4c06..dc9d351 100644 --- a/src/c/matrixOperations/includes/norm.h +++ b/src/c/matrixOperations/includes/norm.h @@ -21,9 +21,9 @@ double dnormv (double *in, int size, int norm); double dnorma (double *in, int row, int col, int norm); -float dnormv (float *in, int size, int norm); +float snormv (float *in, int size, int norm); -float dnorma (float *in, int row, int col, int norm); +float snorma (float *in, int row, int col, int norm); #ifdef __cplusplus } /* extern "C" */ -- cgit From c8fd6991786ccddb44547b619178bb391f3f9b96 Mon Sep 17 00:00:00 2001 From: siddhu8990 Date: Thu, 18 Aug 2016 15:47:18 +0530 Subject: RPi-PWM and basic imaage processing --- src/c/matrixOperations/includes/diag.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/c/matrixOperations/includes') diff --git a/src/c/matrixOperations/includes/diag.h b/src/c/matrixOperations/includes/diag.h index 24c167a..b255c4b 100644 --- a/src/c/matrixOperations/includes/diag.h +++ b/src/c/matrixOperations/includes/diag.h @@ -15,7 +15,8 @@ #include "dynlib_matrixoperations.h" #include "types.h" - +#include + #ifdef __cplusplus extern "C" { #endif -- cgit From 453598b49cb3d4a62b1797dbc90f0e3dd4521329 Mon Sep 17 00:00:00 2001 From: siddhu8990 Date: Wed, 19 Apr 2017 11:56:09 +0530 Subject: Copyright message updated in added files and libraries separated in 'thirdparty' folder --- src/c/matrixOperations/includes/diag.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/c/matrixOperations/includes') diff --git a/src/c/matrixOperations/includes/diag.h b/src/c/matrixOperations/includes/diag.h index b255c4b..5f97923 100644 --- a/src/c/matrixOperations/includes/diag.h +++ b/src/c/matrixOperations/includes/diag.h @@ -1,14 +1,14 @@ -/* - * 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 - * - */ +/* Copyright (C) 2016 - IIT Bombay - FOSSEE + + 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 + Author: Mushir + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ #ifndef __DIAG_H__ #define __DIAG_H__ -- cgit