diff options
Diffstat (limited to '2.3-1/src/c/statisticsFunctions/min')
28 files changed, 650 insertions, 2 deletions
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]; + } +} |