LINEAR_COMBO - combinação linear de componentes de matriz

Esse procedimento implementa a combinação linear dos componentes da matriz, calculando matC:=aVal*matA^transposeA + bVal*matB^transposeB + cVal. Aqui, matA e matB são matrizes de entrada, matC é uma matriz de saída, aVal, bVal, e cVal são coeficientes e transposeA e transposeB são parâmetros booleanos que indicam se matA e matB devem ser transpostas durante a operação.

Uso

O procedimento armazenado LINEAR_COMBINATION tem a seguinte sintaxe:
LINEAR_COMBINATION matrixA,transposeA,aValue,matrixB,transposeB,bValue,cValue,matrixC )
Parâmetros
matrixA
O nome da matriz de entrada A.
Tipo: NVARCHAR(ANY)
tranposeA
Especifica se a matriz A deve ser transposta.
Tipo: BOOLEAN
aValue
O valor do fator a.
Tipo: DOUBLE
matrixB
O nome da matriz de entrada B.
Tipo: NVARCHAR(ANY)
tranposeB
Especifica se a matriz B deve ser transposta.
Tipo: BOOLEAN
bValue
O valor do fator b.
Tipo: DOUBLE
cValue
O valor do fator c.
Tipo: DOUBLE
matrixC
O nome da matriz de saída C.
Tipo: NVARCHAR(ANY)
Retorna
BOOLEAN TRUE sempre.

Exemplos

CALL nzm..create_ones_matrix('A', 4, 4); 
CALL nzm..set_value('A', 1, 2, 2);
CALL nzm..set_value('A', 1, 3, 3);
CALL nzm..set_value('A', 1, 4, 4);
CALL nzm..create_identity_matrix('B', 4); 
CALL nzm..set_value('B', 4, 1, 10);
CALL nzm..linear_combination('A', FALSE, 1.5, 'B', FALSE, 1, 1, 'AB');
CALL nzm..linear_combination('A', TRUE, 1.5, 'B', FALSE, 1, 1, 'AtB');
CALL nzm..linear_combination('A', FALSE, 1.5, 'B', TRUE, 1, 1, 'ABt');
CALL nzm..linear_combination('A', TRUE, 1.5, 'B', TRUE, 1, 1, 'AtBt');
CALL nzm..print('A');
CALL nzm..print('B');
CALL nzm..print('AB');
CALL nzm..print('AtB');
CALL nzm..print('ABt');
CALL nzm..print('AtBt');
CALL nzm..delete_matrix('A');
CALL nzm..delete_matrix('B');
CALL nzm..delete_matrix('AB');
CALL nzm..delete_matrix('AtB');
CALL nzm..delete_matrix('ABt');
CALL nzm..delete_matrix('AtBt');

 CREATE_ONES_MATRIX
--------------------
 t
(1 row)

 SET_VALUE
-----------
 t
(1 row)

 SET_VALUE
-----------
 t
(1 row)

 SET_VALUE
-----------
 t
(1 row)

 CREATE_IDENTITY_MATRIX
------------------------
 t
(1 row)

 SET_VALUE
-----------
 t
(1 row)

 LINEAR_COMBINATION
--------------------
 t
(1 row)

 LINEAR_COMBINATION
--------------------
 t
(1 row)

 LINEAR_COMBINATION
--------------------
 t
(1 row)

 LINEAR_COMBINATION
--------------------
 t
(1 row)

                              PRINT
-------------------------------------------------------------
 -- matrix: A --
 1, 2, 3, 4
 1, 1, 1, 1
 1, 1, 1, 1
 1, 1, 1, 1
(1 row)

                             PRINT
--------------------------------------------------------------
 -- matrix: B --
 1, 0, 0, 0
 0, 1, 0, 0
 0, 0, 1, 0
 10, 0, 0, 1
(1 row)

                             PRINT
---------------------------------------------------------------
 -- matrix: AB--
 3.5, 4,5. 5, 7
 2.5, 3.5, 2.5, 2.5
 2.5, 2.5, 3.5, 2.5
 12.5, 2.5, 2.5, 3.5
(1 row)

                             PRINT
---------------------------------------------------------------
 -- matrix: AtB --
 3.5, 2.5, 2.5, 2.5
 4, 3.5, 2.5, 2.5
 5.5, 2.5, 3.5, 2.5
 17, 2.5, 2.5, 3.5
(1 row)

                             PRINT
---------------------------------------------------------------
-- matrix: ABt --
 3.5, 4, 5.5, 17
 2.5, 3.5, 2.5, 2.5
 2.5, 2.5, 3.5, 2.5
 2.5, 2.5, 2.5, 3.5
(1 row)

                            PRINT
---------------------------------------------------------------
-- matrix: AtBt --
 3.5, 2.5, 2.5, 12.5
 4, 3.5, 2.5, 2.5
 5.5, 2.5, 3.5, 2.5
 7, 2.5, 2.5, 3.5
(1 row)

 DELETE_MATRIX
---------------
 t
(1 row)

 DELETE_MATRIX
---------------
 t
(1 row)

 DELETE_MATRIX
---------------
 t
(1 row)

 DELETE_MATRIX
---------------
 t
(1 row)

 DELETE_MATRIX
---------------
 t
(1 row)

 DELETE_MATRIX
---------------
 t
(1 row)