summaryrefslogtreecommitdiff
path: root/macros/FunctionAnnotation
diff options
context:
space:
mode:
Diffstat (limited to 'macros/FunctionAnnotation')
-rw-r--r--macros/FunctionAnnotation/FA_GetOutArgInfo.binbin16712 -> 16720 bytes
-rw-r--r--macros/FunctionAnnotation/FA_GetOutArgInfo.sci2
-rw-r--r--macros/FunctionAnnotation/FA_SZ_1.binbin2604 -> 2608 bytes
-rw-r--r--macros/FunctionAnnotation/FA_SZ_1.sci1
-rw-r--r--macros/FunctionAnnotation/FA_SZ_2.binbin2612 -> 2616 bytes
-rw-r--r--macros/FunctionAnnotation/FA_SZ_2.sci1
-rw-r--r--macros/FunctionAnnotation/FA_SZ_COLUMN_DIAG.binbin0 -> 3116 bytes
-rw-r--r--macros/FunctionAnnotation/FA_SZ_COLUMN_DIAG.sci28
-rw-r--r--macros/FunctionAnnotation/FA_SZ_COLUMN_DIAG_INS_EXT.binbin0 -> 3364 bytes
-rw-r--r--macros/FunctionAnnotation/FA_SZ_COL_DIAG_IN_EX.binbin0 -> 5068 bytes
-rw-r--r--macros/FunctionAnnotation/FA_SZ_COL_DIAG_IN_EX.sci30
-rw-r--r--macros/FunctionAnnotation/FA_SZ_FROM_VAL.binbin3448 -> 3448 bytes
-rw-r--r--macros/FunctionAnnotation/FA_SZ_FROM_VAL.sci22
-rw-r--r--macros/FunctionAnnotation/FA_SZ_ROW_COLUMN.binbin0 -> 10920 bytes
-rw-r--r--macros/FunctionAnnotation/FA_SZ_ROW_COLUMN.sci85
-rw-r--r--macros/FunctionAnnotation/FA_SZ_ROW_COLUMN_CAT.binbin0 -> 2812 bytes
-rw-r--r--macros/FunctionAnnotation/FA_SZ_ROW_DIAG.binbin0 -> 3164 bytes
-rw-r--r--macros/FunctionAnnotation/FA_SZ_ROW_DIAG.sci26
-rw-r--r--macros/FunctionAnnotation/FA_SZ_ROW_DIAG_INS_EXT.binbin0 -> 16296 bytes
-rw-r--r--macros/FunctionAnnotation/FA_SZ_ROW_DIAG_INS_EXT.sci72
-rw-r--r--macros/FunctionAnnotation/libbin1964 -> 2104 bytes
-rw-r--r--macros/FunctionAnnotation/names6
22 files changed, 262 insertions, 11 deletions
diff --git a/macros/FunctionAnnotation/FA_GetOutArgInfo.bin b/macros/FunctionAnnotation/FA_GetOutArgInfo.bin
index 1deaff6..39d97b2 100644
--- a/macros/FunctionAnnotation/FA_GetOutArgInfo.bin
+++ b/macros/FunctionAnnotation/FA_GetOutArgInfo.bin
Binary files differ
diff --git a/macros/FunctionAnnotation/FA_GetOutArgInfo.sci b/macros/FunctionAnnotation/FA_GetOutArgInfo.sci
index 84640df..37e6d09 100644
--- a/macros/FunctionAnnotation/FA_GetOutArgInfo.sci
+++ b/macros/FunctionAnnotation/FA_GetOutArgInfo.sci
@@ -27,6 +27,8 @@ SCI2CNInArgCheck(argn(2),9,9);
// -----------------------
// --- Initialization. ---
// -----------------------
+
+
UpdatedOutArg = OutArg;
for cntin = 1:NInArg
IN(cntin).TP = InArg(cntin).Type;
diff --git a/macros/FunctionAnnotation/FA_SZ_1.bin b/macros/FunctionAnnotation/FA_SZ_1.bin
index 91cd951..c01ff59 100644
--- a/macros/FunctionAnnotation/FA_SZ_1.bin
+++ b/macros/FunctionAnnotation/FA_SZ_1.bin
Binary files differ
diff --git a/macros/FunctionAnnotation/FA_SZ_1.sci b/macros/FunctionAnnotation/FA_SZ_1.sci
index d9a481c..3d20b99 100644
--- a/macros/FunctionAnnotation/FA_SZ_1.sci
+++ b/macros/FunctionAnnotation/FA_SZ_1.sci
@@ -17,4 +17,5 @@ function outsize = FA_SZ_1(insize)
// -----------------------------------------------------------------
outsize = insize(1);
+
endfunction
diff --git a/macros/FunctionAnnotation/FA_SZ_2.bin b/macros/FunctionAnnotation/FA_SZ_2.bin
index 099f1d6..00834df 100644
--- a/macros/FunctionAnnotation/FA_SZ_2.bin
+++ b/macros/FunctionAnnotation/FA_SZ_2.bin
Binary files differ
diff --git a/macros/FunctionAnnotation/FA_SZ_2.sci b/macros/FunctionAnnotation/FA_SZ_2.sci
index 64fdac1..164cab3 100644
--- a/macros/FunctionAnnotation/FA_SZ_2.sci
+++ b/macros/FunctionAnnotation/FA_SZ_2.sci
@@ -17,4 +17,5 @@ function outsize = FA_SZ_2(insize)
// -----------------------------------------------------------------
outsize = insize(2);
+
endfunction
diff --git a/macros/FunctionAnnotation/FA_SZ_COLUMN_DIAG.bin b/macros/FunctionAnnotation/FA_SZ_COLUMN_DIAG.bin
new file mode 100644
index 0000000..68d6a37
--- /dev/null
+++ b/macros/FunctionAnnotation/FA_SZ_COLUMN_DIAG.bin
Binary files differ
diff --git a/macros/FunctionAnnotation/FA_SZ_COLUMN_DIAG.sci b/macros/FunctionAnnotation/FA_SZ_COLUMN_DIAG.sci
new file mode 100644
index 0000000..df129f9
--- /dev/null
+++ b/macros/FunctionAnnotation/FA_SZ_COLUMN_DIAG.sci
@@ -0,0 +1,28 @@
+function outsize = FA_SZ_COLUMN_DIAG(insize)
+ // function outsize = FA_SZ_1(insize)
+ // -----------------------------------------------------------------
+ // Returns the first element of the size array.
+ //
+ // Input data:
+ // insize: size of input argument. It is an array of 2 strings.
+ // The first string specifies the number of rows.
+ // The second string specifies the number of columns.
+ //
+ // Output data:
+ // outsize: first element of the insize array.
+ //
+ // Status:
+ // 08-Dec-2007 -- Raffaele Nutricato: Author.
+ // 08-Dec-2007 -- Alberto Morea: Test Ok.
+ // -----------------------------------------------------------------
+
+ if(insize(2)=='1') then
+ outsize = insize(1);
+
+ elseif(insize(1) == insize(2))
+ outsize = '1';
+ else
+ outsize = insize(2);
+
+ end
+endfunction
diff --git a/macros/FunctionAnnotation/FA_SZ_COLUMN_DIAG_INS_EXT.bin b/macros/FunctionAnnotation/FA_SZ_COLUMN_DIAG_INS_EXT.bin
new file mode 100644
index 0000000..6d88309
--- /dev/null
+++ b/macros/FunctionAnnotation/FA_SZ_COLUMN_DIAG_INS_EXT.bin
Binary files differ
diff --git a/macros/FunctionAnnotation/FA_SZ_COL_DIAG_IN_EX.bin b/macros/FunctionAnnotation/FA_SZ_COL_DIAG_IN_EX.bin
new file mode 100644
index 0000000..e39a0be
--- /dev/null
+++ b/macros/FunctionAnnotation/FA_SZ_COL_DIAG_IN_EX.bin
Binary files differ
diff --git a/macros/FunctionAnnotation/FA_SZ_COL_DIAG_IN_EX.sci b/macros/FunctionAnnotation/FA_SZ_COL_DIAG_IN_EX.sci
new file mode 100644
index 0000000..45d74c3
--- /dev/null
+++ b/macros/FunctionAnnotation/FA_SZ_COL_DIAG_IN_EX.sci
@@ -0,0 +1,30 @@
+function outsize =FA_SZ_COL_DIAG_IN_EX(insize,val)
+
+///////////////////////////////COLUMN SIZE FOR INSERT POSITION//////////////////
+
+
+
+ if((insize(1) == '1')) // If ROW size is 1
+ if(val == '0') then //For Oth position
+ outsize = insize(2); //COLUMN size is equal to COLUMN size
+ else // For ...-2,-1,1,2... position
+ outsize = string(eval(insize(2))+abs(eval(val)));// COLUMN size is equal to COLUMN size + absolute value of position(for 1*3 matrix and 2nd postion COLUMN size is (3+2)=5
+ end
+ elseif((insize(2) == '1')) // If COLUMN size is 1
+ if(val == '0') then //For Oth position
+ outsize = insize(1); //COLUMNS size is equal to ROW size
+ else // For ...-2,-1,1,2.... position
+ outsize = string(eval(insize(1))+abs(eval(val)));// COLUMN size is equal to ROW size + absolute value of position(for 3*1 matrix and 1st postion COLUMN size is (3+1)=4
+ end
+////////////////////////////////////////////////////////////////////////////////
+
+
+////////////////////////////COLUMN SIZE FOR EXTRACT POSITION////////////////////
+
+ else
+ outsize = '1'; // For extract condition COLUMN size is always ONE.
+ end
+
+////////////////////////////////////////////////////////////////////////////////
+
+endfunction
diff --git a/macros/FunctionAnnotation/FA_SZ_FROM_VAL.bin b/macros/FunctionAnnotation/FA_SZ_FROM_VAL.bin
index 9a39d12..a06f3b1 100644
--- a/macros/FunctionAnnotation/FA_SZ_FROM_VAL.bin
+++ b/macros/FunctionAnnotation/FA_SZ_FROM_VAL.bin
Binary files differ
diff --git a/macros/FunctionAnnotation/FA_SZ_FROM_VAL.sci b/macros/FunctionAnnotation/FA_SZ_FROM_VAL.sci
index c3cae53..bb02b98 100644
--- a/macros/FunctionAnnotation/FA_SZ_FROM_VAL.sci
+++ b/macros/FunctionAnnotation/FA_SZ_FROM_VAL.sci
@@ -15,20 +15,20 @@ SCI2CNInArgCheck(argn(2),2,2);
if (isnum(in1))
- in1num = eval(in1) ;
- if isnan(in1num)
- opout = '__SCI2CNANSIZE';
- elseif ( in1num < 0 )
- opout= '0' ;
- else
- opout = string ( floor (abs(in1num))) ;
-
- end
+ in1num = eval(in1) ;
+ if isnan(in1num)
+ opout = '__SCI2CNANSIZE';
+ elseif ( in1num < 0 )
+ opout= '0' ;
+ else
+ opout = string ( floor (abs(in1num))) ;
+ end
else
- opout = in2+"0floor"+in2+"0"+"("+in1+")";
- opout = in2+"0abs"+in2+"0"+"("+opout+")";
+ opout = in2+"0floor"+in2+"0"+"("+in1+")";
+ opout = in2+"0abs"+in2+"0"+"("+opout+")";
+
end
diff --git a/macros/FunctionAnnotation/FA_SZ_ROW_COLUMN.bin b/macros/FunctionAnnotation/FA_SZ_ROW_COLUMN.bin
new file mode 100644
index 0000000..edba674
--- /dev/null
+++ b/macros/FunctionAnnotation/FA_SZ_ROW_COLUMN.bin
Binary files differ
diff --git a/macros/FunctionAnnotation/FA_SZ_ROW_COLUMN.sci b/macros/FunctionAnnotation/FA_SZ_ROW_COLUMN.sci
new file mode 100644
index 0000000..ca1d262
--- /dev/null
+++ b/macros/FunctionAnnotation/FA_SZ_ROW_COLUMN.sci
@@ -0,0 +1,85 @@
+function opoutsize = FA_SZ_ROW_COLUMN(in1size,in2size)
+// function opoutsize = FA_SZ_OPPLUSA(in1size,in2size)
+// -----------------------------------------------------------------
+// Returns the size of the output computed by OPPLUS operator
+// restricted to arithmetic operations (string operations not supported.)
+//
+// Assuming:
+// size(in1) = [in1r,in1c]
+// size(in2) = [in2r,in2c]
+// size(out) = [outr,outc]
+//
+// we have the following combinations:
+// in1 in2 outr outc
+// -----------------------
+// S S in2r in2c
+// S M in2r in2c
+// M S in1r in1c
+// M M in1r in1c
+//
+// Where S means that the input is a scalar
+// and M means that the input is a matrix.
+// There is also the case related to the string catenation!
+// This is the main difference between - and + operators.
+//
+// Input data:
+// in1size: size of input number 1. It is an array of 2 strings.
+// The first string specifies the number of rows.
+// The second string specifies the number of columns.
+//
+// in2size: size of input number 2. It is an array of 2 strings.
+// The first string specifies the number of rows.
+// The second string specifies the number of columns.
+//
+// Output data:
+// opoutsize: size of output. It is an array of 2 strings.
+// The first string specifies the number of rows.
+// The second string specifies the number of columns.
+//
+// Status:
+// 18-Mar-2008 -- Raffaele Nutricato: Author.
+// 18-Mar-2008 -- Alberto Morea: Test Ok.
+//
+// Copyright 2008 Raffaele Nutricato & Alberto Morea.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),2,2);
+
+// ------------------------
+// --- Generate Output. ---
+// ------------------------
+// --- Get dimensions of input arguments. ---
+in1size = string(in1size);
+in2size = string(in2size);
+in1type = string(in1type);
+in2type = string(in2type);
+in1dim = GetSymbolDimension(in1size);
+in2dim = GetSymbolDimension(in2size);
+if (isnum(in2size(2))) then
+ if(in2size(2) == '3') then
+ in1num_c = eval(in1size(2));
+ in1num_r = eval(in2size(1));
+ opoutsize(1) = string(in1num_r);
+ opoutsize(2) = string(in1num_c);
+ else
+
+ in2num_r = eval(in1size(1));
+ in2num_c = eval(in2size(1));
+ opoutsize(1) = string(in2num_r);
+ opoutsize(2) = string(in2num_c);
+ end
+else
+ if(in2size(2) == 3)
+ opoutsize(2) = '('+string(in1size(2))+')';
+
+ else
+ opoutsize(1) = '('+string(in1size(1))+')';
+
+ end
+end
+
+endfunction
diff --git a/macros/FunctionAnnotation/FA_SZ_ROW_COLUMN_CAT.bin b/macros/FunctionAnnotation/FA_SZ_ROW_COLUMN_CAT.bin
new file mode 100644
index 0000000..2373b81
--- /dev/null
+++ b/macros/FunctionAnnotation/FA_SZ_ROW_COLUMN_CAT.bin
Binary files differ
diff --git a/macros/FunctionAnnotation/FA_SZ_ROW_DIAG.bin b/macros/FunctionAnnotation/FA_SZ_ROW_DIAG.bin
new file mode 100644
index 0000000..7fc7dcc
--- /dev/null
+++ b/macros/FunctionAnnotation/FA_SZ_ROW_DIAG.bin
Binary files differ
diff --git a/macros/FunctionAnnotation/FA_SZ_ROW_DIAG.sci b/macros/FunctionAnnotation/FA_SZ_ROW_DIAG.sci
new file mode 100644
index 0000000..687a89e
--- /dev/null
+++ b/macros/FunctionAnnotation/FA_SZ_ROW_DIAG.sci
@@ -0,0 +1,26 @@
+function outsize = FA_SZ_ROW_DIAG(insize)
+// function outsize = FA_SZ_1(insize)
+// -----------------------------------------------------------------
+// Returns the first element of the size array.
+//
+// Input data:
+// insize: size of input argument. It is an array of 2 strings.
+// The first string specifies the number of rows.
+// The second string specifies the number of columns.
+//
+// Output data:
+// outsize: first element of the insize array.
+//
+// Status:
+// 08-Dec-2007 -- Raffaele Nutricato: Author.
+// 08-Dec-2007 -- Alberto Morea: Test Ok.
+// -----------------------------------------------------------------
+
+if(insize(1)=='1') then
+ outsize = insize(2);
+elseif(insize(1) == insize(2))
+ outsize = insize(1);
+else
+ outsize = insize(1);
+end
+endfunction
diff --git a/macros/FunctionAnnotation/FA_SZ_ROW_DIAG_INS_EXT.bin b/macros/FunctionAnnotation/FA_SZ_ROW_DIAG_INS_EXT.bin
new file mode 100644
index 0000000..046b4b7
--- /dev/null
+++ b/macros/FunctionAnnotation/FA_SZ_ROW_DIAG_INS_EXT.bin
Binary files differ
diff --git a/macros/FunctionAnnotation/FA_SZ_ROW_DIAG_INS_EXT.sci b/macros/FunctionAnnotation/FA_SZ_ROW_DIAG_INS_EXT.sci
new file mode 100644
index 0000000..1ec720a
--- /dev/null
+++ b/macros/FunctionAnnotation/FA_SZ_ROW_DIAG_INS_EXT.sci
@@ -0,0 +1,72 @@
+function outsize = FA_SZ_ROW_DIAG_INS_EXT(insize,val)
+
+ // val ==> Position value ...,-2,-1,0,1,2....
+ //insize ==> insize(1) will give ROW size and insize(2) will give COLUMN size.
+ insize = string(insize);
+ row_num = eval(insize(1));
+ col_num = eval(insize(2));
+ val_num = eval(val);
+ /////////////////////////////////////////////// FOR INSERT CONDITION ////////////////////////////////////////////
+
+
+
+ if(row_num == 1)
+ if(val_num == 0) then // For 0th position
+ outsize = string(col_num);// ROW size is equal to COLUMN size
+
+ else // For ....-2,-1,1,2... positions
+ outsize = string(col_num+abs(val_num)); //ROW is equal to COLUMN SIZE + position value (i.e for 1*4 matrix and insert position 1 then ROW size is 4+1 = 5 )
+
+ end
+ elseif(col_num == 1) // if Column size is one
+ if(val_num == 0) then // For Oth position
+ outsize = string(row_num); // ROW size is equal to ROW size
+
+ else // ....-2,-1,1,2... positions.
+ outsize = string(row_num + abs(val_num));//ROW is equal to ROW SIZE + position value (i.e for 4*1 matrix and insert position 1 then ROW size is 4+1 = 5 )
+
+ end
+
+ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+ ///////////////////////////////////////// FOR EXTRACT CONDITION /////////////////////////////////////////////////
+
+ elseif(row_num == col_num) // For no. of rows equal to no. of column (R == C)
+ if(val_num == 0) then //For 0th position
+ outsize = string(col_num); // No. of row is equal to column size
+ else //For ....-2,-1,1,2... Positions
+ outsize = string(col_num-abs(val_num)); //row value is equal to subtraction of column size and absolute value of position (i.e +ve and -ve both position values)
+ end
+ elseif(row_num > col_num) // for no. of rows greater than no. of column (R > C)
+ if(val_num == 0) then // if 0th position
+ outsize = string(col_num); // No. of row is equal to column size
+ elseif(val_num > 0) then // For +ve positions i.e 1,2,3.....
+ outsize = string(col_num-abs(val_num)); // No. of row is equal to subtraction of column size and absolute value of +ve postion
+
+ elseif(val_num < 0 ) then // For -ve positions i.e -1,-2,-3
+ temp_outsize1 = row_num-abs(val_num); //In this row values are varying for 4*3 matrix there is no repetition of same row values,for 5*3 matrix there is (5-3 = 2) two same row size(i.e 3 and 3) for -1,-2 position and for 6*3 matrix there is (6-3 = 3) three same row size(i.e 3 ,3,3) for -1,-2,-3 position
+ if(temp_outsize1 >= col_num) // if temp_outsize1 is greater than equal to column size then
+ outsize = string(col_num); // row size is equal to column
+ else
+ outsize = string(row_num-abs(val_num)); // else row size is substractio of row and abosulte value of position(i.e -1,-2,-3)
+ end
+ end
+ elseif(row_num < col_num) // for no. of rows less than no. of column size
+ if(val_num == 0) then // if 0th position
+ outsize = string(row_num); // No. of row is equal to row size
+ elseif(val_num > 0) then // for +ve positions i.e 1,2 3.....
+ temp_outsize2 = col_num-abs(val_num);// In this column values are varying for 3*4 matrix there is no repetition of same row values,for 3*5 matrix there is (5-3 =2) two same row size (i.e 3, 3 ) for 1 ,2 position and for 3*6 matrix there is (6-3 = 3) three row size (i.e 3 ,3 ,3) for 1,2 3 position
+ if(temp_outsize2 >= row_num) // if temp_outsize2 is greater than equal to row size then
+ outsize = string(row_num); // row size is equal to row size
+ else
+ outsize = string(col_num-abs(val_num)); // else row size substractio of column and absolute value
+ end
+ elseif(val_num < 0) then // for -ve positions i.e -1,-2,-3 .. positions
+ outsize = string(row_num-abs(val_num)); // row size is substraction of row size and absolute value of position values(-1,-2,-3)
+ end
+
+ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+ end
+
+endfunction
diff --git a/macros/FunctionAnnotation/lib b/macros/FunctionAnnotation/lib
index c2025c8..11e8b99 100644
--- a/macros/FunctionAnnotation/lib
+++ b/macros/FunctionAnnotation/lib
Binary files differ
diff --git a/macros/FunctionAnnotation/names b/macros/FunctionAnnotation/names
index d9300d2..2df2ed2 100644
--- a/macros/FunctionAnnotation/names
+++ b/macros/FunctionAnnotation/names
@@ -12,6 +12,8 @@ FA_REAL
FA_SUB
FA_SZ_1
FA_SZ_2
+FA_SZ_COLUMN_DIAG
+FA_SZ_COL_DIAG_IN_EX
FA_SZ_FROM_VAL
FA_SZ_OPAPEX
FA_SZ_OPBACKSLASH
@@ -37,6 +39,10 @@ FA_SZ_OPPLUSA
FA_SZ_OPRC
FA_SZ_OPSLASH
FA_SZ_OPSTAR
+FA_SZ_ROW_COLUMN
+FA_SZ_ROW_COLUMN_CAT
+FA_SZ_ROW_DIAG
+FA_SZ_ROW_DIAG_INS_EXT
FA_SZ_SEL1
FA_SZ_SEL2
FA_TP_C