You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -36,10 +36,10 @@ var base = require( './base.js' );
36
36
/**
37
37
* Performs one of the matrix-vector operations `x = A*x` or `x = A^T*x`, where `x` is an `N` element vector and `A` is an `N` by `N` unit, or non-unit, upper or lower triangular matrix.
38
38
*
39
-
* @param {string} order - storage layout
40
-
* @param {string} uplo - specifies whether `A` is an upper or lower triangular matrix
41
-
* @param {string} trans - specifies whether `A` should be transposed, conjugate-transposed, or not transposed
42
-
* @param {string} diag - specifies whether `A` has a unit diagonal
39
+
* @param {(integer|string)} order - storage layout
40
+
* @param {(integer|string)} uplo - specifies whether `A` is an upper or lower triangular matrix
41
+
* @param {(integer|string)} trans - specifies whether `A` should be transposed, conjugate-transposed, or not transposed
42
+
* @param {(integer|string)} diag - specifies whether `A` has a unit diagonal
43
43
* @param {NonNegativeInteger} N - number of elements along each dimension of `A`
44
44
* @param {Float64Array} A - input matrix
45
45
* @param {integer} LDA - stride of the first dimension of `A` (a.k.a., leading dimension of the matrix `A`)
@@ -67,17 +67,25 @@ function dtrmv( order, uplo, trans, diag, N, A, LDA, x, strideX ) {
67
67
varsa1;
68
68
varsa2;
69
69
varox;
70
+
varl;
71
+
varu;
72
+
vart;
73
+
vard;
70
74
71
-
if(!isLayout(order)){
75
+
l=resolveLayout(order);
76
+
if(l===null){
72
77
thrownewTypeError(format('invalid argument. First argument must be a valid order. Value: `%s`.',order));
73
78
}
74
-
if(!isMatrixTriangle(uplo)){
79
+
u=resolveTriangle(uplo);
80
+
if(u===null){
75
81
thrownewTypeError(format('invalid argument. Second argument must specify whether the lower or upper triangular matrix is supplied. Value: `%s`.',uplo));
76
82
}
77
-
if(!isTransposeOperation(trans)){
83
+
t=resolveTranspose(trans);
84
+
if(t===null){
78
85
thrownewTypeError(format('invalid argument. Third argument must be a valid transpose operation. Value: `%s`.',trans));
79
86
}
80
-
if(!isDiagonal(diag)){
87
+
d=resolveDiagonal(diag);
88
+
if(d===null){
81
89
thrownewTypeError(format('invalid argument. Fourth argument must be a valid diagonal type. Value: `%s`.',diag));
82
90
}
83
91
if(N<0){
@@ -92,15 +100,15 @@ function dtrmv( order, uplo, trans, diag, N, A, LDA, x, strideX ) {
@@ -32,9 +32,9 @@ var base = require( './base.js' );
32
32
/**
33
33
* Performs one of the matrix-vector operations `x = A*x` or `x = A^T*x`, where `x` is an `N` element vector and `A` is an `N` by `N` unit, or non-unit, upper or lower triangular matrix.
34
34
*
35
-
* @param {string} uplo - specifies whether `A` is an upper or lower triangular matrix
36
-
* @param {string} trans - specifies whether `A` should be transposed, conjugate-transposed, or not transposed
37
-
* @param {string} diag - specifies whether `A` has a unit diagonal
35
+
* @param {(integer|string)} uplo - specifies whether `A` is an upper or lower triangular matrix
36
+
* @param {(integer|string)} trans - specifies whether `A` should be transposed, conjugate-transposed, or not transposed
37
+
* @param {(integer|string)} diag - specifies whether `A` has a unit diagonal
38
38
* @param {NonNegativeInteger} N - number of elements along each dimension of `A`
39
39
* @param {Float64Array} A - input matrix
40
40
* @param {integer} strideA1 - stride of the first dimension of `A`
@@ -62,13 +62,20 @@ var base = require( './base.js' );
thrownewTypeError(format('invalid argument. First argument must specify whether the lower or upper triangular matrix is supplied. Value: `%s`.',uplo));
67
72
}
68
-
if(!isTransposeOperation(trans)){
73
+
t=resolveTranspose(trans);
74
+
if(t===null){
69
75
thrownewTypeError(format('invalid argument. Second argument must be a valid transpose operation. Value: `%s`.',trans));
70
76
}
71
-
if(!isDiagonal(diag)){
77
+
d=resolveDiagonal(diag);
78
+
if(d===null){
72
79
thrownewTypeError(format('invalid argument. Third argument must be a valid diagonal type. Value: `%s`.',diag));
73
80
}
74
81
if(N<0){
@@ -86,7 +93,7 @@ function dtrmv( uplo, trans, diag, N, A, strideA1, strideA2, offsetA, x, strideX
* Multiplies a strided array `x` by a constant and adds the result to a strided array `y` multiplied by a constant using alternative indexing semantics.
* Multiplies each element in a strided array `x` by a scalar constant and assigns the results to elements in a strided array `w` using alternative indexing semantics.
* Adds elements of a strided array `x` to the corresponding elements of a strided array `y` and assigns the results to elements in a strided array `w` using alternative indexing semantics.
* Subtracts a scalar constant from each element in a strided array `x` and assigns the results to a strided array `w` using alternative indexing semantics.
0 commit comments