diff options
author | siddhu8990 | 2015-11-28 02:14:11 +0530 |
---|---|---|
committer | siddhu8990 | 2015-11-28 02:14:11 +0530 |
commit | fd8c4f9bc0763e85c16a59c7639803fd09663281 (patch) | |
tree | c3edb6c759627babbde74657e678c3bd1b96e8ed /2.3-1/src/c/statisticsFunctions | |
parent | 3bcc8ce62560f36eaaab0e064b169b0118f354f3 (diff) | |
parent | fc6021634482f01e2eb7a485717b2bc3cd6355f3 (diff) | |
download | Scilab2C-fd8c4f9bc0763e85c16a59c7639803fd09663281.tar.gz Scilab2C-fd8c4f9bc0763e85c16a59c7639803fd09663281.tar.bz2 Scilab2C-fd8c4f9bc0763e85c16a59c7639803fd09663281.zip |
Merge pull request #1 from Mushirahmed/master
Files updated by Mushir merged with main branch.
Diffstat (limited to '2.3-1/src/c/statisticsFunctions')
72 files changed, 2106 insertions, 28 deletions
diff --git a/2.3-1/src/c/statisticsFunctions/includes/statMax.h b/2.3-1/src/c/statisticsFunctions/includes/statMax.h index 3538bc1a..7ac659ce 100644 --- a/2.3-1/src/c/statisticsFunctions/includes/statMax.h +++ b/2.3-1/src/c/statisticsFunctions/includes/statMax.h @@ -12,30 +12,60 @@ #ifndef __STAT_MAX_H__ #define __STAT_MAX_H__ - +//#ifndef __MAX_H__ +//#define __MAX_H__ #include "dynlib_statisticsfunctions.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif +#define max(a,b) (a>=b?a:b) + +#define maxa(a,size1,b,size2,out) {int i;\ + for (i=0;i<size1[0]*size2[1];i++) out[i]=max(a[i],b[i]);\ + } + /* -** \brief Sum of a scalar element, just returns it +** \brief max of a scalar element, just returns it */ -#define smaxs(in) in +#define smaxs(in) in #define srowmaxs(in) in #define scolumnmaxs(in) in #define smatlabmaxs(in) in /* -** \brief Sum of a scalar element, just returns it +** \brief max of a scalar element, just returns it */ -#define dmaxs(in) in +#define dmaxs(in) in #define drowmaxs(in) in #define dcolumnmaxs(in) in #define dmatlabmaxs(in) in /* +** \brief max of a scalar element, just returns it +*/ +#define u8maxs(in) (uint8)in +#define u8rowmaxs(in) (uint8)in +#define u8columnmaxs(in) (uint8)in +#define u8matlabmaxs(in) (uint8)in +#define u16maxs(in) (uint16)in +#define u16rowmaxs(in) (uint16)in +#define u16columnmaxs(in) (uint16)in +#define u16matlabmaxs(in) (uint16)in +#define i8maxs(in) (int8)in +#define i8rowmaxs(in) (int8)in +#define i8columnmaxs(in) (int8)in +#define i8matlabmaxs(in) (int8)in +#define i16maxs(in) (int16)in +#define i16rowmaxs(in) (int16)in +#define i16columnmaxs(in) (int16)in +#define i16matlabmaxs(in) (int16)in + + + +/* ** \brief Sum of a float array ** \param in the float array to process ** \param size, the size of the array @@ -55,9 +85,47 @@ EXTERN_STATFUNC double dmaxa(double *in, int size); EXTERN_STATFUNC void drowmaxa(double *in, int lines, int columns, double* out); EXTERN_STATFUNC void dcolumnmaxa(double *in, int lines, int columns, double* out); +/* +** \brief Sum of a uint8 array +** \param in the uint8 array to process +** \param size, the size of the array +** \returns the max. +*/ +EXTERN_STATFUNC uint8 u8maxa(uint8 *in, int size); +EXTERN_STATFUNC void u8rowmaxa(uint8 *in, int lines, int columns, uint8* out); +EXTERN_STATFUNC void u8columnmaxa(uint8 *in, int lines, int columns, uint8* out); + +/* +** \brief Sum of a uint16 array +** \param in the uint16 array to process +** \param size, the size of the array +** \returns the max. +*/ +EXTERN_STATFUNC uint16 u16maxa(uint16 *in, int size); +EXTERN_STATFUNC void u16rowmaxa(uint16 *in, int lines, int columns, uint16* out); +EXTERN_STATFUNC void u16columnmaxa(uint16 *in, int lines, int columns, uint16* out); + +/* +** \brief Sum of a int8 array +** \param in the int8 array to process +** \param size, the size of the array +** \returns the max. +*/ +EXTERN_STATFUNC int8 i8maxa(int8 *in, int size); +EXTERN_STATFUNC void i8rowmaxa(int8 *in, int lines, int columns, int8* out); +EXTERN_STATFUNC void i8columnmaxa(int8 *in, int lines, int columns, int8* out); + +/* +** \brief Sum of a int16 array +** \param in the int16 array to process +** \param size, the size of the array +** \returns the max. +*/ +EXTERN_STATFUNC int16 i16maxa(int16 *in, int size); +EXTERN_STATFUNC void i16rowmaxa(int16 *in, int lines, int columns, int16* out); +EXTERN_STATFUNC void i16columnmaxa(int16 *in, int lines, int columns, int16* out); + #ifdef __cplusplus } /* extern "C" */ #endif - - #endif /* !__STAT_MAX_H__ */ diff --git a/2.3-1/src/c/statisticsFunctions/includes/statMin.h b/2.3-1/src/c/statisticsFunctions/includes/statMin.h index 9528d9f4..4381abd1 100644 --- a/2.3-1/src/c/statisticsFunctions/includes/statMin.h +++ b/2.3-1/src/c/statisticsFunctions/includes/statMin.h @@ -12,30 +12,60 @@ #ifndef __STAT_MIN_H__ #define __STAT_MIN_H__ - +//#ifndef __MIN_H__ +//#define __MIN_H__ #include "dynlib_statisticsfunctions.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif +#define min(a,b) (a<=b?a:b) + +#define mina(a,size1,b,size2,out) {int i;\ + for (i=0;i<size1[0]*size2[1];i++) out[i]=min(a[i],b[i]);\ + } + /* -** \brief Sum of a scalar element, just returns it +** \brief min of a scalar element, just returns it */ #define smins(in) in #define srowmins(in) in -#define scolumnmins(in) in +#define scolumnmins(in) in #define smatlabmins(in) in /* -** \brief Sum of a scalar element, just returns it +** \brief min of a scalar element, just returns it */ #define dmins(in) in #define drowmins(in) in -#define dcolumnmins(in) in +#define dcolumnmins(in) in #define dmatlabmins(in) in /* +** \brief min of a scalar element, just returns it +*/ +#define u8mins(in) (uint8)in +#define u8rowmins(in) (uint8)in +#define u8columnmins(in) (uint8)in +#define u8matlabmins(in) (uint8)in +#define u16mins(in) (uint16)in +#define u16rowmins(in) (uint16)in +#define u16columnmins(in) (uint16)in +#define u16matlabmins(in) (uint16)in +#define i8mins(in) (int8)in +#define i8rowmins(in) (int8)in +#define i8columnmins(in) (int8)in +#define i8matlabmins(in) (int8)in +#define i16mins(in) (int16)in +#define i16rowmins(in) (int16)in +#define i16columnmins(in) (int16)in +#define i16matlabmins(in) (int16)in + + + +/* ** \brief Sum of a float array ** \param in the float array to process ** \param size, the size of the array @@ -55,9 +85,47 @@ EXTERN_STATFUNC double dmina(double *in, int size); EXTERN_STATFUNC void drowmina(double *in, int lines, int columns, double* out); EXTERN_STATFUNC void dcolumnmina(double *in, int lines, int columns, double* out); +/* +** \brief Sum of a uint8 array +** \param in the uint8 array to process +** \param size, the size of the array +** \returns the min. +*/ +EXTERN_STATFUNC uint8 u8mina(uint8 *in, int size); +EXTERN_STATFUNC void u8rowmina(uint8 *in, int lines, int columns, uint8* out); +EXTERN_STATFUNC void u8columnmina(uint8 *in, int lines, int columns, uint8* out); + +/* +** \brief Sum of a uint16 array +** \param in the uint16 array to process +** \param size, the size of the array +** \returns the min. +*/ +EXTERN_STATFUNC uint16 u16mina(uint16 *in, int size); +EXTERN_STATFUNC void u16rowmina(uint16 *in, int lines, int columns, uint16* out); +EXTERN_STATFUNC void u16columnmina(uint16 *in, int lines, int columns, uint16* out); + +/* +** \brief Sum of a int8 array +** \param in the int8 array to process +** \param size, the size of the array +** \returns the min. +*/ +EXTERN_STATFUNC int8 i8mina(int8 *in, int size); +EXTERN_STATFUNC void i8rowmina(int8 *in, int lines, int columns, int8* out); +EXTERN_STATFUNC void i8columnmina(int8 *in, int lines, int columns, int8* out); + +/* +** \brief Sum of a int16 array +** \param in the int16 array to process +** \param size, the size of the array +** \returns the min. +*/ +EXTERN_STATFUNC int16 i16mina(int16 *in, int size); +EXTERN_STATFUNC void i16rowmina(int16 *in, int lines, int columns, int16* out); +EXTERN_STATFUNC void i16columnmina(int16 *in, int lines, int columns, int16* out); + #ifdef __cplusplus } /* extern "C" */ #endif - - #endif /* !__STAT_MIN_H__ */ diff --git a/2.3-1/src/c/statisticsFunctions/interfaces/int_statMax.h b/2.3-1/src/c/statisticsFunctions/interfaces/int_statMax.h new file mode 100644 index 00000000..6d28186b --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/interfaces/int_statMax.h @@ -0,0 +1,161 @@ +/* + * 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 + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_STATMAX_H__ +#define __INT_STATMAX_H__ +//#ifndef __INT_MAX_H__ +//#define __INT_MAX_H__ + +#define s0maxs0(in) in + +#define d0maxd0(in) in + +#define u80maxu80(in) (uint8)in + +#define u160maxu160(in) (uint16)in + +#define i80maxi80(in) (int8)in + +#define i160maxi160(in) (int16)in + +#define s2maxs0(in,size) smaxa(in, size[0]*size[1]) + +#define d2maxd0(in,size) dmaxa(in, size[0]*size[1]) + +#define c2maxc0(in,size) cmaxa(in, size[0]*size[1]) + +#define z2maxz0(in,size) zmaxa(in, size[0]*size[1]) + +#define u82maxu80(in,size) u8maxa(in, size[0]*size[1]) + +#define u162maxu160(in,size) u16maxa(in, size[0]*size[1]) + +#define i82maxi80(in,size) i8maxa(in, size[0]*size[1]) + +#define i162maxi160(in,size) i16maxa(in, size[0]*size[1]) + + + +#define s0s0maxs0(in1,in2) max(in1,in2) + +#define d0d0maxd0(in1,in2) max(in1,in2) + +#define u80u80maxu80(in1,in2) max(in1,in2) + +#define u160u160maxu160(in1,in2) max(in1,in2) + +#define i80i80maxi80(in1,in2) max(in1,in2) + +#define i160i160maxi160(in1,in2) max(in1,in2) + +#define s2s2maxs2(in1,size1,in2,size2,out) maxa(in1, size1, in2, size2, out) + +#define d2d2maxd2(in1,size1,in2,size2,out) maxa(in1, size1, in2, size2, out) + +#define u82u82maxu82(in1,size1,in2,size2,out) maxa(in1, size1, in2, size2, out) + +#define u162u162maxu162(in1,size1,in2,size2,out) maxa(in1, size1, in2, size2, out) + +#define i82i82maxi82(in1,size1,in2,size2,out) maxa(in1, size1, in2, size2, out) + +#define i162i162maxi162(in1,size1,in2,size2,out) maxa(in1, size1, in2, size2, out) + + +#define s2s0maxs2(in1,size,in2,out) {int i;\ + for (i=0;i<size[0]*size[1];i++) out[i]=max(in1[i],in2);\ + } + +#define d2d0maxd2(in1,size,in2,out) {int i;\ + for (i=0;i<size[0]*size[1];i++) out[i]=max(in1[i],in2);\ + } + +#define u82u80maxu82(in1,size,in2,out) {int i;\ + for (i=0;i<size[0]*size[1];i++) out[i]=max(in1[i],in2);\ + } + +#define u162u160maxu162(in1,size,in2,out) {int i;\ + for (i=0;i<size[0]*size[1];i++) out[i]=max(in1[i],in2);\ + } + +#define i82i80maxi82(in1,size,in2,out) {int i;\ + for (i=0;i<size[0]*size[1];i++) out[i]=max(in1[i],in2);\ + } + +#define i162i160maxi162(in1,size,in2,out) {int i;\ + for (i=0;i<size[0]*size[1];i++) out[i]=max(in1[i],in2);\ + } + +#define s0s2maxs2(in1,in2,size,out) {int i;\ + for (i=0;i<size[0]*size[1];i++) out[i]=max(in1,in2[i]);\ + } + +#define d0d2maxd2(in1,in2,size,out) {int i;\ + for (i=0;i<size[0]*size[1];i++) out[i]=max(in1,in2[i]);\ + } + +#define u80u82maxu82(in1,in2,size,out) {int i;\ + for (i=0;i<size[0]*size[1];i++) out[i]=max(in1,in2[i]);\ + } + +#define u160u162maxu162(in1,in2,size,out) {int i;\ + for (i=0;i<size[0]*size[1];i++) out[i]=max(in1,in2[i]);\ + } + +#define i80i82maxi82(in1,in2,size,out) {int i;\ + for (i=0;i<size[0]*size[1];i++) out[i]=max(in1,in2[i]);\ + } + +#define i160i162maxi162(in1,in2,size,out) {int i;\ + for (i=0;i<size[0]*size[1];i++) out[i]=max(in1,in2[i]);\ + } + +/*'r' and 'c' case */ +#define s0g2maxs0(in1,in2,size2) (in2[0]=='r') ? srowmaxs(in1) : scolumnmaxs(in1) + +#define d0g2maxd0(in1,in2,size2) (in2[0]=='r') ? drowmaxs(in1) : dcolumnmaxs(in1) + +#define c0g2maxc0(in1,in2,size2) (in2[0]=='r') ? crowmaxs(in1) : ccolumnmaxs(in1) + +#define z0g2maxz0(in1,in2,size2) (in2[0]=='r') ? zrowmaxs(in1) : zcolumnmaxs(in1) + +#define u80g2maxu80(in1,in2,size2) (in2[0]=='r') ? u8rowmaxs(in1) : u8columnmaxs(in1) + +#define u160g2maxu160(in1,in2,size2) (in2[0]=='r') ? u16rowmaxs(in1) : u16columnmaxs(in1) + +#define i80g2maxi80(in1,in2,size2) (in2[0]=='r') ? i8rowmaxs(in1) : i8columnmaxs(in1) + +#define i160g2maxi160(in1,in2,size2) (in2[0]=='r') ? i16rowmaxs(in1) : i16columnmaxs(in1) + + +#define s2g2maxs2(in1,size1,in2,size2,out) (in2[0]=='r') ? srowmaxa(in1,size1[0],size1[1],out) : scolumnmaxa(in1,size1[0],size1[1],out) + +#define d2g2maxd2(in1,size1,in2,size2,out) (in2[0]=='r') ? drowmaxa(in1,size1[0],size1[1],out) : dcolumnmaxa(in1,size1[0],size1[1],out) + +#define c2g2maxc2(in1,size1,in2,size2,out) (in2[0]=='r') ? crowmaxa(in1,size1[0],size1[1],out) : ccolumnmaxa(in1,size1[0],size1[1],out) + +#define z2g2maxz2(in1,size1,in2,size2,out) (in2[0]=='r') ? zrowmaxa(in1,size1[0],size1[1],out) : zcolumnmaxa(in1,size1[0],size1[1],out) + +#define u82g2maxu82(in1,size1,in2,size2,out) (in2[0]=='r') ? u8rowmaxa(in1,size1[0],size1[1],out) : u8columnmaxa(in1,size1[0],size1[1],out) + +#define u162g2maxu162(in1,size1,in2,size2,out) (in2[0]=='r') ? u16rowmaxa(in1,size1[0],size1[1],out) : u16columnmaxa(in1,size1[0],size1[1],out) + +#define i82g2maxi82(in1,size1,in2,size2,out) (in2[0]=='r') ? i8rowmaxa(in1,size1[0],size1[1],out) : i8columnmaxa(in1,size1[0],size1[1],out) + +#define i162g2maxi162(in1,size1,in2,size2,out) (in2[0]=='r') ? i16rowmaxa(in1,size1[0],size1[1],out) : i16columnmaxa(in1,size1[0],size1[1],out) + + + + + +#endif /* !__INT_STATMAX_H__ */ diff --git a/2.3-1/src/c/statisticsFunctions/interfaces/int_statMin.h b/2.3-1/src/c/statisticsFunctions/interfaces/int_statMin.h new file mode 100644 index 00000000..39187efe --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/interfaces/int_statMin.h @@ -0,0 +1,162 @@ +/* + * 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 + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_STATMIN_H__ +#define __INT_STATMIN_H__ +//#ifndef __INT_MIN_H__ +//#define __INT_MIN_H__ + +#define s0mins0(in) in + +#define d0mind0(in) in + +#define u80minu80(in) (uint8)in + +#define u160minu160(in) (uint16)in + +#define i80mini80(in) (int8)in + +#define i160mini160(in) (int16)in + +#define s2mins0(in,size) smina(in, size[0]*size[1]) + +#define d2mind0(in,size) dmina(in, size[0]*size[1]) + +#define c2minc0(in,size) cmina(in, size[0]*size[1]) + +#define z2minz0(in,size) zmina(in, size[0]*size[1]) + +#define u82minu80(in,size) u8mina(in, size[0]*size[1]) + +#define u162minu160(in,size) u16mina(in, size[0]*size[1]) + +#define i82mini80(in,size) i8mina(in, size[0]*size[1]) + +#define i162mini160(in,size) i16mina(in, size[0]*size[1]) + + + +#define s0s0mins0(in1,in2) min(in1,in2) + +#define d0d0mind0(in1,in2) min(in1,in2) + +#define u80u80minu80(in1,in2) min(in1,in2) + +#define u160u160minu160(in1,in2) min(in1,in2) + +#define i80i80mini80(in1,in2) min(in1,in2) + +#define i160i160mini160(in1,in2) min(in1,in2) + +#define s2s2mins2(in1,size1,in2,size2,out) mina(in1, size1, in2, size2, out) + +#define d2d2mind2(in1,size1,in2,size2,out) mina(in1, size1, in2, size2, out) + +#define u82u82minu82(in1,size1,in2,size2,out) mina(in1, size1, in2, size2, out) + +#define u162u162minu162(in1,size1,in2,size2,out) mina(in1, size1, in2, size2, out) + +#define i82i82mini82(in1,size1,in2,size2,out) mina(in1, size1, in2, size2, out) + +#define i162i162mini162(in1,size1,in2,size2,out) mina(in1, size1, in2, size2, out) + + +#define s2s0mins2(in1,size,in2,out) {int i;\ + for (i=0;i<size[0]*size[1];i++) out[i]=min(in1[i],in2);\ + } + +#define d2d0mind2(in1,size,in2,out) {int i;\ + for (i=0;i<size[0]*size[1];i++) out[i]=min(in1[i],in2);\ + } + +#define u82u80minu82(in1,size,in2,out) {int i;\ + for (i=0;i<size[0]*size[1];i++) out[i]=min(in1[i],in2);\ + } + +#define u162u160minu162(in1,size,in2,out) {int i;\ + for (i=0;i<size[0]*size[1];i++) out[i]=min(in1[i],in2);\ + } + +#define i82i80mini82(in1,size,in2,out) {int i;\ + for (i=0;i<size[0]*size[1];i++) out[i]=min(in1[i],in2);\ + } + +#define i162i160mini162(in1,size,in2,out) {int i;\ + for (i=0;i<size[0]*size[1];i++) out[i]=min(in1[i],in2);\ + } + +#define s0s2mins2(in1,in2,size,out) {int i;\ + for (i=0;i<size[0]*size[1];i++) out[i]=min(in1,in2[i]);\ + } + +#define d0d2mind2(in1,in2,size,out) {int i;\ + for (i=0;i<size[0]*size[1];i++) out[i]=min(in1,in2[i]);\ + } + +#define u80u82minu82(in1,in2,size,out) {int i;\ + for (i=0;i<size[0]*size[1];i++) out[i]=min(in1,in2[i]);\ + } + +#define u160u162minu162(in1,in2,size,out) {int i;\ + for (i=0;i<size[0]*size[1];i++) out[i]=min(in1,in2[i]);\ + } + +#define i80i82mini82(in1,in2,size,out) {int i;\ + for (i=0;i<size[0]*size[1];i++) out[i]=min(in1,in2[i]);\ + } + +#define i160i162mini162(in1,in2,size,out) {int i;\ + for (i=0;i<size[0]*size[1];i++) out[i]=min(in1,in2[i]);\ + } + + +/*'r' and 'c' case */ +#define s0g2mins0(in1,in2,size2) (in2[0]=='r') ? srowmins(in1) : scolumnmins(in1) + +#define d0g2mind0(in1,in2,size2) (in2[0]=='r') ? drowmins(in1) : dcolumnmins(in1) + +#define c0g2minc0(in1,in2,size2) (in2[0]=='r') ? crowmins(in1) : ccolumnmins(in1) + +#define z0g2minz0(in1,in2,size2) (in2[0]=='r') ? zrowmins(in1) : zcolumnmins(in1) + +#define u80g2minu80(in1,in2,size2) (in2[0]=='r') ? u8rowmins(in1) : u8columnmins(in1) + +#define u160g2minu160(in1,in2,size2) (in2[0]=='r') ? u16rowmins(in1) : u16columnmins(in1) + +#define i80g2mini80(in1,in2,size2) (in2[0]=='r') ? i8rowmins(in1) : i8columnmins(in1) + +#define i160g2mini160(in1,in2,size2) (in2[0]=='r') ? i16rowmins(in1) : i16columnmins(in1) + + +#define s2g2mins2(in1,size,in2,size2,out) (in2[0]=='r') ? srowmina(in1,size[0],size[1],out) : scolumnmina(in1,size[0],size[1],out) + +#define d2g2mind2(in1,size,in2,size2,out) (in2[0]=='r') ? drowmina(in1,size[0],size[1],out) : dcolumnmina(in1,size[0],size[1],out) + +#define c2g2minc2(in1,size,in2,size2,out) (in2[0]=='r') ? crowmina(in1,size[0],size[1],out) : ccolumnmina(in1,size[0],size[1],out) + +#define z2g2minz2(in1,size,in2,size2,out) (in2[0]=='r') ? zrowmina(in1,size[0],size[1],out) : zcolumnmina(in1,size[0],size[1],out) + +#define u82g2minu82(in1,size,in2,size2,out) (in2[0]=='r') ? u8rowmina(in1,size[0],size[1],out) : u8columnmina(in1,size[0],size[1],out) + +#define u162g2minu162(in1,size,in2,size2,out) (in2[0]=='r') ? u16rowmina(in1,size[0],size[1],out) : u16columnmina(in1,size[0],size[1],out) + +#define i82g2mini82(in1,size,in2,size2,out) (in2[0]=='r') ? i8rowmina(in1,size[0],size[1],out) : i8columnmina(in1,size[0],size[1],out) + +#define i162g2mini162(in1,size,in2,size2,out) (in2[0]=='r') ? i16rowmina(in1,size[0],size[1],out) : i16columnmina(in1,size[0],size[1],out) + + + + + +#endif /* !__INT_STATMIN_H__ */ diff --git a/2.3-1/src/c/statisticsFunctions/max/dcolumnmaxa.c b/2.3-1/src/c/statisticsFunctions/max/dcolumnmaxa.c index ae0bbd47..e66422a2 100644 --- a/2.3-1/src/c/statisticsFunctions/max/dcolumnmaxa.c +++ b/2.3-1/src/c/statisticsFunctions/max/dcolumnmaxa.c @@ -11,14 +11,16 @@ */ #include "statMax.h" +//#include "max.h" void dcolumnmaxa(double *in, int rows, int columns, double* out) { int i = 0, j = 0; for (i = 0; i < rows; i++) { - out[i]=in[i]; + out[i]=in[i*columns]; for (j=0;j<columns;j++) - if (in[i+j*rows]>out[i]) out[i] = in[i+j*rows]; + if (in[i+j*rows]>out[i]) + out[i] = in[i+j*rows]; } } diff --git a/2.3-1/src/c/statisticsFunctions/max/dcolumnmaxa.c~ b/2.3-1/src/c/statisticsFunctions/max/dcolumnmaxa.c~ new file mode 100644 index 00000000..e66422a2 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/max/dcolumnmaxa.c~ @@ -0,0 +1,26 @@ +/* + * 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 + * + */ + +#include "statMax.h" +//#include "max.h" + +void dcolumnmaxa(double *in, int rows, int columns, double* out) { + int i = 0, j = 0; + + for (i = 0; i < rows; i++) { + out[i]=in[i*columns]; + for (j=0;j<columns;j++) + if (in[i+j*rows]>out[i]) + out[i] = in[i+j*rows]; + } + +} diff --git a/2.3-1/src/c/statisticsFunctions/max/dmaxa.c b/2.3-1/src/c/statisticsFunctions/max/dmaxa.c index 5e2145e3..63644635 100644 --- a/2.3-1/src/c/statisticsFunctions/max/dmaxa.c +++ b/2.3-1/src/c/statisticsFunctions/max/dmaxa.c @@ -11,14 +11,15 @@ */ #include "statMax.h" - +//#include "max.h" double dmaxa(double *in, int size) { double out = in[0]; int i = 0; for (i = 1; i < size; ++i) { - if (in[i]>out) out = in[i]; + if (in[i]>out) + out = in[i]; } return out; diff --git a/2.3-1/src/c/statisticsFunctions/max/dmaxa.c~ b/2.3-1/src/c/statisticsFunctions/max/dmaxa.c~ new file mode 100644 index 00000000..931c0d2d --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/max/dmaxa.c~ @@ -0,0 +1,25 @@ +/* + * 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 + * + */ + +#include "statMax.h" +//#include "max.h" +double dmaxa(double *in, int size) { + double out = in[0]; + int i = 0; + + for (i = 1; i < size; ++i) + { + if (in[i]>out) out = in[i]; + } + return out; + +} diff --git a/2.3-1/src/c/statisticsFunctions/max/drowmaxa.c b/2.3-1/src/c/statisticsFunctions/max/drowmaxa.c index a3099231..db0c72c0 100644 --- a/2.3-1/src/c/statisticsFunctions/max/drowmaxa.c +++ b/2.3-1/src/c/statisticsFunctions/max/drowmaxa.c @@ -11,13 +11,14 @@ */ #include "statMax.h" - +//#include "max.h" void drowmaxa(double *in, int rows, int columns, double* out) { int i = 0, j = 0; - - for (i = 0; i < columns; i++) { + for (i = 0; i < columns; i++) + { out[i]=in[i*rows]; for (j = 1 ; j < rows ; j++) - if (in[i*rows+j]>out[i]) out[i] = in[i*rows+j]; + if (in[i*rows+j]>out[i]) + out[i] = in[i*rows+j]; } } diff --git a/2.3-1/src/c/statisticsFunctions/max/drowmaxa.c~ b/2.3-1/src/c/statisticsFunctions/max/drowmaxa.c~ new file mode 100644 index 00000000..db0c72c0 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/max/drowmaxa.c~ @@ -0,0 +1,24 @@ +/* + * 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 + * + */ + +#include "statMax.h" +//#include "max.h" +void drowmaxa(double *in, int rows, int columns, double* out) { + int i = 0, j = 0; + for (i = 0; i < columns; i++) + { + out[i]=in[i*rows]; + for (j = 1 ; j < rows ; j++) + if (in[i*rows+j]>out[i]) + out[i] = in[i*rows+j]; + } +} diff --git a/2.3-1/src/c/statisticsFunctions/max/i16columnmaxa.c b/2.3-1/src/c/statisticsFunctions/max/i16columnmaxa.c new file mode 100644 index 00000000..94c5cf6a --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/max/i16columnmaxa.c @@ -0,0 +1,25 @@ +/* + * 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 + * + */ + +#include "statMax.h" +//#include "max.h" +void i16columnmaxa(int16 *in, int rows, int columns, int16* out) { + int i = 0, j = 0; + + for (i = 0; i < rows; i++) { + out[i]=(int16)in[i*columns]; + for (j=0;j<columns;j++) + if (in[i+j*rows]>out[i]) + out[i] = (int16)in[i+j*rows]; + } + +} diff --git a/2.3-1/src/c/statisticsFunctions/max/i16columnmaxa.c~ b/2.3-1/src/c/statisticsFunctions/max/i16columnmaxa.c~ new file mode 100644 index 00000000..94c5cf6a --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/max/i16columnmaxa.c~ @@ -0,0 +1,25 @@ +/* + * 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 + * + */ + +#include "statMax.h" +//#include "max.h" +void i16columnmaxa(int16 *in, int rows, int columns, int16* out) { + int i = 0, j = 0; + + for (i = 0; i < rows; i++) { + out[i]=(int16)in[i*columns]; + for (j=0;j<columns;j++) + if (in[i+j*rows]>out[i]) + out[i] = (int16)in[i+j*rows]; + } + +} diff --git a/2.3-1/src/c/statisticsFunctions/max/i16maxa.c b/2.3-1/src/c/statisticsFunctions/max/i16maxa.c new file mode 100644 index 00000000..c1294193 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/max/i16maxa.c @@ -0,0 +1,26 @@ +/* + * 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 + * + */ + +#include "statMax.h" +//#include "max.h" +int16 i16maxa(int16 *in, int size) { + int16 out = in[0]; + int i = 0; + + for (i = 1; i < size; ++i) + { + if (in[i]>out) + out = (int16)in[i]; + } + return out; + +} diff --git a/2.3-1/src/c/statisticsFunctions/max/i16maxa.c~ b/2.3-1/src/c/statisticsFunctions/max/i16maxa.c~ new file mode 100644 index 00000000..c1294193 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/max/i16maxa.c~ @@ -0,0 +1,26 @@ +/* + * 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 + * + */ + +#include "statMax.h" +//#include "max.h" +int16 i16maxa(int16 *in, int size) { + int16 out = in[0]; + int i = 0; + + for (i = 1; i < size; ++i) + { + if (in[i]>out) + out = (int16)in[i]; + } + return out; + +} diff --git a/2.3-1/src/c/statisticsFunctions/max/i16rowmaxa.c b/2.3-1/src/c/statisticsFunctions/max/i16rowmaxa.c new file mode 100644 index 00000000..263e56ca --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/max/i16rowmaxa.c @@ -0,0 +1,25 @@ +/* + * 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 + * + */ + +#include "statMax.h" +//#include "max.h" + +void i16rowmaxa(int16 *in, int rows, int columns, int16* out) { + int i = 0, j = 0; + + for (i = 0; i < columns; i++) { + out[i]=(int16)in[i*rows]; + for (j = 1 ; j < rows ; j++) + if (in[i*rows+j]>out[i]) + out[i] = (int16)in[i*rows+j]; + } +} diff --git a/2.3-1/src/c/statisticsFunctions/max/i16rowmaxa.c~ b/2.3-1/src/c/statisticsFunctions/max/i16rowmaxa.c~ new file mode 100644 index 00000000..263e56ca --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/max/i16rowmaxa.c~ @@ -0,0 +1,25 @@ +/* + * 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 + * + */ + +#include "statMax.h" +//#include "max.h" + +void i16rowmaxa(int16 *in, int rows, int columns, int16* out) { + int i = 0, j = 0; + + for (i = 0; i < columns; i++) { + out[i]=(int16)in[i*rows]; + for (j = 1 ; j < rows ; j++) + if (in[i*rows+j]>out[i]) + out[i] = (int16)in[i*rows+j]; + } +} diff --git a/2.3-1/src/c/statisticsFunctions/max/i8columnmaxa.c b/2.3-1/src/c/statisticsFunctions/max/i8columnmaxa.c new file mode 100644 index 00000000..9c214dbb --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/max/i8columnmaxa.c @@ -0,0 +1,26 @@ +/* + * 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 + * + */ + +#include "statMax.h" +//#include "max.h" + +void i8columnmaxa(int8 *in, int rows, int columns, int8* out) { + int i = 0, j = 0; + + for (i = 0; i < rows; i++) { + out[i]=(int8)in[i*columns]; + for (j=0;j<columns;j++) + if (in[i+j*rows]>out[i]) + out[i] = (int8)in[i+j*rows]; + } + +} diff --git a/2.3-1/src/c/statisticsFunctions/max/i8columnmaxa.c~ b/2.3-1/src/c/statisticsFunctions/max/i8columnmaxa.c~ new file mode 100644 index 00000000..9c214dbb --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/max/i8columnmaxa.c~ @@ -0,0 +1,26 @@ +/* + * 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 + * + */ + +#include "statMax.h" +//#include "max.h" + +void i8columnmaxa(int8 *in, int rows, int columns, int8* out) { + int i = 0, j = 0; + + for (i = 0; i < rows; i++) { + out[i]=(int8)in[i*columns]; + for (j=0;j<columns;j++) + if (in[i+j*rows]>out[i]) + out[i] = (int8)in[i+j*rows]; + } + +} diff --git a/2.3-1/src/c/statisticsFunctions/max/i8maxa.c b/2.3-1/src/c/statisticsFunctions/max/i8maxa.c new file mode 100644 index 00000000..67fd3358 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/max/i8maxa.c @@ -0,0 +1,26 @@ +/* + * 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 + * + */ +#include "statMax.h" +//#include "max.h" + +int8 i8maxa(int8 *in, int size) { + int8 out = in[0]; + int i = 0; + + for (i = 1; i < size; ++i) + { + if (in[i]>out) + out = (int8)in[i]; + } + return out; + +} diff --git a/2.3-1/src/c/statisticsFunctions/max/i8maxa.c~ b/2.3-1/src/c/statisticsFunctions/max/i8maxa.c~ new file mode 100644 index 00000000..67fd3358 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/max/i8maxa.c~ @@ -0,0 +1,26 @@ +/* + * 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 + * + */ +#include "statMax.h" +//#include "max.h" + +int8 i8maxa(int8 *in, int size) { + int8 out = in[0]; + int i = 0; + + for (i = 1; i < size; ++i) + { + if (in[i]>out) + out = (int8)in[i]; + } + return out; + +} diff --git a/2.3-1/src/c/statisticsFunctions/max/i8rowmaxa.c b/2.3-1/src/c/statisticsFunctions/max/i8rowmaxa.c new file mode 100644 index 00000000..a6d15aa3 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/max/i8rowmaxa.c @@ -0,0 +1,25 @@ +/* + * 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 + * + */ + +#include "statMax.h" +//#include "max.h" + +void i8rowmaxa(int8 *in, int rows, int columns, int8* out) { + int i = 0, j = 0; + + for (i = 0; i < columns; i++) { + out[i]=(int8)in[i*rows]; + for (j = 1 ; j < rows ; j++) + if (in[i*rows+j]>out[i]) + out[i] = (int8)in[i*rows+j]; + } +} diff --git a/2.3-1/src/c/statisticsFunctions/max/i8rowmaxa.c~ b/2.3-1/src/c/statisticsFunctions/max/i8rowmaxa.c~ new file mode 100644 index 00000000..a6d15aa3 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/max/i8rowmaxa.c~ @@ -0,0 +1,25 @@ +/* + * 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 + * + */ + +#include "statMax.h" +//#include "max.h" + +void i8rowmaxa(int8 *in, int rows, int columns, int8* out) { + int i = 0, j = 0; + + for (i = 0; i < columns; i++) { + out[i]=(int8)in[i*rows]; + for (j = 1 ; j < rows ; j++) + if (in[i*rows+j]>out[i]) + out[i] = (int8)in[i*rows+j]; + } +} diff --git a/2.3-1/src/c/statisticsFunctions/max/scolumnmaxa.c b/2.3-1/src/c/statisticsFunctions/max/scolumnmaxa.c index 71af8460..4014f88a 100644 --- a/2.3-1/src/c/statisticsFunctions/max/scolumnmaxa.c +++ b/2.3-1/src/c/statisticsFunctions/max/scolumnmaxa.c @@ -11,12 +11,13 @@ */ #include "statMax.h" +//#include "max.h" void scolumnmaxa(float *in, int rows, int columns, float* out) { int i = 0, j = 0; for (i = 0; i < rows; i++) { - out[i]=in[i]; + out[i]=in[i*columns]; for (j=0;j<columns;j++) if (in[i+j*rows]>out[i]) out[i] = in[i+j*rows]; } diff --git a/2.3-1/src/c/statisticsFunctions/max/scolumnmaxa.c~ b/2.3-1/src/c/statisticsFunctions/max/scolumnmaxa.c~ new file mode 100644 index 00000000..4014f88a --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/max/scolumnmaxa.c~ @@ -0,0 +1,25 @@ +/* + * 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 + * + */ + +#include "statMax.h" +//#include "max.h" + +void scolumnmaxa(float *in, int rows, int columns, float* out) { + int i = 0, j = 0; + + for (i = 0; i < rows; i++) { + out[i]=in[i*columns]; + for (j=0;j<columns;j++) + if (in[i+j*rows]>out[i]) out[i] = in[i+j*rows]; + } + +} diff --git a/2.3-1/src/c/statisticsFunctions/max/smaxa.c b/2.3-1/src/c/statisticsFunctions/max/smaxa.c index f47fcffe..03b4cf18 100644 --- a/2.3-1/src/c/statisticsFunctions/max/smaxa.c +++ b/2.3-1/src/c/statisticsFunctions/max/smaxa.c @@ -9,8 +9,8 @@ * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt * */ - #include "statMax.h" +//#include "max.h" float smaxa(float *in, int size) { float out = in[0]; diff --git a/2.3-1/src/c/statisticsFunctions/max/smaxa.c~ b/2.3-1/src/c/statisticsFunctions/max/smaxa.c~ new file mode 100644 index 00000000..03b4cf18 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/max/smaxa.c~ @@ -0,0 +1,25 @@ +/* + * 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 + * + */ +#include "statMax.h" +//#include "max.h" + +float smaxa(float *in, int size) { + float out = in[0]; + int i = 0; + + for (i = 1; i < size; ++i) + { + if (in[i]>out) out = in[i]; + } + return out; + +} diff --git a/2.3-1/src/c/statisticsFunctions/max/srowmaxa.c b/2.3-1/src/c/statisticsFunctions/max/srowmaxa.c index c87ccf7f..ea6c33d6 100644 --- a/2.3-1/src/c/statisticsFunctions/max/srowmaxa.c +++ b/2.3-1/src/c/statisticsFunctions/max/srowmaxa.c @@ -9,8 +9,8 @@ * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt * */ - #include "statMax.h" +//#include "max.h" void srowmaxa(float *in, int rows, int columns, float* out) { int i = 0, j = 0; diff --git a/2.3-1/src/c/statisticsFunctions/max/srowmaxa.c~ b/2.3-1/src/c/statisticsFunctions/max/srowmaxa.c~ new file mode 100644 index 00000000..ea6c33d6 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/max/srowmaxa.c~ @@ -0,0 +1,23 @@ +/* + * 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 + * + */ +#include "statMax.h" +//#include "max.h" + +void srowmaxa(float *in, int rows, int columns, float* out) { + int i = 0, j = 0; + + for (i = 0; i < columns; i++) { + out[i]=in[i*rows]; + for (j = 1 ; j < rows ; j++) + if (in[i*rows+j]>out[i]) out[i] = in[i*rows+j]; + } +} diff --git a/2.3-1/src/c/statisticsFunctions/max/testDoubleMax.c b/2.3-1/src/c/statisticsFunctions/max/testDoubleMax.c index 81c50324..883b427f 100644 --- a/2.3-1/src/c/statisticsFunctions/max/testDoubleMax.c +++ b/2.3-1/src/c/statisticsFunctions/max/testDoubleMax.c @@ -11,8 +11,8 @@ */ - #include "statMax.h" +//#include "max.h" #include "assert.h" #include "stdio.h" diff --git a/2.3-1/src/c/statisticsFunctions/max/testDoubleMax.c~ b/2.3-1/src/c/statisticsFunctions/max/testDoubleMax.c~ new file mode 100644 index 00000000..883b427f --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/max/testDoubleMax.c~ @@ -0,0 +1,93 @@ +/* + * 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 + * + */ + + +#include "statMax.h" +//#include "max.h" +#include "assert.h" +#include "stdio.h" + + +static void dmaxaTest(void){ + double in[12]={4,5,7,1,2,6,4,1,2,5,4,3}; + double out; + + out = dmaxa(in,12); + assert(out-7==0); + +} + + +static void drowmaxaTest(void){ + double in[12]={4,5,7,1,2,6,4,1,2,5,4,3}; + double result2[2]={7,5}; + double result3[3]={7,6,5}; + double result4[4]={7,6,4,5}; + double result6[6]={5,7,6,4,5,4}; + double out1[1],out2[2],out3[3],out4[4],out6[6],out12[12]; + int i; + + + drowmaxa(in,12,1,out1); + drowmaxa(in,6,2,out2); + drowmaxa(in,4,3,out3); + drowmaxa(in,3,4,out4); + drowmaxa(in,2,6,out6); + drowmaxa(in,1,12,out12); + + assert(out1[0]-7==0); + for (i=0;i<2;i++) assert(out2[i]-result2[i]==0); + for (i=0;i<3;i++) assert(out3[i]-result3[i]==0); + for (i=0;i<4;i++) assert(out4[i]-result4[i]==0); + for (i=0;i<6;i++) assert(out6[i]-result6[i]==0); + for (i=0;i<12;i++) assert(out12[i]-in[i]==0); +} + + +static void dcolumnmaxaTest(void){ + double in[12]={4,5,7,1,2,6,4,1,2,5,4,3}; + double out1[1],out2[2],out3[3],out4[4],out6[6],out12[12]; + double result2[2]={7,6}; + double result3[3]={5,5,7}; + double result4[4]={4,6,7,3}; + double result6[6]={4,5,7,5,4,6}; + int i; + + + + dcolumnmaxa(in,12,1,out12); + dcolumnmaxa(in,6,2,out6); + dcolumnmaxa(in,4,3,out4); + dcolumnmaxa(in,3,4,out3); + dcolumnmaxa(in,2,6,out2); + dcolumnmaxa(in,1,12,out1); + + assert(out1[0]-7==0); + for (i=0;i<2;i++) assert(out2[i]-result2[i]==0); + for (i=0;i<3;i++) assert(out3[i]-result3[i]==0); + for (i=0;i<4;i++) assert(out4[i]-result4[i]==0); + for (i=0;i<6;i++) assert(out6[i]-result6[i]==0); + for (i=0;i<12;i++) assert(out12[i]-in[i]==0); +} + +static int maxTest(void){ + dmaxaTest(); + drowmaxaTest(); + dcolumnmaxaTest(); + return 0; +} + + +int main(void){ + assert(maxTest()==0); + return 0; +} diff --git a/2.3-1/src/c/statisticsFunctions/max/testFloatMax.c b/2.3-1/src/c/statisticsFunctions/max/testFloatMax.c index 7741aef4..cb572f7e 100644 --- a/2.3-1/src/c/statisticsFunctions/max/testFloatMax.c +++ b/2.3-1/src/c/statisticsFunctions/max/testFloatMax.c @@ -13,6 +13,7 @@ #include "statMax.h" +//#include "max.h" #include "assert.h" #include "stdio.h" diff --git a/2.3-1/src/c/statisticsFunctions/max/testFloatMax.c~ b/2.3-1/src/c/statisticsFunctions/max/testFloatMax.c~ new file mode 100644 index 00000000..cb572f7e --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/max/testFloatMax.c~ @@ -0,0 +1,93 @@ +/* + * 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 + * + */ + + + +#include "statMax.h" +//#include "max.h" +#include "assert.h" +#include "stdio.h" + +static void smaxaTest(void){ + float in[12]={4,5,7,1,2,6,4,1,2,5,4,3}; + float out; + + out = smaxa(in,12); + assert(out-7==0); + +} + + +static void srowmaxaTest(void){ + float in[12]={4,5,7,1,2,6,4,1,2,5,4,3}; + float out1[1],out2[2],out3[3],out4[4],out6[6],out12[12]; + float result2[2]={7,5}; + float result3[3]={7,6,5}; + float result4[4]={7,6,4,5}; + float result6[6]={5,7,6,4,5,4}; + int i; + + + srowmaxa(in,12,1,out1); + srowmaxa(in,6,2,out2); + srowmaxa(in,4,3,out3); + srowmaxa(in,3,4,out4); + srowmaxa(in,2,6,out6); + srowmaxa(in,1,12,out12); + + assert(out1[0]-7==0); + for (i=0;i<2;i++) assert(out2[i]-result2[i]==0); + for (i=0;i<3;i++) assert(out3[i]-result3[i]==0); + for (i=0;i<4;i++) assert(out4[i]-result4[i]==0); + for (i=0;i<6;i++) assert(out6[i]-result6[i]==0); + for (i=0;i<12;i++) assert(out12[i]-in[i]==0); +} + + +static void scolumnmaxaTest(void){ + float in[12]={4,5,7,1,2,6,4,1,2,5,4,3}; + float out1[1],out2[2],out3[3],out4[4],out6[6],out12[12]; + float result2[2]={7,6}; + float result3[3]={5,5,7}; + float result4[4]={4,6,7,3}; + float result6[6]={4,5,7,5,4,6}; + int i; + + + + scolumnmaxa(in,12,1,out12); + scolumnmaxa(in,6,2,out6); + scolumnmaxa(in,4,3,out4); + scolumnmaxa(in,3,4,out3); + scolumnmaxa(in,2,6,out2); + scolumnmaxa(in,1,12,out1); + + assert(out1[0]-7==0); + for (i=0;i<2;i++) assert(out2[i]-result2[i]==0); + for (i=0;i<3;i++) assert(out3[i]-result3[i]==0); + for (i=0;i<4;i++) assert(out4[i]-result4[i]==0); + for (i=0;i<6;i++) assert(out6[i]-result6[i]==0); + for (i=0;i<12;i++) assert(out12[i]-in[i]==0); +} + +static int maxTest(void){ + smaxaTest(); + srowmaxaTest(); + scolumnmaxaTest(); + return 0; +} + + +int main(void){ + assert(maxTest()==0); + return 0; +} diff --git a/2.3-1/src/c/statisticsFunctions/max/u16columnmaxa.c b/2.3-1/src/c/statisticsFunctions/max/u16columnmaxa.c new file mode 100644 index 00000000..e0ccb3ae --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/max/u16columnmaxa.c @@ -0,0 +1,28 @@ +/* + * 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 + * + */ + +#include "statMax.h" + +//#include "max.h" + +void u16columnmaxa(uint16 *in, int rows, int columns, uint16* out) { + int i = 0, j = 0; + + + for (i = 0; i < rows; i++) { + out[i]=(uint16)in[i]; + for (j=0;j<columns;j++) + if (in[i+j*rows]>out[i]) + out[i] = (uint16)in[i+j*rows]; + } + +} diff --git a/2.3-1/src/c/statisticsFunctions/max/u16columnmaxa.c~ b/2.3-1/src/c/statisticsFunctions/max/u16columnmaxa.c~ new file mode 100644 index 00000000..e0ccb3ae --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/max/u16columnmaxa.c~ @@ -0,0 +1,28 @@ +/* + * 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 + * + */ + +#include "statMax.h" + +//#include "max.h" + +void u16columnmaxa(uint16 *in, int rows, int columns, uint16* out) { + int i = 0, j = 0; + + + for (i = 0; i < rows; i++) { + out[i]=(uint16)in[i]; + for (j=0;j<columns;j++) + if (in[i+j*rows]>out[i]) + out[i] = (uint16)in[i+j*rows]; + } + +} diff --git a/2.3-1/src/c/statisticsFunctions/max/u16maxa.c b/2.3-1/src/c/statisticsFunctions/max/u16maxa.c new file mode 100644 index 00000000..c3af84f6 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/max/u16maxa.c @@ -0,0 +1,26 @@ +/* + * 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 + * + */ +#include "statMax.h" +//#include "max.h" + +uint16 u16maxa(uint16 *in, int size) { + uint16 out = in[0]; + int i = 0; + + for (i = 1; i < size; ++i) + { + if (in[i]>out) + out = (uint16)in[i]; + } + return out; + +} diff --git a/2.3-1/src/c/statisticsFunctions/max/u16maxa.c~ b/2.3-1/src/c/statisticsFunctions/max/u16maxa.c~ new file mode 100644 index 00000000..c881d88a --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/max/u16maxa.c~ @@ -0,0 +1,25 @@ +/* + * 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 + * + */ +#include "statMax.h" +//#include "max.h" + +uint16 u16maxa(uint16 *in, int size) { + uint16 out = in[0]; + int i = 0; + + for (i = 1; i < size; ++i) + { + if (in[i]>out) out = (uint16)in[i]; + } + return out; + +} diff --git a/2.3-1/src/c/statisticsFunctions/max/u16rowmaxa.c b/2.3-1/src/c/statisticsFunctions/max/u16rowmaxa.c new file mode 100644 index 00000000..cef61f1d --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/max/u16rowmaxa.c @@ -0,0 +1,29 @@ +/* + * 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 + * + */ +#include "statMax.h" +//#include <stdlib.h> +//#include "max.h" + +void u16rowmaxa(uint16 *in, int rows, int columns, uint16* out) { + int i = 0, j = 0; + //out = malloc(columns*sizeof(uint16)); + for (i = 0; i < columns; i++) + { + out[i]=(uint16)in[i]; + for (j = 1 ; j < rows ; j++) + { + if (in[j*columns+i]>out[i]) + out[i] = (uint16)in[j*columns+i]; + } + } + +} diff --git a/2.3-1/src/c/statisticsFunctions/max/u16rowmaxa.c~ b/2.3-1/src/c/statisticsFunctions/max/u16rowmaxa.c~ new file mode 100644 index 00000000..7c6b6801 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/max/u16rowmaxa.c~ @@ -0,0 +1,28 @@ +/* + * 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 + * + */ +#include "statMax.h" +#include <stdlib.h> +//#include "max.h" + +void u16rowmaxa(uint16 *in, int rows, int columns, uint16* out) { + int i = 0, j = 0; + for (i = 0; i < columns; i++) + { + out[i]=(uint16)in[i]; + for (j = 1 ; j < rows ; j++) + { + if (in[j*columns+i]>out[i]) + out[i] = (uint16)in[j*columns+i]; + } + } + +} diff --git a/2.3-1/src/c/statisticsFunctions/max/u8columnmaxa.c b/2.3-1/src/c/statisticsFunctions/max/u8columnmaxa.c new file mode 100644 index 00000000..222bc291 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/max/u8columnmaxa.c @@ -0,0 +1,26 @@ +/* + * 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 + * + */ +#include "statMax.h" +//#include "max.h" + +void u8columnmaxa(uint8 *in, int rows, int columns, uint8* out) { + int i = 0, j = 0; + + for (i = 0; i < rows; i++) +{ + out[i]=(uint8)in[0]; + for (j=0;j<columns;j++) + if (in[j]>out[i]) + out[i] = (uint8)in[j]; + } + +} diff --git a/2.3-1/src/c/statisticsFunctions/max/u8columnmaxa.c~ b/2.3-1/src/c/statisticsFunctions/max/u8columnmaxa.c~ new file mode 100644 index 00000000..e7f8f0ef --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/max/u8columnmaxa.c~ @@ -0,0 +1,26 @@ +/* + * 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 + * + */ +#include "statMax.h" +//#include "max.h" + +void u8columnmaxa(uint8 *in, int rows, int columns, uint8* out) { + int i = 0, j = 0; + + for (i = 0; i < columns; i++) + { + out[i]=(uint8)in[0]; + for (j=0;j<rows;j++) + if (in[j]>out[i]) + out[i] = (uint8)in[j]; + } + +} diff --git a/2.3-1/src/c/statisticsFunctions/max/u8maxa.c b/2.3-1/src/c/statisticsFunctions/max/u8maxa.c new file mode 100644 index 00000000..3e599150 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/max/u8maxa.c @@ -0,0 +1,26 @@ +/* + * 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 + * + */ + +#include "statMax.h" +//#include "max.h" +uint8 u8maxa(uint8 *in, int size) { + uint8 out = in[0]; + int i = 0; + + for (i = 1; i < size; ++i) + { + if (in[i]>out) + out = (uint8)in[i]; + } + return out; + +} diff --git a/2.3-1/src/c/statisticsFunctions/max/u8maxa.c~ b/2.3-1/src/c/statisticsFunctions/max/u8maxa.c~ new file mode 100644 index 00000000..d9b6eca0 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/max/u8maxa.c~ @@ -0,0 +1,27 @@ +/* + * 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 + * + */ + +#include "statMax.h" +//#include "max.h" + +uint8 u8maxa(uint8 *in, int size) { + uint8 out = in[0]; + int i = 0; + + for (i = 1; i < size; ++i) + { + if (in[i]>out) + out = (uint8)in[i]; + } + return out; + +} diff --git a/2.3-1/src/c/statisticsFunctions/max/u8rowmaxa.c b/2.3-1/src/c/statisticsFunctions/max/u8rowmaxa.c new file mode 100644 index 00000000..fda293c7 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/max/u8rowmaxa.c @@ -0,0 +1,28 @@ +/* + * 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 + * + */ +#include "statMax.h" +//#include "max.h" + +void u8rowmaxa(uint8 *in, int rows, int columns, uint8* out) { + int i = 0, j = 0; + + + for (i = 0; i < columns; i++) + { + out[i]=(uint8)in[0]; + for (j = 0 ; j < rows ; j++) + { + if (in[j]>out[i]) + out[i] = (uint8)in[j]; + } + } +} diff --git a/2.3-1/src/c/statisticsFunctions/max/u8rowmaxa.c~ b/2.3-1/src/c/statisticsFunctions/max/u8rowmaxa.c~ new file mode 100644 index 00000000..fda293c7 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/max/u8rowmaxa.c~ @@ -0,0 +1,28 @@ +/* + * 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 + * + */ +#include "statMax.h" +//#include "max.h" + +void u8rowmaxa(uint8 *in, int rows, int columns, uint8* out) { + int i = 0, j = 0; + + + for (i = 0; i < columns; i++) + { + out[i]=(uint8)in[0]; + for (j = 0 ; j < rows ; j++) + { + if (in[j]>out[i]) + out[i] = (uint8)in[j]; + } + } +} diff --git a/2.3-1/src/c/statisticsFunctions/min/dcolumnmina.c b/2.3-1/src/c/statisticsFunctions/min/dcolumnmina.c index e12cb8ff..6f0b3c1a 100644 --- a/2.3-1/src/c/statisticsFunctions/min/dcolumnmina.c +++ b/2.3-1/src/c/statisticsFunctions/min/dcolumnmina.c @@ -16,7 +16,7 @@ void dcolumnmina(double *in, int rows, int columns, double* out) { int i = 0, j = 0; for (i = 0; i < rows; i++) { - out[i]=in[i]; + out[i]=in[i*columns]; for (j=0;j<columns;j++) if (in[i+j*rows]<out[i]) out[i] = in[i+j*rows]; } diff --git a/2.3-1/src/c/statisticsFunctions/min/dcolumnmina.c~ b/2.3-1/src/c/statisticsFunctions/min/dcolumnmina.c~ new file mode 100644 index 00000000..6f0b3c1a --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/min/dcolumnmina.c~ @@ -0,0 +1,24 @@ +/* + * 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 + * + */ + +#include "statMin.h" + +void dcolumnmina(double *in, int rows, int columns, double* out) { + int i = 0, j = 0; + + for (i = 0; i < rows; i++) { + out[i]=in[i*columns]; + for (j=0;j<columns;j++) + if (in[i+j*rows]<out[i]) out[i] = in[i+j*rows]; + } + +} diff --git a/2.3-1/src/c/statisticsFunctions/min/i16columnmina.c b/2.3-1/src/c/statisticsFunctions/min/i16columnmina.c new file mode 100644 index 00000000..d38b7b5d --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/min/i16columnmina.c @@ -0,0 +1,25 @@ +/* + * 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 + * + */ + +#include "statMin.h" + +void i16columnmina(int16 *in, int rows, int columns, int16* out) { + int i = 0, j = 0; + + for (i = 0; i < rows; i++) { + out[i]=(int16)in[i*columns]; + for (j=0;j<columns;j++) + if (in[i+j*rows]<out[i]) + out[i] = (int16)in[i+j*rows]; + } + +} diff --git a/2.3-1/src/c/statisticsFunctions/min/i16columnmina.c~ b/2.3-1/src/c/statisticsFunctions/min/i16columnmina.c~ new file mode 100644 index 00000000..d38b7b5d --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/min/i16columnmina.c~ @@ -0,0 +1,25 @@ +/* + * 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 + * + */ + +#include "statMin.h" + +void i16columnmina(int16 *in, int rows, int columns, int16* out) { + int i = 0, j = 0; + + for (i = 0; i < rows; i++) { + out[i]=(int16)in[i*columns]; + for (j=0;j<columns;j++) + if (in[i+j*rows]<out[i]) + out[i] = (int16)in[i+j*rows]; + } + +} diff --git a/2.3-1/src/c/statisticsFunctions/min/i16mina.c b/2.3-1/src/c/statisticsFunctions/min/i16mina.c new file mode 100644 index 00000000..6afdd5de --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/min/i16mina.c @@ -0,0 +1,26 @@ +/* + * 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 + * + */ + +#include "statMin.h" + +int16 i16mina(int16 *in, int size) { + int16 out = in[0]; + int i = 0; + + for (i = 1; i < size; ++i) + { + if (in[i]<out) + out = (int16)in[i]; + } + return out; + +} diff --git a/2.3-1/src/c/statisticsFunctions/min/i16mina.c~ b/2.3-1/src/c/statisticsFunctions/min/i16mina.c~ new file mode 100644 index 00000000..6afdd5de --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/min/i16mina.c~ @@ -0,0 +1,26 @@ +/* + * 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 + * + */ + +#include "statMin.h" + +int16 i16mina(int16 *in, int size) { + int16 out = in[0]; + int i = 0; + + for (i = 1; i < size; ++i) + { + if (in[i]<out) + out = (int16)in[i]; + } + return out; + +} diff --git a/2.3-1/src/c/statisticsFunctions/min/i16rowmina.c b/2.3-1/src/c/statisticsFunctions/min/i16rowmina.c new file mode 100644 index 00000000..adeeaaa4 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/min/i16rowmina.c @@ -0,0 +1,24 @@ +/* + * 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 + * + */ + +#include "statMin.h" + +void i16rowmina(int16 *in, int rows, int columns, int16* out) { + int i = 0, j = 0; + + for (i = 0; i < columns; i++) { + out[i]=(int16)in[i*rows]; + for (j = 1 ; j < rows ; j++) + if (in[i*rows+j]<out[i]) + out[i] = (int16)in[i*rows+j]; + } +} diff --git a/2.3-1/src/c/statisticsFunctions/min/i16rowmina.c~ b/2.3-1/src/c/statisticsFunctions/min/i16rowmina.c~ new file mode 100644 index 00000000..adeeaaa4 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/min/i16rowmina.c~ @@ -0,0 +1,24 @@ +/* + * 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 + * + */ + +#include "statMin.h" + +void i16rowmina(int16 *in, int rows, int columns, int16* out) { + int i = 0, j = 0; + + for (i = 0; i < columns; i++) { + out[i]=(int16)in[i*rows]; + for (j = 1 ; j < rows ; j++) + if (in[i*rows+j]<out[i]) + out[i] = (int16)in[i*rows+j]; + } +} diff --git a/2.3-1/src/c/statisticsFunctions/min/i8columnmina.c b/2.3-1/src/c/statisticsFunctions/min/i8columnmina.c new file mode 100644 index 00000000..1e97d621 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/min/i8columnmina.c @@ -0,0 +1,25 @@ +/* + * 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 + * + */ + +#include "statMin.h" + +void i8columnmina(int8 *in, int rows, int columns, int8* out) { + int i = 0, j = 0; + + for (i = 0; i < rows; i++) { + out[i]=(int8)in[i*columns]; + for (j=0;j<columns;j++) + if (in[i+j*rows]<out[i]) + out[i] = (int8)in[i+j*rows]; + } + +} diff --git a/2.3-1/src/c/statisticsFunctions/min/i8columnmina.c~ b/2.3-1/src/c/statisticsFunctions/min/i8columnmina.c~ new file mode 100644 index 00000000..1e97d621 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/min/i8columnmina.c~ @@ -0,0 +1,25 @@ +/* + * 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 + * + */ + +#include "statMin.h" + +void i8columnmina(int8 *in, int rows, int columns, int8* out) { + int i = 0, j = 0; + + for (i = 0; i < rows; i++) { + out[i]=(int8)in[i*columns]; + for (j=0;j<columns;j++) + if (in[i+j*rows]<out[i]) + out[i] = (int8)in[i+j*rows]; + } + +} diff --git a/2.3-1/src/c/statisticsFunctions/min/i8mina.c b/2.3-1/src/c/statisticsFunctions/min/i8mina.c new file mode 100644 index 00000000..07e8a108 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/min/i8mina.c @@ -0,0 +1,26 @@ +/* + * 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 + * + */ + +#include "statMin.h" + +int8 i8mina(int8 *in, int size) { + int8 out = in[0]; + int i = 0; + + for (i = 1; i < size; ++i) + { + if (in[i]<out) + out = (int8)in[i]; + } + return out; + +} diff --git a/2.3-1/src/c/statisticsFunctions/min/i8mina.c~ b/2.3-1/src/c/statisticsFunctions/min/i8mina.c~ new file mode 100644 index 00000000..07e8a108 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/min/i8mina.c~ @@ -0,0 +1,26 @@ +/* + * 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 + * + */ + +#include "statMin.h" + +int8 i8mina(int8 *in, int size) { + int8 out = in[0]; + int i = 0; + + for (i = 1; i < size; ++i) + { + if (in[i]<out) + out = (int8)in[i]; + } + return out; + +} diff --git a/2.3-1/src/c/statisticsFunctions/min/i8rowmina.c b/2.3-1/src/c/statisticsFunctions/min/i8rowmina.c new file mode 100644 index 00000000..4ce9edc5 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/min/i8rowmina.c @@ -0,0 +1,24 @@ +/* + * 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 + * + */ + +#include "statMin.h" + +void i8rowmina(int8 *in, int rows, int columns, int8* out) { + int i = 0, j = 0; + + for (i = 0; i < columns; i++) { + out[i]=(int8)in[i*rows]; + for (j = 1 ; j < rows ; j++) + if (in[i*rows+j]<out[i]) + out[i] = (int8)in[i*rows+j]; + } +} diff --git a/2.3-1/src/c/statisticsFunctions/min/i8rowmina.c~ b/2.3-1/src/c/statisticsFunctions/min/i8rowmina.c~ new file mode 100644 index 00000000..4ce9edc5 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/min/i8rowmina.c~ @@ -0,0 +1,24 @@ +/* + * 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 + * + */ + +#include "statMin.h" + +void i8rowmina(int8 *in, int rows, int columns, int8* out) { + int i = 0, j = 0; + + for (i = 0; i < columns; i++) { + out[i]=(int8)in[i*rows]; + for (j = 1 ; j < rows ; j++) + if (in[i*rows+j]<out[i]) + out[i] = (int8)in[i*rows+j]; + } +} diff --git a/2.3-1/src/c/statisticsFunctions/min/scolumnmina.c b/2.3-1/src/c/statisticsFunctions/min/scolumnmina.c index 79fac41a..8e19b1de 100644 --- a/2.3-1/src/c/statisticsFunctions/min/scolumnmina.c +++ b/2.3-1/src/c/statisticsFunctions/min/scolumnmina.c @@ -16,7 +16,7 @@ void scolumnmina(float *in, int rows, int columns, float* out) { int i = 0, j = 0; for (i = 0; i < rows; i++) { - out[i]=in[i]; + out[i]=in[i*columns]; for (j=0;j<columns;j++) if (in[i+j*rows]<out[i]) out[i] = in[i+j*rows]; } diff --git a/2.3-1/src/c/statisticsFunctions/min/scolumnmina.c~ b/2.3-1/src/c/statisticsFunctions/min/scolumnmina.c~ new file mode 100644 index 00000000..8e19b1de --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/min/scolumnmina.c~ @@ -0,0 +1,24 @@ +/* + * 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 + * + */ + +#include "statMin.h" + +void scolumnmina(float *in, int rows, int columns, float* out) { + int i = 0, j = 0; + + for (i = 0; i < rows; i++) { + out[i]=in[i*columns]; + for (j=0;j<columns;j++) + if (in[i+j*rows]<out[i]) out[i] = in[i+j*rows]; + } + +} diff --git a/2.3-1/src/c/statisticsFunctions/min/u16columnmina.c b/2.3-1/src/c/statisticsFunctions/min/u16columnmina.c new file mode 100644 index 00000000..96c86a60 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/min/u16columnmina.c @@ -0,0 +1,25 @@ +/* + * 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 + * + */ + +#include "statMin.h" + +void u16columnmina(uint16 *in, int rows, int columns, uint16* out) { + int i = 0, j = 0; + + for (i = 0; i < rows; i++) { + out[i]=(uint16)in[i*columns]; + for (j=0;j<columns;j++) + if (in[i+j*rows]<out[i]) + out[i] = (uint16)in[i+j*rows]; + } + +} diff --git a/2.3-1/src/c/statisticsFunctions/min/u16columnmina.c~ b/2.3-1/src/c/statisticsFunctions/min/u16columnmina.c~ new file mode 100644 index 00000000..96c86a60 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/min/u16columnmina.c~ @@ -0,0 +1,25 @@ +/* + * 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 + * + */ + +#include "statMin.h" + +void u16columnmina(uint16 *in, int rows, int columns, uint16* out) { + int i = 0, j = 0; + + for (i = 0; i < rows; i++) { + out[i]=(uint16)in[i*columns]; + for (j=0;j<columns;j++) + if (in[i+j*rows]<out[i]) + out[i] = (uint16)in[i+j*rows]; + } + +} diff --git a/2.3-1/src/c/statisticsFunctions/min/u16mina.c b/2.3-1/src/c/statisticsFunctions/min/u16mina.c new file mode 100644 index 00000000..07c24eac --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/min/u16mina.c @@ -0,0 +1,26 @@ +/* + * 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 + * + */ + +#include "statMin.h" + +uint16 u16mina(uint16 *in, int size) { + uint16 out = in[0]; + int i = 0; + + for (i = 1; i < size; ++i) + { + if (in[i]<out) + out = (uint16)in[i]; + } + return out; + +} diff --git a/2.3-1/src/c/statisticsFunctions/min/u16mina.c~ b/2.3-1/src/c/statisticsFunctions/min/u16mina.c~ new file mode 100644 index 00000000..07c24eac --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/min/u16mina.c~ @@ -0,0 +1,26 @@ +/* + * 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 + * + */ + +#include "statMin.h" + +uint16 u16mina(uint16 *in, int size) { + uint16 out = in[0]; + int i = 0; + + for (i = 1; i < size; ++i) + { + if (in[i]<out) + out = (uint16)in[i]; + } + return out; + +} diff --git a/2.3-1/src/c/statisticsFunctions/min/u16rowmina.c b/2.3-1/src/c/statisticsFunctions/min/u16rowmina.c new file mode 100644 index 00000000..5180977e --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/min/u16rowmina.c @@ -0,0 +1,24 @@ +/* + * 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 + * + */ + +#include "statMin.h" + +void u16rowmina(uint16 *in, int rows, int columns, uint16* out) { + int i = 0, j = 0; + + for (i = 0; i < columns; i++) { + out[i]=(uint16)in[i*rows]; + for (j = 1 ; j < rows ; j++) + if (in[i*rows+j]<out[i]) + out[i] = (uint16)in[i*rows+j]; + } +} diff --git a/2.3-1/src/c/statisticsFunctions/min/u16rowmina.c~ b/2.3-1/src/c/statisticsFunctions/min/u16rowmina.c~ new file mode 100644 index 00000000..5180977e --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/min/u16rowmina.c~ @@ -0,0 +1,24 @@ +/* + * 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 + * + */ + +#include "statMin.h" + +void u16rowmina(uint16 *in, int rows, int columns, uint16* out) { + int i = 0, j = 0; + + for (i = 0; i < columns; i++) { + out[i]=(uint16)in[i*rows]; + for (j = 1 ; j < rows ; j++) + if (in[i*rows+j]<out[i]) + out[i] = (uint16)in[i*rows+j]; + } +} diff --git a/2.3-1/src/c/statisticsFunctions/min/u8columnmina.c b/2.3-1/src/c/statisticsFunctions/min/u8columnmina.c new file mode 100644 index 00000000..4ced0968 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/min/u8columnmina.c @@ -0,0 +1,25 @@ +/* + * 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 + * + */ + +#include "statMin.h" + +void u8columnmina(uint8 *in, int rows, int columns, uint8* out) { + int i = 0, j = 0; + + for (i = 0; i < rows; i++) { + out[i]=(uint8)in[i*columns]; + for (j=0;j<columns;j++) + if (in[i+j*rows]<out[i]) + out[i] = (uint8)in[i+j*rows]; + } + +} diff --git a/2.3-1/src/c/statisticsFunctions/min/u8columnmina.c~ b/2.3-1/src/c/statisticsFunctions/min/u8columnmina.c~ new file mode 100644 index 00000000..4ced0968 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/min/u8columnmina.c~ @@ -0,0 +1,25 @@ +/* + * 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 + * + */ + +#include "statMin.h" + +void u8columnmina(uint8 *in, int rows, int columns, uint8* out) { + int i = 0, j = 0; + + for (i = 0; i < rows; i++) { + out[i]=(uint8)in[i*columns]; + for (j=0;j<columns;j++) + if (in[i+j*rows]<out[i]) + out[i] = (uint8)in[i+j*rows]; + } + +} diff --git a/2.3-1/src/c/statisticsFunctions/min/u8mina.c b/2.3-1/src/c/statisticsFunctions/min/u8mina.c new file mode 100644 index 00000000..16a7bb4c --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/min/u8mina.c @@ -0,0 +1,26 @@ +/* + * 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 + * + */ + +#include "statMin.h" + +uint8 u8mina(uint8 *in, int size) { + uint8 out = in[0]; + int i = 0; + + for (i = 1; i < size; ++i) + { + if (in[i]<out) + out = (uint8)in[i]; + } + return out; + +} diff --git a/2.3-1/src/c/statisticsFunctions/min/u8mina.c~ b/2.3-1/src/c/statisticsFunctions/min/u8mina.c~ new file mode 100644 index 00000000..16a7bb4c --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/min/u8mina.c~ @@ -0,0 +1,26 @@ +/* + * 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 + * + */ + +#include "statMin.h" + +uint8 u8mina(uint8 *in, int size) { + uint8 out = in[0]; + int i = 0; + + for (i = 1; i < size; ++i) + { + if (in[i]<out) + out = (uint8)in[i]; + } + return out; + +} diff --git a/2.3-1/src/c/statisticsFunctions/min/u8rowmina.c b/2.3-1/src/c/statisticsFunctions/min/u8rowmina.c new file mode 100644 index 00000000..ddbe274c --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/min/u8rowmina.c @@ -0,0 +1,24 @@ +/* + * 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 + * + */ + +#include "statMin.h" + +void u8rowmina(uint8 *in, int rows, int columns, uint8* out) { + int i = 0, j = 0; + + for (i = 0; i < columns; i++) { + out[i]=(uint8)in[i*rows]; + for (j = 1 ; j < rows ; j++) + if (in[i*rows+j]<out[i]) + out[i] = (uint8)in[i*rows+j]; + } +} diff --git a/2.3-1/src/c/statisticsFunctions/min/u8rowmina.c~ b/2.3-1/src/c/statisticsFunctions/min/u8rowmina.c~ new file mode 100644 index 00000000..ddbe274c --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/min/u8rowmina.c~ @@ -0,0 +1,24 @@ +/* + * 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 + * + */ + +#include "statMin.h" + +void u8rowmina(uint8 *in, int rows, int columns, uint8* out) { + int i = 0, j = 0; + + for (i = 0; i < columns; i++) { + out[i]=(uint8)in[i*rows]; + for (j = 1 ; j < rows ; j++) + if (in[i*rows+j]<out[i]) + out[i] = (uint8)in[i*rows+j]; + } +} |