diff options
author | Abhinav Dronamraju | 2017-08-10 20:30:45 +0530 |
---|---|---|
committer | Abhinav Dronamraju | 2017-08-10 20:30:45 +0530 |
commit | 6422b5c0a45161d6571fd6d7077b6d551cbb5e26 (patch) | |
tree | 42c7f31e0567f88bb0ebd550cbda363d8ee6799d /src/c/statisticsFunctions/interfaces | |
parent | ff2e111f068342863fc3ca66f40f5822d0b19415 (diff) | |
download | Scilab2C_fossee_old-6422b5c0a45161d6571fd6d7077b6d551cbb5e26.tar.gz Scilab2C_fossee_old-6422b5c0a45161d6571fd6d7077b6d551cbb5e26.tar.bz2 Scilab2C_fossee_old-6422b5c0a45161d6571fd6d7077b6d551cbb5e26.zip |
rank and gsort added
Diffstat (limited to 'src/c/statisticsFunctions/interfaces')
-rw-r--r-- | src/c/statisticsFunctions/interfaces/int_gsort.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src/c/statisticsFunctions/interfaces/int_gsort.h b/src/c/statisticsFunctions/interfaces/int_gsort.h new file mode 100644 index 0000000..d1e9bb9 --- /dev/null +++ b/src/c/statisticsFunctions/interfaces/int_gsort.h @@ -0,0 +1,43 @@ +/* Copyright (C) 2016 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Author: Abhinav Dronamraju + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#ifndef __INT_GSORT_H__ +#define __INT_GSORT_H__ + + +#ifdef __cplusplus +extern "C" { +#endif + +#define d2gsortd2(in1, size, out) dgsorta(in1, size[0]* size[1], 'd', out) +#define d2g2gsortd2(in1, size1, in2, size2, out) (in2[0]== 'r') ? dgsortrowa(in1, size1[0], size1[1],'d', out) :dgsortcola(in1, size1[0], size1[1],'d', out) +#define d2g2g2gsortd2(in1, size1, in2, size2, in3, size3, out) (in2[0]== 'r') ? dgsortrowa(in1, size1[0], size1[1],in3[0], out) :dgsortcola(in1, size1[0], size1[1],in3[0], out) + +#define s2gsorts2(in1, size, out) sgsorta(in1, size[0]* size[1], 'd', out) +#define s2g2gsorts2(in1, size1, in2, size2, out) (in2[0]== 'r') ? sgsortrowa(in1, size1[0], size1[1],'d', out) :sgsortcola(in1, size1[0], size1[1],'d', out) +#define s2g2g2gsorts2(in1, size1, in2, size2, in3, size3, out) (in2[0]== 'r') ? sgsortrowa(in1, size1[0], size1[1],in3[0], out) :sgsortcola(in1, size1[0], size1[1],in3[0], out) + +#define u162gsortu162(in1, size, out) u16gsorta(in1, size[0]* size[1], 'd', out) +#define u162g2gsortu162(in1, size1, in2, size2, out) (in2[0]== 'r') ? u16gsortrowa(in1, size1[0], size1[1],'d', out) :u16gsortcola(in1, size1[0], size1[1],'d', out) +#define u162g2g2gsortu162(in1, size1, in2, size2, in3, size3, out) (in2[0]== 'r') ? u16gsortrowa(in1, size1[0], size1[1],in3[0], out) :u16gsortcola(in1, size1[0], size1[1],in3[0], out) + +#define z2gsortz2(in1, size, out) zgsorta(in1, size[0]* size[1], 'd', out) +#define z2g2gsortz2(in1, size1, in2, size2, out) (in2[0]== 'r') ? zgsortrowa(in1, size1[0], size1[1],'d', out) :zgsortcola(in1, size1[0], size1[1],'d', out) +#define z2g2g2gsortz2(in1, size1, in2, size2, in3, size3, out) (in2[0]== 'r') ? zgsortrowa(in1, size1[0], size1[1],in3[0], out) :zgsortcola(in1, size1[0], size1[1],in3[0], out) + + + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /*__INT_GSORT_H__*/ |