diff options
Diffstat (limited to '2.3-1/src/c')
18 files changed, 503 insertions, 0 deletions
diff --git a/2.3-1/src/c/elementaryFunctions/includes/isvector.h b/2.3-1/src/c/elementaryFunctions/includes/isvector.h new file mode 100644 index 00000000..5f45abbe --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/includes/isvector.h @@ -0,0 +1,38 @@ +/* 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: Abhinav Dronamraju + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#ifndef __ISVECTOR_H__ +#define __ISVECTOR_H__ + + +#include "types.h" +#include "doubleComplex.h" +#include "floatComplex.h" + +#ifdef __cplusplus +extern "C" { +#endif + +char disvectora(double* , int); +char disvectors(double); +char sisvectora( float* , int); +char sisvectors( float); +char gisvectora(char* , int); +char gisvectors(char); +char zisvectora(doubleComplex*, int); +char zisvectors(doubleComplex); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif diff --git a/2.3-1/src/c/elementaryFunctions/interfaces/int_isvector.h b/2.3-1/src/c/elementaryFunctions/interfaces/int_isvector.h new file mode 100644 index 00000000..6d943bd3 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/interfaces/int_isvector.h @@ -0,0 +1,26 @@ + /*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: Abhinav Dronamraju + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + + + +#ifndef __INT_ISVECTOR_H__ +#define __INT_ISVECTOR_H__ + +#define d2isvectorg0(in, size ) disvectora(in, size[0]) +#define d0isvectorg0(in) disvectors(in) +#define s2isvectorg0(in , size) sisvectora(in, size[0]) +#define s0isvectorg0(in) sisvectors(in) +#define g2isvectorg0(in, size) gisvectora(in, size[0]) +#define g0isvectorg0(in) gisvectors(in) +#define z2isvectorg0(in, size) zisvectora(in , size[0]) +#define z0isvectorg0(in) zisvectors(in) + + +#endif diff --git a/2.3-1/src/c/elementaryFunctions/isvector/disvectora.c b/2.3-1/src/c/elementaryFunctions/isvector/disvectora.c new file mode 100644 index 00000000..3c41027f --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/isvector/disvectora.c @@ -0,0 +1,23 @@ +/* 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: Abhinav Dronamraju + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include <stdio.h> +#include <stdlib.h> +#include <math.h> +#include "isvector.h" +#include "types.h" +char disvectora(double* inp, int size1) +{ + if(size1 ==1) + return 'T'; + return 'F'; +} diff --git a/2.3-1/src/c/elementaryFunctions/isvector/disvectors.c b/2.3-1/src/c/elementaryFunctions/isvector/disvectors.c new file mode 100644 index 00000000..703e6673 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/isvector/disvectors.c @@ -0,0 +1,24 @@ +/* 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: Abhinav Dronamraju + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include <stdio.h> +#include <stdlib.h> +#include <math.h> +#include "isvector.h" +#include "types.h" + +char disvectors(double inp) +{ + double out='F'; + + return out; +} diff --git a/2.3-1/src/c/elementaryFunctions/isvector/gisvectora.c b/2.3-1/src/c/elementaryFunctions/isvector/gisvectora.c new file mode 100644 index 00000000..d2e261e9 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/isvector/gisvectora.c @@ -0,0 +1,24 @@ +/* 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: Abhinav Dronamraju + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include <stdio.h> +#include <stdlib.h> +#include <math.h> +#include "isvector.h" +#include "types.h" +#include "string.h" +char gisvectora(char *inp, int size1) +{ + if(size1 ==1) + return 'T'; + return 'F'; +} diff --git a/2.3-1/src/c/elementaryFunctions/isvector/gisvectors.c b/2.3-1/src/c/elementaryFunctions/isvector/gisvectors.c new file mode 100644 index 00000000..72118603 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/isvector/gisvectors.c @@ -0,0 +1,24 @@ +/* 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: Abhinav Dronamraju + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include <stdio.h> +#include <stdlib.h> +#include <math.h> +#include "isvector.h" +#include "types.h" + +char gisvectors(char inp) +{ + char out='F'; + + return out; +} diff --git a/2.3-1/src/c/elementaryFunctions/isvector/sisvectora.c b/2.3-1/src/c/elementaryFunctions/isvector/sisvectora.c new file mode 100644 index 00000000..09ad6515 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/isvector/sisvectora.c @@ -0,0 +1,23 @@ +/* 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: Abhinav Dronamraju + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include <stdio.h> +#include <stdlib.h> +#include <math.h> +#include "isvector.h" +#include "types.h" +char sisvectora(float* inp, int size1) +{ + if(size1 ==1) + return 'T'; + return 'F'; +} diff --git a/2.3-1/src/c/elementaryFunctions/isvector/sisvectors.c b/2.3-1/src/c/elementaryFunctions/isvector/sisvectors.c new file mode 100644 index 00000000..019bd464 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/isvector/sisvectors.c @@ -0,0 +1,24 @@ +/* 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: Abhinav Dronamraju + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include <stdio.h> +#include <stdlib.h> +#include <math.h> +#include "isvector.h" +#include "types.h" + +char sisvectors(float inp) +{ + char out='F'; + + return out; +} diff --git a/2.3-1/src/c/elementaryFunctions/isvector/zisvectora.c b/2.3-1/src/c/elementaryFunctions/isvector/zisvectora.c new file mode 100644 index 00000000..fba78124 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/isvector/zisvectora.c @@ -0,0 +1,25 @@ +/* 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: Abhinav Dronamraju + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include <stdio.h> +#include <stdlib.h> +#include <math.h> +#include "doubleComplex.h" +#include "isvector.h" +#include "types.h" + +char zisvectora(doubleComplex *inp, int size1) +{ + if(size1 ==1) + return 'T'; + return 'F'; +} diff --git a/2.3-1/src/c/elementaryFunctions/isvector/zisvectors.c b/2.3-1/src/c/elementaryFunctions/isvector/zisvectors.c new file mode 100644 index 00000000..bc9e5ce6 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/isvector/zisvectors.c @@ -0,0 +1,25 @@ +/* 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: Abhinav Dronamraju + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include <stdio.h> +#include <stdlib.h> +#include <math.h> +#include "isvector.h" +#include "types.h" +#include "doubleComplex.h" + +char zisvectors(doubleComplex inp) +{ + char out='F'; + + return out; +} diff --git a/2.3-1/src/c/matrixOperations/includes/nnz.h b/2.3-1/src/c/matrixOperations/includes/nnz.h new file mode 100644 index 00000000..c7d2d491 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/includes/nnz.h @@ -0,0 +1,37 @@ +/* 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: Abhinav Dronamraju + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + + +#ifndef __NNZ_H__ +#define __NNZ_H__ + +#include "types.h" +#include "doubleComplex.h" +#include "uint16.h" + +#ifdef __cplusplus +extern "C" { +#endif + +uint16 dnnza(double* , int , int); +uint16 dnnzs(double); +uint16 snnza( float* , int , int); +uint16 snnzs( float); +uint16 znnza(doubleComplex *, int , int); +uint16 znnzs(doubleComplex); + + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /*__NNZ_H__*/ diff --git a/2.3-1/src/c/matrixOperations/interfaces/int_nnz.h b/2.3-1/src/c/matrixOperations/interfaces/int_nnz.h new file mode 100644 index 00000000..0ef39536 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/interfaces/int_nnz.h @@ -0,0 +1,35 @@ +/* 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: Abhinav Dronamraju + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#ifndef __INT_NNZ_H__ +#define __INT_NNZ_H__ + + +#ifdef __cplusplus +extern "C" { +#endif + +#define d2nnzu160(in1, size) dnnza(in1, size[0], size[1]) +#define d0nnzu160(in) dnnzs(in) + +#define s2nnzu160(in1, size) snnza(in1, size[0], size[1]) +#define s0nnzu160(in) snnzs(in) + +#define z2nnzu160(in1, size) znnza(in1, size[0], size[1]) +#define z0nnzu160(in) znnzs(in) + + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /*__INT_NNZ_H__*/ diff --git a/2.3-1/src/c/matrixOperations/nnz/dnnza.c b/2.3-1/src/c/matrixOperations/nnz/dnnza.c new file mode 100644 index 00000000..b4d40bd8 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/nnz/dnnza.c @@ -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: Abhinav Dronamraju + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +/*Function returns cumulative sum of members of array/matrix*/ + +#include "nnz.h" +#include "types.h" +#include "uint16.h" + +uint16 dnnza(double *in, int irow, int icolumn) +{ + int i; + uint16 final=0; + for(i=0; i< irow*icolumn ; i++) + { + if( in[i] != 0) + { + final++; + + } + + } +return final; +} diff --git a/2.3-1/src/c/matrixOperations/nnz/dnnzs.c b/2.3-1/src/c/matrixOperations/nnz/dnnzs.c new file mode 100644 index 00000000..c878d331 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/nnz/dnnzs.c @@ -0,0 +1,25 @@ +/* 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: Abhinav Dronamraju + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +/*Function returns cumulative sum of members of array/matrix*/ + +#include "nnz.h" +#include "types.h" +#include "uint16.h" + +uint16 dnnzs(double in) +{ + if(in !=0) + return 1; + else + return 0; +} diff --git a/2.3-1/src/c/matrixOperations/nnz/snnza.c b/2.3-1/src/c/matrixOperations/nnz/snnza.c new file mode 100644 index 00000000..df27f0fe --- /dev/null +++ b/2.3-1/src/c/matrixOperations/nnz/snnza.c @@ -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: Abhinav Dronamraju + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +/*Function returns cumulative sum of members of array/matrix*/ + +#include "nnz.h" +#include "types.h" +#include "uint16.h" + +uint16 snnza(float*in, int irow, int icolumn) +{ + int i; + uint16 final=0; + for(i=0; i< irow*icolumn ; i++) + { + if( in[i] != 0) + { + final++; + + } + + } +return final; +} diff --git a/2.3-1/src/c/matrixOperations/nnz/snnzs.c b/2.3-1/src/c/matrixOperations/nnz/snnzs.c new file mode 100644 index 00000000..674d4fac --- /dev/null +++ b/2.3-1/src/c/matrixOperations/nnz/snnzs.c @@ -0,0 +1,25 @@ +/* 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: Abhinav Dronamraju + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +/*Function returns cumulative sum of members of array/matrix*/ + +#include "nnz.h" +#include "types.h" +#include "uint16.h" + +uint16 snnzs(float in) +{ + if(in !=0) + return 1; + else + return 0; +} diff --git a/2.3-1/src/c/matrixOperations/nnz/znnza.c b/2.3-1/src/c/matrixOperations/nnz/znnza.c new file mode 100644 index 00000000..3b913e8b --- /dev/null +++ b/2.3-1/src/c/matrixOperations/nnz/znnza.c @@ -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: Abhinav Dronamraju + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +/*Function returns cumulative sum of members of array/matrix*/ + +#include "nnz.h" +#include "types.h" +#include "uint16.h" +#include "doubleComplex.h" +uint16 znnza(doubleComplex* in, int irow, int icolumn) +{ + int i; + uint16 final=0; + for(i=0; i< irow*icolumn ; i++) + { + if(( zreals(in[i]) !=0 )||( zimags(in[i])!=0)) + { + final++; + + } + + } +return final; +} diff --git a/2.3-1/src/c/matrixOperations/nnz/znnzs.c b/2.3-1/src/c/matrixOperations/nnz/znnzs.c new file mode 100644 index 00000000..2907afcf --- /dev/null +++ b/2.3-1/src/c/matrixOperations/nnz/znnzs.c @@ -0,0 +1,26 @@ +/* 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: Abhinav Dronamraju + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +/*Function returns cumulative sum of members of array/matrix*/ + +#include "nnz.h" +#include "types.h" +#include "uint16.h" +#include "doubleComplex.h" + +uint16 znnzs(doubleComplex in) +{ + if((zreals(in)== 0 ) && (zimags(in)==0)) + return 0; + else + return 1; +} |