Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions lib/node_modules/@stdlib/blas/base/dsyr/lib/dsyr.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
// MODULES //

var isLayout = require( '@stdlib/blas/base/assert/is-layout' );
var isMatrixTriangle = require( '@stdlib/blas/base/assert/is-matrix-triangle' );
var resolveStr = require( '@stdlib/blas/base/matrix-triangle-resolve-str' );
var isColumnMajor = require( '@stdlib/ndarray/base/assert/is-column-major-string' );
var stride2offset = require( '@stdlib/strided/base/stride2offset' );
var max = require( '@stdlib/math/base/special/fast/max' );
Expand All @@ -35,7 +35,7 @@ var base = require( './base.js' );
* Performs the symmetric rank 1 operation `A = α*x*x^T + A` where `α` is a scalar, `x` is an `N` element vector, and `A` is an `N` by `N` symmetric matrix.
*
* @param {string} order - storage layout
* @param {string} uplo - specifies whether the upper or lower triangular part of the symmetric matrix `A` should be referenced
* @param {(integer|string)} uplo - specifies whether the upper or lower triangular part of the symmetric matrix `A` should be referenced
* @param {NonNegativeInteger} N - number of elements along each dimension of `A`
* @param {number} alpha - scalar constant
* @param {Float64Array} x - input vector
Expand All @@ -62,11 +62,13 @@ function dsyr( order, uplo, N, alpha, x, strideX, A, LDA ) {
var sa1;
var sa2;
var ox;
var u;

if ( !isLayout( order ) ) {
throw new TypeError( format( 'invalid argument. First argument must be a valid order. Value: `%s`.', order ) );
}
if ( !isMatrixTriangle( uplo ) ) {
u = resolveStr( uplo );
if ( u === null ) {
throw new TypeError( format( 'invalid argument. Second argument must specify whether to reference the lower or upper triangular matrix. Value: `%s`.', uplo ) );
}
if ( N < 0 ) {
Expand All @@ -90,7 +92,7 @@ function dsyr( order, uplo, N, alpha, x, strideX, A, LDA ) {
sa2 = 1;
}
ox = stride2offset( N, strideX );
return base( uplo, N, alpha, x, strideX, ox, A, sa1, sa2, 0 );
return base( u, N, alpha, x, strideX, ox, A, sa1, sa2, 0 );
}


Expand Down
9 changes: 5 additions & 4 deletions lib/node_modules/@stdlib/blas/base/dsyr/lib/ndarray.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

// MODULES //

var isMatrixTriangle = require( '@stdlib/blas/base/assert/is-matrix-triangle' );
var resolveStr = require( '@stdlib/blas/base/matrix-triangle-resolve-str' );
var format = require( '@stdlib/string/format' );
var base = require( './base.js' );

Expand All @@ -30,7 +30,7 @@ var base = require( './base.js' );
/**
* Performs the symmetric rank 1 operation `A = α*x*x^T + A` where `α` is a scalar, `x` is an `N` element vector, and `A` is an `N` by `N` symmetric matrix.
*
* @param {string} uplo - specifies whether the upper or lower triangular part of the symmetric matrix `A` should be referenced
* @param {(integer|string)} uplo - specifies whether the upper or lower triangular part of the symmetric matrix `A` should be referenced
* @param {NonNegativeInteger} N - number of elements along each dimension of `A`
* @param {number} alpha - scalar constant
* @param {Float64Array} x - input vector
Expand All @@ -57,7 +57,8 @@ var base = require( './base.js' );
* // A => <Float64Array>[ 2.0, 4.0, 6.0, 2.0, 5.0, 8.0, 3.0, 2.0, 10.0 ]
*/
function dsyr( uplo, N, alpha, x, strideX, offsetX, A, strideA1, strideA2, offsetA ) { // eslint-disable-line max-len
if ( !isMatrixTriangle( uplo ) ) {
var u = resolveStr( uplo );
if ( u === null ) {
throw new TypeError( format( 'invalid argument. First argument must specify whether to reference the lower or upper triangular matrix. Value: `%s`.', uplo ) );
}
if ( N < 0 ) {
Expand All @@ -76,7 +77,7 @@ function dsyr( uplo, N, alpha, x, strideX, offsetX, A, strideA1, strideA2, offse
if ( N === 0 || alpha === 0.0 ) {
return A;
}
return base( uplo, N, alpha, x, strideX, offsetX, A, strideA1, strideA2, offsetA ); // eslint-disable-line max-len
return base( u, N, alpha, x, strideX, offsetX, A, strideA1, strideA2, offsetA ); // eslint-disable-line max-len
}


Expand Down