diff options
Diffstat (limited to 'src/matrixOperations')
-rw-r--r-- | src/matrixOperations/Makefile.am | 3 | ||||
-rw-r--r-- | src/matrixOperations/Makefile.in | 3 | ||||
-rw-r--r-- | src/matrixOperations/includes/determ.h | 8 | ||||
-rw-r--r-- | src/matrixOperations/includes/ones.h | 22 | ||||
-rw-r--r-- | src/matrixOperations/interfaces/int_BackSlash.h | 37 | ||||
-rw-r--r-- | src/matrixOperations/interfaces/int_OpSlash.h | 20 | ||||
-rw-r--r-- | src/matrixOperations/interfaces/int_OpStar.h | 18 | ||||
-rw-r--r-- | src/matrixOperations/interfaces/int_cat.h | 124 | ||||
-rw-r--r-- | src/matrixOperations/interfaces/int_det.h | 34 | ||||
-rw-r--r-- | src/matrixOperations/interfaces/int_invert.h | 34 | ||||
-rw-r--r-- | src/matrixOperations/interfaces/int_trace.h | 34 | ||||
-rwxr-xr-x | src/matrixOperations/interfaces/interface.sh | 6 |
12 files changed, 318 insertions, 25 deletions
diff --git a/src/matrixOperations/Makefile.am b/src/matrixOperations/Makefile.am index 4f3ae352..62380e3e 100644 --- a/src/matrixOperations/Makefile.am +++ b/src/matrixOperations/Makefile.am @@ -10,8 +10,7 @@ ## ## -SUBDIRS= addition \ - cat \ +SUBDIRS= cat \ division \ expm \ eye \ diff --git a/src/matrixOperations/Makefile.in b/src/matrixOperations/Makefile.in index bf30261a..4894de57 100644 --- a/src/matrixOperations/Makefile.in +++ b/src/matrixOperations/Makefile.in @@ -165,8 +165,7 @@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -SUBDIRS = addition \ - cat \ +SUBDIRS = cat \ division \ expm \ eye \ diff --git a/src/matrixOperations/includes/determ.h b/src/matrixOperations/includes/determ.h index ec1df30c..e9276a70 100644 --- a/src/matrixOperations/includes/determ.h +++ b/src/matrixOperations/includes/determ.h @@ -20,13 +20,13 @@ -double ddeterma (double *in, int size); +double ddeterma (double *in, int rows); -float sdeterma (float *in, int size); +float sdeterma (float *in, int rows); -doubleComplex zdeterma (doubleComplex *in, int size); +doubleComplex zdeterma (doubleComplex *in, int rows); -floatComplex cdeterma (floatComplex *in, int size); +floatComplex cdeterma (floatComplex *in, int rows); #endif /* __DETERM_H__ */ diff --git a/src/matrixOperations/includes/ones.h b/src/matrixOperations/includes/ones.h index 93fe1c62..b4d6eef4 100644 --- a/src/matrixOperations/includes/ones.h +++ b/src/matrixOperations/includes/ones.h @@ -18,6 +18,28 @@ #include "doubleComplex.h" /* +** \brief create a float one value +*/ +#define seyes(in) 1.0f + +/* +** \brief create a Double one value +*/ +#define deyes(in) 1.0 + +/* +** \brief create a float complex one value +*/ +#define ceyes(in) FloatComplex(1.0f, 0) + +/* +** \brief create a Double complex one value +*/ +#define zeyes(in) DoubleComplex(1, 0) + + + +/* ** \brief create a float matrix full of one */ void sonesa ( float* in , int rows , int cols ); diff --git a/src/matrixOperations/interfaces/int_BackSlash.h b/src/matrixOperations/interfaces/int_BackSlash.h new file mode 100644 index 00000000..898c37be --- /dev/null +++ b/src/matrixOperations/interfaces/int_BackSlash.h @@ -0,0 +1,37 @@ +/* + * 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_OPBACKSLASH_H__ +#define __INT_OPBACKSLASH_H__ + +/* Matrix \ Matrix */ + +#define s2s2OpBackSlashs2(in1,size1,in2,size2,out) sldivma(in1,size1[0],size1[1],in2,size2[0],size2[1],out) + +#define d2d2OpBackSlashd2(in1,size1,in2,size2,out) dldivma(in1,size1[0],size1[1],in2,size2[0],size2[1],out) + +#define c2c2OpBackSlashc2(in1,size1,in2,size2,out) cldivma(in1,size1[0],size1[1],in2,size2[0],size2[1],out) + +#define c2s2OpBackSlashc2(in1,size1,in2,size2,out) cldivma(in1,size1[0],size1[1],FloatComplexMatrix(in2,0,size2[0]*size2[1]),size2[0],size2[1],out) + +#define s2c2OpBackSlashc2(in1,size1,in2,size2,out) cldivma(FloatComplexMatrix(in1,0,size1[0]*size1[1]),size1[0],size1[1],in2,size2[0],size2[1],out) + +#define z2z2OpBackSlashz2(in1,size1,in2,size2,out) zldivma(in1,size1[0],size1[1],in2,size2[0],size2[1],out) + +#define z2d2OpBackSlashc2(in1,size1,in2,size2,out) cldivma(in1,size1[0],size1[1],DoubleComplexMatrix(in2,0,size2[0]*size2[1]),size2[0],size2[1],out) + +#define d2z2OpBackSlashc2(in1,size1,in2,size2,out) cldivma(DoubleComplexMatrix(in1,0,size1[0]*size1[1]),size1[0],size1[1],in2,size2[0],size2[1],out) + + +#endif /* !__INT_OPBACKSLASH_H__ */ diff --git a/src/matrixOperations/interfaces/int_OpSlash.h b/src/matrixOperations/interfaces/int_OpSlash.h index bf6ba42f..20930a0a 100644 --- a/src/matrixOperations/interfaces/int_OpSlash.h +++ b/src/matrixOperations/interfaces/int_OpSlash.h @@ -15,20 +15,24 @@ #ifndef __INT_OPSLASH_H__ #define __INT_OPSLASH_H__ -#define s0rdivms0(in) srdivms(in) -#define d0rdivmd0(in) drdivms(in) +/* Matrix / Matrix */ -#define c0rdivmc0(in) crdivms(in) +#define s2s2OpSlashs2(in1,size1,in2,size2,out) srdivma(in1,size1[0],size1[1],in2,size2[0],size2[1],out) -#define z0rdivmz0(in) zrdivms(in) +#define d2d2OpSlashd2(in1,size1,in2,size2,out) drdivma(in1,size1[0],size1[1],in2,size2[0],size2[1],out) -#define s2rdivms2(in,size,out) srdivma(in, size[0]*size[1], out) +#define c2c2OpSlashc2(in1,size1,in2,size2,out) crdivma(in1,size1[0],size1[1],in2,size2[0],size2[1],out) -#define d2rdivmd2(in,size,out) drdivma(in, size[0]*size[1], out) +#define c2s2OpSlashc2(in1,size1,in2,size2,out) crdivma(in1,size1[0],size1[1],FloatComplexMatrix(in2,0,size2[0]*size2[1]),size2[0],size2[1],out) -#define c2rdivmc2(in,size,out) crdivma(in, size[0]*size[1], out) +#define s2c2OpSlashc2(in1,size1,in2,size2,out) crdivma(FloatComplexMatrix(in1,0,size1[0]*size1[1]),size1[0],size1[1],in2,size2[0],size2[1],out) + +#define z2z2OpSlashz2(in1,size1,in2,size2,out) zrdivma(in1,size1[0],size1[1],in2,size2[0],size2[1],out) + +#define z2d2OpSlashc2(in1,size1,in2,size2,out) crdivma(in1,size1[0],size1[1],DoubleComplexMatrix(in2,0,size2[0]*size2[1]),size2[0],size2[1],out) + +#define d2z2OpSlashc2(in1,size1,in2,size2,out) crdivma(DoubleComplexMatrix(in1,0,size1[0]*size1[1]),size1[0],size1[1],in2,size2[0],size2[1],out) -#define z2rdivmz2(in,size,out) zrdivma(in, size[0]*size[1], out) #endif /* !__INT_OPSLASH_H__ */ diff --git a/src/matrixOperations/interfaces/int_OpStar.h b/src/matrixOperations/interfaces/int_OpStar.h index 4362baa2..400918a4 100644 --- a/src/matrixOperations/interfaces/int_OpStar.h +++ b/src/matrixOperations/interfaces/int_OpStar.h @@ -15,23 +15,23 @@ #ifndef __INT_OPSTAR_H__ #define __INT_OPSTAR_H__ -/* Matrix .* Matrix */ +/* Matrix * Matrix */ -#define s2s2OpStars2(in1,size1,in2,size2,out) smulma(in1,size1[0]*size1[1],in2,size2[0]*size2[1],out) +#define s2s2OpStars2(in1,size1,in2,size2,out) smulma(in1,size1[0],size1[1],in2,size2[0],size2[1],out) -#define d2d2OpStard2(in1,size1,in2,size2,out) dmulma(in1,size1[0]*size1[1],in2,size2[0]*size2[1],out) +#define d2d2OpStard2(in1,size1,in2,size2,out) dmulma(in1,size1[0],size1[1],in2,size2[0],size2[1],out) -#define c2c2OpStarc2(in1,size1,in2,size2,out) cmulma(in1,size1[0]*size1[1],in2,size2[0]*size2[1],out) +#define c2c2OpStarc2(in1,size1,in2,size2,out) cmulma(in1,size1[0],size1[1],in2,size2[0],size2[1],out) -#define c2s2OpStarc2(in1,size1,in2,size2,out) cmulma(in1,size1[0]*size1[1],FloatComplexMatrix(in2,0,size2[0]*size2[1]),size2[0]*size2[1],out) +#define c2s2OpStarc2(in1,size1,in2,size2,out) cmulma(in1,size1[0],size1[1],FloatComplexMatrix(in2,0,size2[0]*size2[1]),size2[0],size2[1],out) -#define s2c2OpStarc2(in1,size1,in2,size2,out) cmulma(FloatComplexMatrix(in1,0,size1[0]*size1[1]),size1[0]*size1[1],in2,size2[0]*size2[1],out) +#define s2c2OpStarc2(in1,size1,in2,size2,out) cmulma(FloatComplexMatrix(in1,0,size1[0]*size1[1]),size1[0],size1[1],in2,size2[0],size2[1],out) -#define z2z2OpStarz2(in1,size1,in2,size2,out) zmulma(in1,size1[0]*size1[1],in2,size2[0]*size2[1],out) +#define z2z2OpStarz2(in1,size1,in2,size2,out) zmulma(in1,size1[0],size1[1],in2,size2[0],size2[1],out) -#define z2d2OpStarc2(in1,size1,in2,size2,out) cmulma(in1,size1[0]*size1[1],DoubleComplexMatrix(in2,0,size2[0]*size2[1]),size2[0]*size2[1],out) +#define z2d2OpStarc2(in1,size1,in2,size2,out) cmulma(in1,size1[0],size1[1],DoubleComplexMatrix(in2,0,size2[0],size2[1]),size2[0],size2[1],out) -#define d2z2OpStarc2(in1,size1,in2,size2,out) cmulma(DoubleComplexMatrix(in1,0,size1[0]*size1[1]),size1[0]*size1[1],in2,size2[0]*size2[1],out) +#define d2z2OpStarc2(in1,size1,in2,size2,out) cmulma(DoubleComplexMatrix(in1,0,size1[0],size1[1]),size1[0],size1[1],in2,size2[0],size2[1],out) #endif /* !__INT_OPSTAR_H__ */ diff --git a/src/matrixOperations/interfaces/int_cat.h b/src/matrixOperations/interfaces/int_cat.h new file mode 100644 index 00000000..a4d8b132 --- /dev/null +++ b/src/matrixOperations/interfaces/int_cat.h @@ -0,0 +1,124 @@ +/* + * 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_CAT_H__ +#define __INT_CAT_H__ + +/* Column Cat */ + +/* Same input elements */ + +#define s0s0OpCcs2(in1,in2,out) scolumncats(in1,in2,out) + +#define d0d0OpCcd2(in1,in2,out) dcolumncats(in1,in2,out) + +#define c0c0OpCcc2(in1,in2,out) ccolumncats(in1,in2,out) + +#define z0z0OpCcz2(in1,in2,out) zcolumncats(in1,in2,out) + +#define s2s2OpCcs2(in1,size1,in2,size2,out) scolumncata(in1, size1[0], size2[1], in2, size1[0], size2[1], out) + +#define d2d2OpCcd2(in1,size1,in2,size2,out) dcolumncata(in1, size1[0], size2[1], in2, size1[0], size2[1], out) + +#define c2c2OpCcc2(in1,size1,in2,size2,out) ccolumncata(in1, size1[0], size2[1], in2, size1[0], size2[1], out) + +#define z2z2OpCcz2(in1,size1,in2,size2,out) zcolumncata(in1, size1[0], size2[1], in2, size1[0], size2[1], out) + +/* Differents input elements */ + +/* Matrix-Scalar */ + +/* Same type */ +#define s2s0OpCcs2(in1,size,in2,out) scolumncata(in1, size[0], size[1], in2, 1, 1, out); + +#define d2d0OpCcd2(in1,size,in2,out) dcolumncata(in1, size[0], size[1], in2, 1, 1, out); + +#define c2c0OpCcc2(in1,size,in2,out) ccolumncata(in1, size[0], size[1], in2, 1, 1, out); + +#define z2z0OpCcz2(in1,size,in2,out) zcolumncata(in1, size[0], size[1], in2, 1, 1, out); + + +/* Different type */ + +/* Scalar-Matrix */ + +/* Same type */ +#define s0s2OpCcs2(in1,in2,size,out) scolumncata(in1, 1, 1, in2, size[0], size[1], out); + +#define d0d2OpCcd2(in1,in2,size,out) dcolumncata(in1, 1, 1, in2, size[0], size[1], out); + +#define c0c2OpCcc2(in1,in2,size,out) ccolumncata(in1, 1, 1, in2, size[0], size[1], out); + +#define z0z2OpCcz2(in1,in2,size,out) zcolumncata(in1, 1, 1, in2, size[0], size[1], out); + +/* Different type */ + + + + + + +/* Row Cat */ + +/* Same input elements */ + +#define s0s0OpRcs2(in1,in2,out) srowcats(in1,in2,out) + +#define d0d0OpRcd2(in1,in2,out) drowcats(in1,in2,out) + +#define c0c0OpRcc2(in1,in2,out) crowcats(in1,in2,out) + +#define z0z0OpRcz2(in1,in2,out) zrowcats(in1,in2,out) + +#define s2s2OpRcs2(in1,size1,in2,size2,out) srowcata(in1, size1[0], size2[1], in2, size1[0], size2[1], out) + +#define d2d2OpRcd2(in1,size1,in2,size2,out) drowcata(in1, size1[0], size2[1], in2, size1[0], size2[1], out) + +#define c2c2OpRcc2(in1,size1,in2,size2,out) crowcata(in1, size1[0], size2[1], in2, size1[0], size2[1], out) + +#define z2z2OpRcz2(in1,size1,in2,size2,out) zrowcata(in1, size1[0], size2[1], in2, size1[0], size2[1], out) + +/* Differents input elements */ + +/* Matrix-Scalar */ + +/* Same type */ +#define s2s0OpRcs2(in1,size,in2,out) srowcata(in1, size[0], size[1], in2, 1, 1, out); + +#define d2d0OpRcd2(in1,size,in2,out) drowcata(in1, size[0], size[1], in2, 1, 1, out); + +#define c2c0OpRcc2(in1,size,in2,out) crowcata(in1, size[0], size[1], in2, 1, 1, out); + +#define z2z0OpRcz2(in1,size,in2,out) zrowcata(in1, size[0], size[1], in2, 1, 1, out); + + +/* Different type */ + +/* Scalar-Matrix */ + +/* Same type */ +#define s0s2OpRcs2(in1,in2,size,out) srowcata(in1, 1, 1, in2, size[0], size[1], out); + +#define d0d2OpRcd2(in1,in2,size,out) drowcata(in1, 1, 1, in2, size[0], size[1], out); + +#define c0c2OpRcc2(in1,in2,size,out) crowcata(in1, 1, 1, in2, size[0], size[1], out); + +#define z0z2OpRcz2(in1,in2,size,out) zrowcata(in1, 1, 1, in2, size[0], size[1], out); + +/* Different type */ + + + + +#endif /* !__INT_CAT_H__ */ diff --git a/src/matrixOperations/interfaces/int_det.h b/src/matrixOperations/interfaces/int_det.h new file mode 100644 index 00000000..3c622929 --- /dev/null +++ b/src/matrixOperations/interfaces/int_det.h @@ -0,0 +1,34 @@ +/* + * 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_DETERM_H__ +#define __INT_DETERM_H__ + +#define s0dets0(in) in + +#define d0detd0(in) in + +#define c0detc0(in) in + +#define z0detz0(in) in + +#define s2dets0(in,size,out) sdeterma(in, size[0]) + +#define d2detd0(in,size,out) ddeterma(in, size[0]) + +#define c2detc0(in,size,out) cdeterma(in, size[0]) + +#define z2detz0(in,size,out) zdeterma(in, size[0]) + +#endif /* !__INT_DETERM_H__ */ diff --git a/src/matrixOperations/interfaces/int_invert.h b/src/matrixOperations/interfaces/int_invert.h new file mode 100644 index 00000000..6e3b895b --- /dev/null +++ b/src/matrixOperations/interfaces/int_invert.h @@ -0,0 +1,34 @@ +/* + * 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_INVERT_H__ +#define __INT_INVERT_H__ + +#define s0inverts0(in) 1/in + +#define d0invertd0(in) 1/in + +#define c0invertc0(in) crdivs(FloatComplex(1,0),in) + +#define z0invertz0(in) zrdivs(DoubleComplex(1,0),in) + +#define s2inverts2(in,size,out) sinverma(in, out, size[0]) + +#define d2invertd2(in,size,out) dinverma(in, out, size[0]) + +#define c2invertc2(in,size,out) cinverma(in, out, size[0]) + +#define z2invertz2(in,size,out) zinverma(in, out, size[0]) + +#endif /* !__INT_INVERT_H__ */ diff --git a/src/matrixOperations/interfaces/int_trace.h b/src/matrixOperations/interfaces/int_trace.h new file mode 100644 index 00000000..2b9a5d4e --- /dev/null +++ b/src/matrixOperations/interfaces/int_trace.h @@ -0,0 +1,34 @@ +/* + * 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_TRACE_H__ +#define __INT_TRACE_H__ + +#define s0traces0(in) in + +#define d0traced0(in) in + +#define c0tracec0(in) in + +#define z0tracez0(in) in + +#define s2traces0(in,size,out) stracea(in, size[0]) + +#define d2traced0(in,size,out) dtracea(in, size[0]) + +#define c2tracec0(in,size,out) ctracea(in, size[0]) + +#define z2tracez0(in,size,out) ztracea(in, size[0]) + +#endif /* !__INT_TRACE_H__ */ diff --git a/src/matrixOperations/interfaces/interface.sh b/src/matrixOperations/interfaces/interface.sh new file mode 100755 index 00000000..8c7f073b --- /dev/null +++ b/src/matrixOperations/interfaces/interface.sh @@ -0,0 +1,6 @@ +for i in $@; do + +./generateInterfaces.pl --function-name $i --header-file int_$i.h + +done + |