summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Scilab2C/SCI2CTests/test999_WorkingDir/scilabcode/mainfunction.sci14
-rw-r--r--src/auxiliaryFunctions/isempty/cisemptya.c14
-rw-r--r--src/auxiliaryFunctions/isempty/disemptya.c14
-rw-r--r--src/auxiliaryFunctions/isempty/sisemptya.c16
-rw-r--r--src/auxiliaryFunctions/isempty/zisemptya.c14
-rwxr-xr-xsrc/configure3
-rw-r--r--src/configure.ac1
7 files changed, 19 insertions, 57 deletions
diff --git a/src/Scilab2C/SCI2CTests/test999_WorkingDir/scilabcode/mainfunction.sci b/src/Scilab2C/SCI2CTests/test999_WorkingDir/scilabcode/mainfunction.sci
index 7509073c..6d57850e 100644
--- a/src/Scilab2C/SCI2CTests/test999_WorkingDir/scilabcode/mainfunction.sci
+++ b/src/Scilab2C/SCI2CTests/test999_WorkingDir/scilabcode/mainfunction.sci
@@ -2,16 +2,16 @@
function mainfunction()
-//test length
+//test isempty
-disp(length(4));
-disp(length(3+%i*4));
+disp(isempty(4));
+disp(isempty(3+%i*4));
c=[1 5 4 8; 2 9 4 5; 3 6 4 7]
-d=[1 5+%i*4 4 8+%i; 2-%i*3 9+%i*7 4+%i*2 5; 3 6 4 7-%i; 3 6 4 7-%i]
-
-disp(length(c));
-disp(length(d));
+d=[1 5+%i*4 4 8+%i; 2-%i*3 9+%i*7 4+%i*2 5; 3 6 4 7-%i]
+disp(isempty(c));
+disp(isempty(d));
+disp(isempty([]));
endfunction
diff --git a/src/auxiliaryFunctions/isempty/cisemptya.c b/src/auxiliaryFunctions/isempty/cisemptya.c
index 7736f370..8702953a 100644
--- a/src/auxiliaryFunctions/isempty/cisemptya.c
+++ b/src/auxiliaryFunctions/isempty/cisemptya.c
@@ -11,20 +11,10 @@
*/
#include "isempty.h"
+#include "length.h"
float cisemptya(floatComplex* x, int size) {
- float* out;
- int indiceOut[2] = {0};
- out = malloc((uint)size*sizeof(float));
-
- cfinda(x, size, out, indiceOut);
-
- if ( out[0] == -1 /*ie tab=NULL*/) {
- free(out);
- return 1;
- }
+ return (size==0) ? 1.0f : 0.0f;
- free(out);
- return 0;
}
diff --git a/src/auxiliaryFunctions/isempty/disemptya.c b/src/auxiliaryFunctions/isempty/disemptya.c
index 52f533cb..0ca40135 100644
--- a/src/auxiliaryFunctions/isempty/disemptya.c
+++ b/src/auxiliaryFunctions/isempty/disemptya.c
@@ -11,20 +11,10 @@
*/
#include "isempty.h"
+#include "length.h"
double disemptya(double* x, int size) {
- double* out;
- int indiceOut[2]={0};
- out = malloc((uint)size*sizeof(double));
-
- dfinda(x, size, out, indiceOut);
-
- if ( out[0] == -1 /*ie tab=NULL*/) {
- free(out);
- return 1;
- }
+ return (size==0) ? 1.0 : 0.0;
- free(out);
- return 0;
}
diff --git a/src/auxiliaryFunctions/isempty/sisemptya.c b/src/auxiliaryFunctions/isempty/sisemptya.c
index 3aa24517..fd02ceb3 100644
--- a/src/auxiliaryFunctions/isempty/sisemptya.c
+++ b/src/auxiliaryFunctions/isempty/sisemptya.c
@@ -11,20 +11,10 @@
*/
#include "isempty.h"
-#include "stdio.h"
-float sisemptya(float* x, int size) {
- float* out;
- int indiceOut[2] = {0};
+#include "length.h"
- out = malloc((uint)size*sizeof(float));
+float sisemptya(float* x, int size) {
- sfinda(x, size, out, indiceOut);
+ return (size==0) ? 1.0f : 0.0f;
- if ( out[0] == -1 /*ie tab=NULL*/) {
- free(out);
- return 1;
- }
-
- free(out);
- return 0;
}
diff --git a/src/auxiliaryFunctions/isempty/zisemptya.c b/src/auxiliaryFunctions/isempty/zisemptya.c
index d6c64b29..218e6da3 100644
--- a/src/auxiliaryFunctions/isempty/zisemptya.c
+++ b/src/auxiliaryFunctions/isempty/zisemptya.c
@@ -11,20 +11,10 @@
*/
#include "isempty.h"
+#include "length.h"
double zisemptya(doubleComplex* x, int size) {
- double* out;
- int indiceOut[2]={0};
- out = malloc((uint)size*sizeof(double));
-
- zfinda(x, size, out, indiceOut);
-
- if ( out[0] == -1 /*ie tab=NULL*/) {
- free(out);
- return 1;
- }
+ return (size==0) ? 1.0 : 0.0;
- free(out);
- return 0;
}
diff --git a/src/configure b/src/configure
index 957ce861..5e81c741 100755
--- a/src/configure
+++ b/src/configure
@@ -22149,7 +22149,7 @@ fi
#operations/multiplication/Makefile
#operations/division/Makefile
-ac_config_files="$ac_config_files Makefile lib/blas/Makefile lib/lapack/Makefile type/Makefile operations/Makefile operations/addition/Makefile operations/subtraction/Makefile operations/division/Makefile operations/multiplication/Makefile matrixOperations/Makefile matrixOperations/multiplication/Makefile matrixOperations/division/Makefile matrixOperations/cat/Makefile matrixOperations/transpose/Makefile matrixOperations/trace/Makefile matrixOperations/hilbert/Makefile matrixOperations/expm/Makefile matrixOperations/eye/Makefile matrixOperations/ones/Makefile matrixOperations/infiniteNorm/Makefile matrixOperations/inversion/Makefile matrixOperations/jmat/Makefile matrixOperations/chol/Makefile matrixOperations/determ/Makefile matrixOperations/dist/Makefile matrixOperations/fill/Makefile matrixOperations/magnitude/Makefile matrixOperations/squaredMagnitude/Makefile matrixOperations/logm/Makefile implicitList/Makefile elementaryFunctions/Makefile elementaryFunctions/cos/Makefile elementaryFunctions/cosh/Makefile elementaryFunctions/acos/Makefile elementaryFunctions/acosh/Makefile elementaryFunctions/sin/Makefile elementaryFunctions/sinh/Makefile elementaryFunctions/asin/Makefile elementaryFunctions/asinh/Makefile elementaryFunctions/tan/Makefile elementaryFunctions/tanh/Makefile elementaryFunctions/atan/Makefile elementaryFunctions/atan2/Makefile elementaryFunctions/atanh/Makefile elementaryFunctions/log/Makefile elementaryFunctions/log1p/Makefile elementaryFunctions/log10/Makefile elementaryFunctions/exp/Makefile elementaryFunctions/exp10/Makefile elementaryFunctions/sqrt/Makefile elementaryFunctions/lnp1m1/Makefile elementaryFunctions/pow/Makefile auxiliaryFunctions/Makefile auxiliaryFunctions/abs/Makefile auxiliaryFunctions/find/Makefile auxiliaryFunctions/find2d/Makefile auxiliaryFunctions/frexp/Makefile auxiliaryFunctions/isempty/Makefile auxiliaryFunctions/isnan/Makefile auxiliaryFunctions/rand/Makefile auxiliaryFunctions/sign/Makefile auxiliaryFunctions/size/Makefile auxiliaryFunctions/length/Makefile auxiliaryFunctions/type/Makefile auxiliaryFunctions/pythag/Makefile auxiliaryFunctions/conj/Makefile statisticsFunctions/Makefile statisticsFunctions/mean/Makefile statisticsFunctions/prod/Makefile statisticsFunctions/sum/Makefile statisticsFunctions/variance/Makefile string/Makefile string/disp/Makefile string/string/Makefile signalProcessing/Makefile signalProcessing/fft/Makefile signalProcessing/ifft/Makefile signalProcessing/levin/Makefile signalProcessing/conv/Makefile signalProcessing/conv2d/Makefile signalProcessing/hilbert/Makefile signalProcessing/crossCorr/Makefile signalProcessing/lpc2cep/Makefile"
+ac_config_files="$ac_config_files Makefile lib/blas/Makefile lib/lapack/Makefile type/Makefile operations/Makefile operations/addition/Makefile operations/subtraction/Makefile operations/division/Makefile operations/multiplication/Makefile matrixOperations/Makefile matrixOperations/multiplication/Makefile matrixOperations/division/Makefile matrixOperations/cat/Makefile matrixOperations/transpose/Makefile matrixOperations/trace/Makefile matrixOperations/hilbert/Makefile matrixOperations/expm/Makefile matrixOperations/eye/Makefile matrixOperations/ones/Makefile matrixOperations/infiniteNorm/Makefile matrixOperations/inversion/Makefile matrixOperations/jmat/Makefile matrixOperations/chol/Makefile matrixOperations/determ/Makefile matrixOperations/dist/Makefile matrixOperations/fill/Makefile matrixOperations/magnitude/Makefile matrixOperations/squaredMagnitude/Makefile matrixOperations/logm/Makefile matrixOperations/powm/Makefile implicitList/Makefile elementaryFunctions/Makefile elementaryFunctions/cos/Makefile elementaryFunctions/cosh/Makefile elementaryFunctions/acos/Makefile elementaryFunctions/acosh/Makefile elementaryFunctions/sin/Makefile elementaryFunctions/sinh/Makefile elementaryFunctions/asin/Makefile elementaryFunctions/asinh/Makefile elementaryFunctions/tan/Makefile elementaryFunctions/tanh/Makefile elementaryFunctions/atan/Makefile elementaryFunctions/atan2/Makefile elementaryFunctions/atanh/Makefile elementaryFunctions/log/Makefile elementaryFunctions/log1p/Makefile elementaryFunctions/log10/Makefile elementaryFunctions/exp/Makefile elementaryFunctions/exp10/Makefile elementaryFunctions/sqrt/Makefile elementaryFunctions/lnp1m1/Makefile elementaryFunctions/pow/Makefile auxiliaryFunctions/Makefile auxiliaryFunctions/abs/Makefile auxiliaryFunctions/find/Makefile auxiliaryFunctions/find2d/Makefile auxiliaryFunctions/frexp/Makefile auxiliaryFunctions/isempty/Makefile auxiliaryFunctions/isnan/Makefile auxiliaryFunctions/rand/Makefile auxiliaryFunctions/sign/Makefile auxiliaryFunctions/size/Makefile auxiliaryFunctions/length/Makefile auxiliaryFunctions/type/Makefile auxiliaryFunctions/pythag/Makefile auxiliaryFunctions/conj/Makefile statisticsFunctions/Makefile statisticsFunctions/mean/Makefile statisticsFunctions/prod/Makefile statisticsFunctions/sum/Makefile statisticsFunctions/variance/Makefile string/Makefile string/disp/Makefile string/string/Makefile signalProcessing/Makefile signalProcessing/fft/Makefile signalProcessing/ifft/Makefile signalProcessing/levin/Makefile signalProcessing/conv/Makefile signalProcessing/conv2d/Makefile signalProcessing/hilbert/Makefile signalProcessing/crossCorr/Makefile signalProcessing/lpc2cep/Makefile"
@@ -22789,6 +22789,7 @@ do
"matrixOperations/magnitude/Makefile") CONFIG_FILES="$CONFIG_FILES matrixOperations/magnitude/Makefile" ;;
"matrixOperations/squaredMagnitude/Makefile") CONFIG_FILES="$CONFIG_FILES matrixOperations/squaredMagnitude/Makefile" ;;
"matrixOperations/logm/Makefile") CONFIG_FILES="$CONFIG_FILES matrixOperations/logm/Makefile" ;;
+ "matrixOperations/powm/Makefile") CONFIG_FILES="$CONFIG_FILES matrixOperations/powm/Makefile" ;;
"implicitList/Makefile") CONFIG_FILES="$CONFIG_FILES implicitList/Makefile" ;;
"elementaryFunctions/Makefile") CONFIG_FILES="$CONFIG_FILES elementaryFunctions/Makefile" ;;
"elementaryFunctions/cos/Makefile") CONFIG_FILES="$CONFIG_FILES elementaryFunctions/cos/Makefile" ;;
diff --git a/src/configure.ac b/src/configure.ac
index f9936911..215bf92c 100644
--- a/src/configure.ac
+++ b/src/configure.ac
@@ -185,6 +185,7 @@ matrixOperations/fill/Makefile
matrixOperations/magnitude/Makefile
matrixOperations/squaredMagnitude/Makefile
matrixOperations/logm/Makefile
+matrixOperations/powm/Makefile
implicitList/Makefile
elementaryFunctions/Makefile
elementaryFunctions/cos/Makefile