summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjofret2010-06-21 12:40:11 +0000
committerjofret2010-06-21 12:40:11 +0000
commitee9374440a33f8432ad4efcc7b70bc1639fa50de (patch)
tree74b7ee57aad7bca60682cd02ff3582eef0717bfb
parentfaf93a14fff220325fb0a9dd372169c29e90fbbf (diff)
downloadscilab2c-ee9374440a33f8432ad4efcc7b70bc1639fa50de.tar.gz
scilab2c-ee9374440a33f8432ad4efcc7b70bc1639fa50de.tar.bz2
scilab2c-ee9374440a33f8432ad4efcc7b70bc1639fa50de.zip
Manage Hypermatrix insertion with one coordinate
-rw-r--r--scilab2c/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci317
-rw-r--r--scilab2c/src/c/operations/interfaces/int_OpIns.h96
-rw-r--r--scilab2c/tests/unit_tests/test_hypermat.sci9
3 files changed, 218 insertions, 204 deletions
diff --git a/scilab2c/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci b/scilab2c/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci
index c8d0aea2..024b8d9e 100644
--- a/scilab2c/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci
+++ b/scilab2c/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci
@@ -300,27 +300,27 @@ PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file',
INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
-FunctionName = 'fix'; //BJ : Done AS : Float_Done
+FunctionName = 'fix'; //BJ : Done AS : Float_Done
PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
-FunctionName = 'floor'; //BJ : Done AS : Float_Done
+FunctionName = 'floor'; //BJ : Done AS : Float_Done
PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
-FunctionName = 'round'; //BJ : Done AS : Float_Done
+FunctionName = 'round'; //BJ : Done AS : Float_Done
PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
-FunctionName = 'int'; //BJ : Done AS : Float_Done
+FunctionName = 'int'; //BJ : Done AS : Float_Done
PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
-FunctionName = 'OpLogNot'; //BJ : Done AS : Float_Done
+FunctionName = 'OpLogNot'; //BJ : Done AS : Float_Done
PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
@@ -330,12 +330,12 @@ PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file',
INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
-FunctionName = 'sign'; //BJ : Done AS : Float_Done
+FunctionName = 'sign'; //BJ : Done AS : Float_Done
PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
-FunctionName = 'chol'; //BJ : Done AS : Float_Done
+FunctionName = 'chol'; //BJ : Done AS : Float_Done
PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
@@ -381,7 +381,7 @@ PrintStringInfo('d2d2'+ArgSeparator+'d2',ClassFileName,'file','y');
// PrintStringInfo('z2z2'+ArgSeparator+'z2',ClassFileName,'file','y');
// --- Annotation Function And Function List Function. ---
-FunctionName = 'atan'; //BJ : atan AS : Float_Done
+FunctionName = 'atan'; //BJ : atan AS : Float_Done
PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
@@ -432,32 +432,32 @@ PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file',
INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
-FunctionName = 'acosh'; // BJ : Done AS : Float_Done
+FunctionName = 'acosh'; // BJ : Done AS : Float_Done
PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
-FunctionName = 'atanh'; // BJ : Done AS : Float_Done
+FunctionName = 'atanh'; // BJ : Done AS : Float_Done
PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
-FunctionName = 'sqrt'; // BJ : Done AS : Float_Done
+FunctionName = 'sqrt'; // BJ : Done AS : Float_Done
PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
-FunctionName = 'log'; // BJ : Done AS : Float_Done
+FunctionName = 'log'; // BJ : Done AS : Float_Done
PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
-FunctionName = 'log10'; // BJ : Done AS : Float_Done
+FunctionName = 'log10'; // BJ : Done AS : Float_Done
PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
-FunctionName = 'log1p'; // BJ : Ok AS : Float_Done
+FunctionName = 'log1p'; // BJ : Ok AS : Float_Done
//--> log1p(%i) Not implemented in Scilab.
//WARNING z0log1pz0 will never happened.
PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
@@ -781,7 +781,7 @@ PrintStringInfo('c0s2'+ArgSeparator+'c2',ClassFileName,'file','y');
PrintStringInfo('z0z2'+ArgSeparator+'z2',ClassFileName,'file','y');
PrintStringInfo('d0z2'+ArgSeparator+'z2',ClassFileName,'file','y');
PrintStringInfo('z0d2'+ArgSeparator+'z2',ClassFileName,'file','y');
-
+
PrintStringInfo('s2s2'+ArgSeparator+'s2',ClassFileName,'file','y');
PrintStringInfo('d2d2'+ArgSeparator+'d2',ClassFileName,'file','y');
PrintStringInfo('c2c2'+ArgSeparator+'c2',ClassFileName,'file','y');
@@ -842,7 +842,7 @@ PrintStringInfo('s0s2'+ArgSeparator+'s2',ClassFileName,'file','y');
PrintStringInfo('d0d2'+ArgSeparator+'d2',ClassFileName,'file','y');
PrintStringInfo('c0c2'+ArgSeparator+'c2',ClassFileName,'file','y');
PrintStringInfo('z0z2'+ArgSeparator+'z2',ClassFileName,'file','y');
-
+
PrintStringInfo('s2s2'+ArgSeparator+'s2',ClassFileName,'file','y');
PrintStringInfo('d2d2'+ArgSeparator+'d2',ClassFileName,'file','y');
PrintStringInfo('c2c2'+ArgSeparator+'c2',ClassFileName,'file','y');
@@ -948,7 +948,7 @@ PrintStringInfo('c0c2'+ArgSeparator+'s2',ClassFileName,'file','y');
PrintStringInfo('z0z2'+ArgSeparator+'d2',ClassFileName,'file','y');
PrintStringInfo('g0g2'+ArgSeparator+'s2',ClassFileName,'file','y');
PrintStringInfo('g0g2'+ArgSeparator+'d2',ClassFileName,'file','y');
-
+
PrintStringInfo('s2s2'+ArgSeparator+'s2',ClassFileName,'file','y');
PrintStringInfo('d2d2'+ArgSeparator+'d2',ClassFileName,'file','y');
PrintStringInfo('c2c2'+ArgSeparator+'s2',ClassFileName,'file','y');
@@ -992,13 +992,13 @@ INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,E
INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
FunctionName = 'OpLogAnd'; // AS : Double and Float_Done
- // ERROR : z0z0OpLogAndz0 -> z0z0OpLogAndd0
+ // ERROR : z0z0OpLogAndz0 -> z0z0OpLogAndd0
PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
FunctionName = 'OpLogOr'; // AS : Double and Float_Done
- // ERROR : z0z0OpLogAndz0 -> z0z0OpLogAndd0
+ // ERROR : z0z0OpLogAndz0 -> z0z0OpLogAndd0
PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
@@ -1045,7 +1045,7 @@ PrintStringInfo('c0c2'+ArgSeparator+'c2',ClassFileName,'file','y');
PrintStringInfo('d0z2'+ArgSeparator+'z2',ClassFileName,'file','y');
PrintStringInfo('z0d2'+ArgSeparator+'z2',ClassFileName,'file','y');
PrintStringInfo('z0z2'+ArgSeparator+'z2',ClassFileName,'file','y');
-
+
PrintStringInfo('s2s2'+ArgSeparator+'s2',ClassFileName,'file','y');
PrintStringInfo('d2d2'+ArgSeparator+'d2',ClassFileName,'file','y');
PrintStringInfo('s2c2'+ArgSeparator+'c2',ClassFileName,'file','y');
@@ -1066,7 +1066,7 @@ PrintStringInfo('z2z2'+ArgSeparator+'z0',ClassFileName,'file','y');
// --- Annotation Function And Function List Function. ---
FunctionName = 'OpStar'; // BJ : Done AS : Float_Done
-
+
PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
@@ -1116,7 +1116,7 @@ PrintStringInfo('c0c2'+ArgSeparator+'c2',ClassFileName,'file','y');
PrintStringInfo('d0z2'+ArgSeparator+'z2',ClassFileName,'file','y');
PrintStringInfo('z0d2'+ArgSeparator+'z2',ClassFileName,'file','y');
PrintStringInfo('z0z2'+ArgSeparator+'z2',ClassFileName,'file','y');
-
+
PrintStringInfo('s2s2'+ArgSeparator+'s2',ClassFileName,'file','y');
PrintStringInfo('d2d2'+ArgSeparator+'d2',ClassFileName,'file','y');
PrintStringInfo('s2c2'+ArgSeparator+'c2',ClassFileName,'file','y');
@@ -1270,7 +1270,7 @@ PrintStringInfo('d0z2'+ArgSeparator+'z2',ClassFileName,'file','y');
PrintStringInfo('z0d2'+ArgSeparator+'z2',ClassFileName,'file','y');
PrintStringInfo('z0z2'+ArgSeparator+'z2',ClassFileName,'file','y');
PrintStringInfo('g0g2'+ArgSeparator+'g2',ClassFileName,'file','y');
-
+
PrintStringInfo('s2s2'+ArgSeparator+'s2',ClassFileName,'file','y');
PrintStringInfo('d2d2'+ArgSeparator+'d2',ClassFileName,'file','y');
PrintStringInfo('s2c2'+ArgSeparator+'c2',ClassFileName,'file','y');
@@ -1349,7 +1349,7 @@ PrintStringInfo('c0c2'+ArgSeparator+'c2',ClassFileName,'file','y');
PrintStringInfo('d0z2'+ArgSeparator+'z2',ClassFileName,'file','y');
PrintStringInfo('z0d2'+ArgSeparator+'z2',ClassFileName,'file','y');
PrintStringInfo('z0z2'+ArgSeparator+'z2',ClassFileName,'file','y');
-
+
PrintStringInfo('s2s2'+ArgSeparator+'s2',ClassFileName,'file','y');
PrintStringInfo('d2d2'+ArgSeparator+'d2',ClassFileName,'file','y');
PrintStringInfo('s2c2'+ArgSeparator+'c2',ClassFileName,'file','y');
@@ -1687,7 +1687,7 @@ PrintStringInfo(ArgSeparator,ClassFileName,'file','y');
//NUT anche se metto Return funziona bene comunque! cerca di capire il motivo.
//NUT limited use to zero in and out args only.
// --- Annotation Function And Function List Function. ---
-FunctionName = 'return';
+FunctionName = 'return';
PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
@@ -1746,7 +1746,7 @@ PrintStringInfo('z0z0z0'+ArgSeparator+'d0',ClassFileName,'file','y');
PrintStringInfo('s0s0c0'+ArgSeparator+'s0',ClassFileName,'file','y');
PrintStringInfo('s0c0s0'+ArgSeparator+'s0',ClassFileName,'file','y');
PrintStringInfo('s0c0c0'+ArgSeparator+'s0',ClassFileName,'file','y');
-
+
PrintStringInfo('c0s0s0'+ArgSeparator+'s0',ClassFileName,'file','y');
PrintStringInfo('c0c0s0'+ArgSeparator+'s0',ClassFileName,'file','y');
PrintStringInfo('c0s0c0'+ArgSeparator+'s0',ClassFileName,'file','y');
@@ -1769,7 +1769,7 @@ PrintStringInfo('z0z0z0'+ArgSeparator+'d2',ClassFileName,'file','y');
PrintStringInfo('s0s0c0'+ArgSeparator+'s2',ClassFileName,'file','y');
PrintStringInfo('s0c0s0'+ArgSeparator+'s2',ClassFileName,'file','y');
PrintStringInfo('s0c0c0'+ArgSeparator+'s2',ClassFileName,'file','y');
-
+
PrintStringInfo('c0s0s0'+ArgSeparator+'s2',ClassFileName,'file','y');
PrintStringInfo('c0c0s0'+ArgSeparator+'s2',ClassFileName,'file','y');
PrintStringInfo('c0s0c0'+ArgSeparator+'s2',ClassFileName,'file','y');
@@ -1967,10 +1967,11 @@ PrintStringInfo('z2d2d0d2'+ArgSeparator,ClassFileName,'file','y');
PrintStringInfo('z2d2d2d2'+ArgSeparator,ClassFileName,'file','y');
// Hypermatrix management
+PrintStringInfo('d3d0d0'+ArgSeparator,ClassFileName,'file','y');
PrintStringInfo('d3d0d0d0d0'+ArgSeparator,ClassFileName,'file','y');
// --- Annotation Function And Function List Function. ---
-FunctionName = 'OpIns'; // AS : Done AS : Float_Done
+FunctionName = 'OpIns'; // AS : Done AS : Float_Done
PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
@@ -2203,7 +2204,7 @@ PrintStringInfo('s0g2f0'+ArgSeparator,ClassFileName,'file','y');
PrintStringInfo('s2g2f0'+ArgSeparator,ClassFileName,'file','y');
PrintStringInfo('d0g2f0'+ArgSeparator,ClassFileName,'file','y');
PrintStringInfo('d2g2f0'+ArgSeparator,ClassFileName,'file','y');
-PrintStringInfo('s0g2f0'+ArgSeparator+'i0',ClassFileName,'file','y'); //NUT la mput e' strana
+PrintStringInfo('s0g2f0'+ArgSeparator+'i0',ClassFileName,'file','y'); //NUT la mput e' strana
PrintStringInfo('s2g2f0'+ArgSeparator+'i0',ClassFileName,'file','y');
PrintStringInfo('d0g2f0'+ArgSeparator+'i0',ClassFileName,'file','y');
PrintStringInfo('d2g2f0'+ArgSeparator+'i0',ClassFileName,'file','y');
@@ -2222,8 +2223,8 @@ PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
PrintStringInfo('NIN= 3',ClassFileName,'file','y');
PrintStringInfo('NOUT= 1 ',ClassFileName,'file','y');
-PrintStringInfo('OUT(1).TP= FA_TP_USER',ClassFileName,'file','y');
-PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= FA_TP_USER',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y');
PrintStringInfo('OUT(1).SZ(2)= FA_SZ_RTMAX(FA_SZ_FROM_VAL(IN(1).VAL,IN(1).TP))',ClassFileName,'file','y');
// --- Function List Class. ---
@@ -2269,7 +2270,7 @@ FunctionName = 'mclose';
PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
-
+
// ---------------------
// --- Class Mseek. ---
// ---------------------
@@ -3118,43 +3119,43 @@ INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,Ex
// ////////////////////////////////////////////
-// /////PARTE INTRODOTTA DA ALBERTO MOREA
+// /////PARTE INTRODOTTA DA ALBERTO MOREA
// /////////////////////////////////////////////
// ///////////////////////////////////////////////
// // DOMAINS DEFINITION FOR EVERY CLASS-LEADER IN SCI2C LIBRARY
-// // In the following lets:
+// // In the following lets:
// // N,R ,C are the standard sets of integer,real ,complex numbers
-// // I,J c R are intervals of real numbers
-// // {} the empty set
-// // Sel={'r','c'} or {0,1} are the selection sets r=row,c=column
+// // I,J c R are intervals of real numbers
+// // {} the empty set
+// // Sel={'r','c'} or {0,1} are the selection sets r=row,c=column
// // B={T,F} is Boolean set
-// // F is the standard set of File IDentify files
+// // F is the standard set of File IDentify files
// // G is the standard alphanumeric string domain
-// // For every sci2c function library class we reported
-// // the domains , annotations only for the class-leader
+// // For every sci2c function library class we reported
+// // the domains , annotations only for the class-leader
// // Example [y1,y2]=Fun(x1,x2,x3) : scilab library function call
-// // Domain RxNxSel->{R,R} :the first input element is real number ,the second is integer ,
+// // Domain RxNxSel->{R,R} :the first input element is real number ,the second is integer ,
// // the last is in the selection set
// // The first output and the second are real numbers
-// // Notice : only default (double) precision are considered for real and complex data
-// // The dimension of the input/output data are provided in the mapping schema
+// // Notice : only default (double) precision are considered for real and complex data
+// // The dimension of the input/output data are provided in the mapping schema
-// // d0 = double real scalar
+// // d0 = double real scalar
// // d2 = double real vector or matrix
-// // z0= double complex scalar
+// // z0= double complex scalar
// // z2= double complex vector or matrix
// // ---------------------
// // --- Class Global. ---
// // ---------------------
-// // DOMAINS G -> R
+// // DOMAINS G -> R
// //////////////////////////////////
@@ -3163,7 +3164,7 @@ INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,Ex
// // --- Class Float. ---
// // ---------------------
-// // DOMAINS R -> R
+// // DOMAINS R -> R
// //////////////////////////////////
@@ -3172,7 +3173,7 @@ INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,Ex
// // --- Class Double. ---
// // ---------------------
-// // DOMAINS R -> R
+// // DOMAINS R -> R
// //////////////////////////////////
@@ -3180,8 +3181,8 @@ INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,Ex
// // --- Class FloatComplex. ---
// // ----------------------------
-// // DOMAINS 1)R -> C
-// // 2)C -> C
+// // DOMAINS 1)R -> C
+// // 2)C -> C
// /////////////////////////////////
@@ -3189,8 +3190,8 @@ INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,Ex
// // --- Class DoubleComplex. ---
// // ----------------------------
-// // DOMAINS 1) R -> C
-// // 2) C -> C
+// // DOMAINS 1) R -> C
+// // 2) C -> C
// /////////////////////////////////
@@ -3198,8 +3199,8 @@ INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,Ex
// // --- Class Sin. ---
// // ------------------
-// // DOMAINS 1) IcR -> JcR
-// // 2) C -> C
+// // DOMAINS 1) IcR -> JcR
+// // 2) C -> C
// /////////////////////////////////
@@ -3207,49 +3208,49 @@ INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,Ex
// // --- Class Atan. ---
// // -------------------
-// // DOMAINS 1) IcR -> JcR
-// // 2) C -> C
+// // DOMAINS 1) IcR -> JcR
+// // 2) C -> C
// // 3) RxR -> JcR
-
+
// /////////////////////////////////
// // -------------------
// // --- Class Sqrt. ---
// // -------------------
-// // DOMAINS 1) IcR -> JcR
-// // 2) R -> R
+// // DOMAINS 1) IcR -> JcR
+// // 2) R -> R
// // 3) C -> C
-
+
// /////////////////////////////////
// // --------------------
// // --- Class Zeros. ---
// // --------------------
-// // DOMAINS 1) {}->R
-// // 2) NxN -> R
-// // 3) R -> R
+// // DOMAINS 1) {}->R
+// // 2) NxN -> R
+// // 3) R -> R
// // 4) C -> R
-
+
// /////////////////////////////////
// // --------------------
// // --- Class Sum. ---
// // --------------------
-// // DOMAINS 1) R -> R
+// // DOMAINS 1) R -> R
// // 2) C -> C
// // 3) RxSel -> R
// // 4) CxSel -> R
-
+
// /////////////////////////////////
// // --------------------
// // --- Class Abs. ---
// // --------------------
-// // DOMAINS 1) R -> R+
+// // DOMAINS 1) R -> R+
// // 2) C -> R+
// /////////////////////////////////
@@ -3258,9 +3259,9 @@ INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,Ex
// // --- Class OpDotStar. ---
// // ------------------------
-// // DOMAINS 1) RxR -> R
-// // 2) CxC -> C
-// // 3) RxC -> C
+// // DOMAINS 1) RxR -> R
+// // 2) CxC -> C
+// // 3) RxC -> C
// // 4) CxR -> C
// /////////////////////////////////
@@ -3269,8 +3270,8 @@ INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,Ex
// // --- Class OpDotHat. ---
// // ------------------------
-// // DOMAINS 1) RxR -> R
-// // 2) CxC -> C
+// // DOMAINS 1) RxR -> R
+// // 2) CxC -> C
// /////////////////////////////////
@@ -3278,8 +3279,8 @@ INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,Ex
// // --- Class OpLogEq. ---
// // ----------------------
-// // DOMAINS 1) RxR -> B
-// // 2) CxC -> B
+// // DOMAINS 1) RxR -> B
+// // 2) CxC -> B
// // 3) GxG -> B
// /////////////////////////////////
@@ -3288,9 +3289,9 @@ INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,Ex
// // --- Class OpStar. ---
// // ---------------------
-// // DOMAINS 1) RxR -> R
-// // 2) CxC -> C
-// // 3) RxC -> C
+// // DOMAINS 1) RxR -> R
+// // 2) CxC -> C
+// // 3) RxC -> C
// // 4) CxR -> C
// /////////////////////////////////
@@ -3299,7 +3300,7 @@ INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,Ex
// // --- Class OpApex. ---
// // ---------------------
-// // DOMAINS 1) R -> R
+// // DOMAINS 1) R -> R
// // 2) C -> C
// /////////////////////////////////
@@ -3308,13 +3309,13 @@ INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,Ex
// // --- Class OpPlus. ---
// // ---------------------
-// // DOMAINS 1) R -> R
-// // 2) C -> C
-// // 3) RxR -> R
+// // DOMAINS 1) R -> R
+// // 2) C -> C
+// // 3) RxR -> R
// // 4) CxC -> C
// // 5) RxC -> C
-// // 6) CxR -> C
-// // 7) GxG -> G
+// // 6) CxR -> C
+// // 7) GxG -> G
// /////////////////////////////////
@@ -3322,12 +3323,12 @@ INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,Ex
// // --- Class OpMinus. ---
// // ----------------------
-// // DOMAINS 1) R -> R
-// // 2) C -> C
-// // 3) RxR -> R
+// // DOMAINS 1) R -> R
+// // 2) C -> C
+// // 3) RxR -> R
// // 4) CxC -> C
// // 5) RxC -> C
-// // 6) CxR -> C
+// // 6) CxR -> C
// /////////////////////////////////
@@ -3336,8 +3337,8 @@ INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,Ex
// // --- Class OpRc. ---
// // -------------------
-// // DOMAINS 1) RxR -> R
-// // 2) CxC -> C
+// // DOMAINS 1) RxR -> R
+// // 2) CxC -> C
// /////////////////////////////////
@@ -3345,8 +3346,8 @@ INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,Ex
// // --- Class OpCc. ---
// // -------------------
-// // DOMAINS 1) RxR -> R
-// // 2) CxC -> C
+// // DOMAINS 1) RxR -> R
+// // 2) CxC -> C
// /////////////////////////////////
@@ -3354,9 +3355,9 @@ INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,Ex
// // --- Class Find. ---
// // -------------------
-// // DOMAINS 1) R -> N
-// // 2) R -> {N,N}
-// // 3) RxN -> N
+// // DOMAINS 1) R -> N
+// // 2) R -> {N,N}
+// // 3) RxN -> N
// // 4) RxN ->{N,N}
// /////////////////////////////////
@@ -3365,9 +3366,9 @@ INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,Ex
// // --- Class Length. ---
// // ---------------------
-// // DOMAINS 1) R -> N
-// // 2) C -> N
-// // 3) G -> N
+// // DOMAINS 1) R -> N
+// // 2) C -> N
+// // 3) G -> N
// /////////////////////////////////
@@ -3375,9 +3376,9 @@ INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,Ex
// // --- Class Size. ---
// // -------------------
-// // DOMAINS 1) R -> {N,N}
-// // 2) C -> {N,N}
-// // 3) RxSel -> {N,N}
+// // DOMAINS 1) R -> {N,N}
+// // 2) C -> {N,N}
+// // 3) RxSel -> {N,N}
// // 4) CxSel -> {N,N}
// /////////////////////////////////
@@ -3385,7 +3386,7 @@ INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,Ex
// // ---------------------
// // --- Class Return. ---
// // ---------------------
-// // DOMAINS 1) {} -> {}
+// // DOMAINS 1) {} -> {}
// /////////////////////////////////
@@ -3393,7 +3394,7 @@ INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,Ex
// // --- Class OpColon. ---
// // ----------------------
-// // DOMAINS 1) RxR -> R
+// // DOMAINS 1) RxR -> R
// // 2) RxRxR -> R
// /////////////////////////////////
@@ -3402,7 +3403,7 @@ INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,Ex
// // --- Class IsEmpty. ---
// // ----------------------
-// // DOMAINS 1) R -> B
+// // DOMAINS 1) R -> B
// // 2) C -> B
// /////////////////////////////////
@@ -3411,7 +3412,7 @@ INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,Ex
// // --- Class Trace. ---
// // ----------------------
-// // DOMAINS 1) R -> R
+// // DOMAINS 1) R -> R
// // 2) C -> C
// ////////////////////////////////
@@ -3432,7 +3433,7 @@ INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,Ex
// // --- Class OpExt. ---
// // --------------------
-// // DOMAINS 1) RxR -> R
+// // DOMAINS 1) RxR -> R
// // 2) CxR -> C
// // 3) CxRxR -> C
@@ -3442,7 +3443,7 @@ INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,Ex
// // --- Class Disp. ---
// // -------------------
-// // DOMAINS 1) R -> R
+// // DOMAINS 1) R -> R
// // 2) C -> R
// // 3) G -> R
@@ -3452,7 +3453,7 @@ INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,Ex
// // --- Class OpEqual. ---
// // ----------------------
-// // DOMAINS 1) R -> R
+// // DOMAINS 1) R -> R
// // 2) C -> C
// // 3) G -> G
@@ -3510,20 +3511,20 @@ INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,Ex
// // --- Class Convol. ---
// // ---------------------
-// // DOMAINS 1) RxR->R
- // 2) CxC->C
- // 3) RxC->C
+// // DOMAINS 1) RxR->R
+ // 2) CxC->C
+ // 3) RxC->C
// 4) CxR->C
- // 5) RxR->{R,R}
- // 6) CxC->{C,C}
- // 7) RxC->{C,C}
- // 8) CxR->{C,C}
+ // 5) RxR->{R,R}
+ // 6) CxC->{C,C}
+ // 7) RxC->{C,C}
+ // 8) CxR->{C,C}
// 9) CxC->{C,C}
- // 10) RxRxR->{R,R}
- // 11) RxCxC->{C,C}
+ // 10) RxRxR->{R,R}
+ // 11) RxCxC->{C,C}
// and so on …..
-
-
+
+
// ////////////////////////////////
@@ -3531,58 +3532,58 @@ INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,Ex
// // --- Class IFFT. ---
// // -------------------
-// // DOMAINS 1) R->C
- // 2) C->C
-
+// // DOMAINS 1) R->C
+ // 2) C->C
+
// ////////////////////////////////
// // ------------------
// // --- Class FFT. ---
// // ------------------
-// // DOMAINS 1) R->C
- // 2) RxN->C
- // 3) C->C
+// // DOMAINS 1) R->C
+ // 2) RxN->C
+ // 3) C->C
// 4) CxN->C
- // 5) RxNxN->C
- // 6) CxNxN->C
+ // 5) RxNxN->C
+ // 6) CxNxN->C
// 7) RxNxNxN->C
// 8) CxNxNxN->C
-
+
// ////////////////////////////////
// // -----------------------
// // --- Class FFTShift. ---
// // -----------------------
-// // DOMAINS 1) R->R
- // 2) C->C
- // 3) RxR->R
+// // DOMAINS 1) R->R
+ // 2) C->C
+ // 3) RxR->R
// 4) RxG->R
- // 5) CxR->C
- // 6) CxG->C
-
-// ////////////////////////////////
-
+ // 5) CxR->C
+ // 6) CxG->C
+
+// ////////////////////////////////
+
// // --------------------
// // --- Class Meanf. ---
// // --------------------
-// // DOMAINS 1) R->R
- // 2) C->C
- // 3) CxSel->C
+// // DOMAINS 1) R->R
+ // 2) C->C
+ // 3) CxSel->C
// 4) RxSel->R
-
+
// ////////////////////////////////
// // --------------------
// // --- Class Frmag. ---
// // --------------------
-// // DOMAINS 1) RxN->R
- // 2) RxN->{R,R}
- // 3) RxRxN->R
- // 4) RxRxN->{R,R}
+// // DOMAINS 1) RxN->R
+ // 2) RxN->{R,R}
+ // 3) RxRxN->R
+ // 4) RxRxN->{R,R}
// ////////////////////////////////
@@ -3590,41 +3591,41 @@ INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,Ex
// // --- Class Lev. ---
// // ------------------
-// // DOMAINS 1) R->R
- // 2) R->{R,R}
+// // DOMAINS 1) R->R
+ // 2) R->{R,R}
// 3) R->{R,R,R}
- // 4) C->C
- // 5) C->{C,C}
- // 6) C->{C,C,C}
-
+ // 4) C->C
+ // 5) C->{C,C}
+ // 6) C->{C,C,C}
+
// ////////////////////////////////
// // --------------------------
// // --- Class OpBackSlash. ---
// // --------------------------
-// // DOMAINS 1) RxR->R
- // 2) CxC->C
- // 3) RxC->C
+// // DOMAINS 1) RxR->R
+ // 2) CxC->C
+ // 3) RxC->C
// 4) CxR->C
-
+
// ////////////////////////////////
// // -----------------------
// // --- Class Cepstrum. ---
// // -----------------------
-// // DOMAINS 1) RxR->C
- // 2) RxC->C
-
+// // DOMAINS 1) RxR->C
+ // 2) RxC->C
+
// ////////////////////////////////
// // -----------------------
// // --- Class Spec. ---
// // -----------------------
-// // DOMAINS 1) R->R
- // 2) C->C
+// // DOMAINS 1) R->R
+ // 2) C->C
// 3) R->{R,R}
// 4) C->{C,C}
diff --git a/scilab2c/src/c/operations/interfaces/int_OpIns.h b/scilab2c/src/c/operations/interfaces/int_OpIns.h
index 6f6d0227..5d3798da 100644
--- a/scilab2c/src/c/operations/interfaces/int_OpIns.h
+++ b/scilab2c/src/c/operations/interfaces/int_OpIns.h
@@ -1,15 +1,16 @@
/*
-** -*- C -*-
-**
-**
-** Made by Raffaele.Nutricato@tiscali.it
-**
-** Copyright Raffaele Nutricato
-*/
-
-/*
- Modify by Arnaud Torset : 20/02/09
-*/
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2009 - POLIBA - Raffaele NUTRICATO
+ * Copyright (C) 2009 - INRIA - Arnaud TORSET
+ * Copyright (C) 2010-2010 - DIGITEO - 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
+ *
+ */
#ifndef __OPINS_H__
#define __OPINS_H__
@@ -24,6 +25,10 @@
#define z2d0z0OpIns(in,size,indice,newVal) in[(int) indice-1]=newVal;
+#define s3s0s0OpIns(in,size,indice,newVal) in[(int) indice-1]=newVal;
+
+#define d3d0d0OpIns(in,size,indice,newVal) in[(int) indice-1]=newVal;
+
/* a([1 2])=2 */
#define s2s2s0OpIns(in,size1,indices,size2,newVal) {int i;\
for (i=0;i<size2[0]*size2[1];i++) in[(int)indices[i]-1]=newVal;\
@@ -41,7 +46,7 @@
#define z2d2z0OpIns(in,size1,indices,size2,newVal) {int i;\
for (i=0;i<size2[0]*size2[1];i++) in[(int)indices[i]-1]=newVal;\
}
-/* a([1 2])=[3,1] */
+/* a([1 2])=[3,1] */
#define s2s2s2OpIns(in,size1,indices,size2,newVals,size3) {int i;\
for (i=0;i<size2[0]*size3[1];i++) in[(int)indices[i]-1]=newVals[i];\
}
@@ -58,9 +63,9 @@
#define z2d2z2OpIns(in,size1,indices,size2,newVals,size3) {int i;\
for (i=0;i<size2[0]*size3[1];i++) in[(int)indices[i]-1]=newVals[i];\
}
-
-/* a(1,3)=2 */
+
+/* a(1,3)=2 */
#define s2s0s0s0OpIns(in,size,row,col,newVal) in[(int)(col-1)*size[0]+(int)row-1]=newVal;
#define d2d0d0d0OpIns(in,size,row,col,newVal) in[(int)(col-1)*size[0]+(int)row-1]=newVal;
@@ -69,8 +74,8 @@
#define z2d0d0z0OpIns(in,size,row,col,newVal) in[(int)(col-1)*size[0]+(int)row-1]=newVal;
-
-/* a(1,[3,1])=2 */
+
+/* a(1,[3,1])=2 */
#define s2s0s2s0OpIns(in,size1,row,cols,size2,newVal) {int i;\
for (i=0;i<size2[0]*size2[1];i++) in[(int)(cols[i]-1)*size1[0]+(int)row-1]=newVal;\
}
@@ -85,10 +90,10 @@
#define z2d0d2z0OpIns(in,size1,row,cols,size2,newVal) {int i;\
for (i=0;i<size2[0]*size2[1];i++) in[(int)(cols[i]-1)*size1[0]+(int)row-1]=newVal;\
- }
+ }
-
-/* a([3,1],1)=2 */
+
+/* a([3,1],1)=2 */
#define s2s2s0s0OpIns(in,size1,rows,size2,col,newVal) {int i;\
for (i=0;i<size2[0]*size2[1];i++) in[(int)(col-1)*size1[0]+(int)rows[i]-1]=newVal;\
}
@@ -104,7 +109,7 @@
#define z2d2d0z0OpIns(in,size1,rows,size2,col,newVal) {int i;\
for (i=0;i<size2[0]*size2[1];i++) in[(int)(col-1)*size1[0]+(int)rows[i]-1]=newVal;\
}
-
+
/* a([3,1],[1 2])=2 */
#define s2s2s2s0OpIns(in,size1,rows,size2,cols,size3,newVal) {int i,j;\
for (i=0;i<size3[0]*size3[1];i++)\
@@ -129,7 +134,7 @@
for (j=0;j<size2[0]*size2[1];j++)\
in[(int)(cols[i]-1)*size1[0]+(int)rows[j]-1]=newVal;\
}
-/* a(1,[3,1])=[2,5] */
+/* a(1,[3,1])=[2,5] */
#define s2s0s2s2OpIns(in,size1,row,cols,size2,newVals,size3) {int i;\
for (i=0;i<size2[0]*size2[1];i++)\
in[(int)(cols[i]-1)*size1[0]+(int)row-1]=newVals[i];\
@@ -148,8 +153,8 @@
#define z2d0d2z2OpIns(in,size1,row,cols,size2,newVals,size3) {int i;\
for (i=0;i<size2[0]*size2[1];i++)\
in[(int)(cols[i]-1)*size1[0]+(int)row-1]=newVals[i];\
- }
-/* a([3,1],1)=[2,5] */
+ }
+/* a([3,1],1)=[2,5] */
#define s2s2s0s2OpIns(in,size1,rows,size2,col,newVals,size3) {int i;\
for (i=0;i<size2[0]*size2[1];i++)\
in[(int)(col-1)*size1[0]+(int)rows[i]-1]=newVals[i];\
@@ -194,9 +199,9 @@
for (j=0;j<size2[0]*size2[1];j++)\
in[(int)(cols[i]-1)*size1[0]+(int)rows[j]-1]=newVals[i*size4[0]+j];\
}
-
-
-/* Mixed types
+
+
+/* Mixed types
2 cases : we assign a real in a complex array => ok, we just have put the imaginary part to 0
we assign a complex in a real array => ko, we can't enlarge the input matrix. So we just replace by the real part of the complex
*/
@@ -220,8 +225,8 @@
#define z2d2d0OpIns(in,size1,indices,size2,newVal) z2d2z0OpIns(in,size1,indices,size2,DoubleComplex(newVal,0))
-
-/* a([1 2])=[3,1] */
+
+/* a([1 2])=[3,1] */
#define s2s2c2OpIns(in,size1,indices,size2,newVals,size3) {int i;\
for (i=0;i<size2[0]*size3[1];i++) in[(int)indices[i]-1]=creals(newVals[i]);\
}
@@ -238,9 +243,9 @@
#define z2d2d2OpIns(in,size1,indices,size2,newVals,size3) {int i;\
for (i=0;i<size2[0]*size3[1];i++) in[(int)indices[i]-1]=DoubleComplex(newVals[i],0);\
}
-
-/* a(1,3)=2 */
+
+/* a(1,3)=2 */
#define s2s0s0c0OpIns(in,size,row,col,newVal) s2s0s0s0OpIns(in,size,row,col,creals(newVal))
#define d2d0d0z0OpIns(in,size,row,col,newVal) d2d0d0d0OpIns(in,size,row,col,zreals(newVal))
@@ -249,26 +254,26 @@
#define z2d0d0d0OpIns(in,size,row,col,newVal) z2d0d0z0OpIns(in,size,row,col,DoubleComplex(newVal,0))
-
-/* a(1,[3,1])=2 */
+
+/* a(1,[3,1])=2 */
#define s2s0s2c0OpIns(in,size1,row,cols,size2,newVal) s2s0s2s0OpIns(in,size1,row,cols,size2,creals(newVal))
#define d2d0d2z0OpIns(in,size1,row,cols,size2,newVal) d2d0d2d0OpIns(in,size1,row,cols,size2,zreals(newVal))
#define c2s0s2s0OpIns(in,size1,row,cols,size2,newVal) c2s0s2c0OpIns(in,size1,row,cols,size2,FloatComplex(newVal,0))
-#define z2d0d2d0OpIns(in,size1,row,cols,size2,newVal) z2d0d2z0OpIns(in,size1,row,cols,size2,DoubleComplex(newVal,0))
+#define z2d0d2d0OpIns(in,size1,row,cols,size2,newVal) z2d0d2z0OpIns(in,size1,row,cols,size2,DoubleComplex(newVal,0))
+
-
-/* a([3,1],1)=2 */
+/* a([3,1],1)=2 */
#define s2s2s0c0OpIns(in,size1,rows,size2,col,newVal) s2s2s0s0OpIns(in,size1,rows,size2,col,creals(newVal))
#define d2d2d0z0OpIns(in,size1,rows,size2,col,newVal) d2d2d0d0OpIns(in,size1,rows,size2,col,zreals(newVal))
#define c2s2s0s0OpIns(in,size1,rows,size2,col,newVal) c2s2s0c0OpIns(in,size1,rows,size2,col,FloatComplex(newVal,0))
-#define z2d2d0d0OpIns(in,size1,rows,size2,col,newVal) z2d2d0z0OpIns(in,size1,rows,size2,col,DoubleComplex(newVal,0))
-
+#define z2d2d0d0OpIns(in,size1,rows,size2,col,newVal) z2d2d0z0OpIns(in,size1,rows,size2,col,DoubleComplex(newVal,0))
+
/* a([3,1],[1 2])=2 */
#define s2s2s2c0OpIns(in,size1,rows,size2,cols,size3,newVal) s2s2s2s0OpIns(in,size1,rows,size2,cols,size3,creals(newVal))
@@ -276,10 +281,10 @@
#define c2s2s2s0OpIns(in,size1,rows,size2,cols,size3,newVal) c2s2s2c0OpIns(in,size1,rows,size2,cols,size3,FloatComplex(newVal,0))
-#define z2d2d2d0OpIns(in,size1,rows,size2,cols,size3,newVal) z2d2d2z0OpIns(in,size1,rows,size2,cols,size3,DoubleComplex(newVal,0))
+#define z2d2d2d0OpIns(in,size1,rows,size2,cols,size3,newVal) z2d2d2z0OpIns(in,size1,rows,size2,cols,size3,DoubleComplex(newVal,0))
-/* a(1,[3,1])=[2,5] */
+/* a(1,[3,1])=[2,5] */
#define s2s0s2c2OpIns(in,size1,row,cols,size2,newVals,size3) {int i;\
for (i=0;i<size2[0]*size2[1];i++)\
in[(int)(cols[i]-1)*size1[0]+(int)row-1]=creals(newVals[i]);\
@@ -298,8 +303,8 @@
#define z2d0d2d2OpIns(in,size1,row,cols,size2,newVals,size3) {int i;\
for (i=0;i<size2[0]*size2[1];i++)\
in[(int)(cols[i]-1)*size1[0]+(int)row-1]=DoubleComplex(newVals[i],0);\
- }
-/* a([3,1],1)=[2,5] */
+ }
+/* a([3,1],1)=[2,5] */
#define s2s2s0c2OpIns(in,size1,rows,size2,col,newVals,size3) {int i;\
for (i=0;i<size2[0]*size2[1];i++)\
in[(int)(col-1)*size1[0]+(int)rows[i]-1]=creals(newVals[i]);\
@@ -348,5 +353,12 @@
for (j=0;j<size2[0]*size2[1];j++)\
in[(int)(cols[i]-1)*size1[0]+(int)rows[j]-1]=DoubleComplex(newVals[i*size4[0]+j],0);\
}
-
+
+/* a(x,y,z) = b */
+
+#define s3s0s0s0s0OpIns(in, size1, row, col, level, newVal) \
+ in[(row - 1) + (col - 1) * size1[0] + (level - 1) * size1[0] * size1[1]] = newVal;
+
+#define d3d0d0d0d0OpIns(in, size1, row, col, level, newVal) \
+ in[(row - 1) + (col - 1) * size1[0] + (level - 1) * size1[0] * size1[1]] = newVal;
#endif /* !__OPINS_H__ */
diff --git a/scilab2c/tests/unit_tests/test_hypermat.sci b/scilab2c/tests/unit_tests/test_hypermat.sci
index 4f9ea50a..6ae6faf9 100644
--- a/scilab2c/tests/unit_tests/test_hypermat.sci
+++ b/scilab2c/tests/unit_tests/test_hypermat.sci
@@ -12,11 +12,12 @@
function test_hypermat()
a = zeros(2,3,4);
- //a(2,2,2) = 2;
- b = zeros(2,5);
- b(2,2) = 2;
+ for i = 1:24
+ a(i) = i
+ end
disp(a);
- disp(b);
+
+
endfunction