diff --git a/lib/node_modules/@stdlib/blas/base/zscal/README.md b/lib/node_modules/@stdlib/blas/base/zscal/README.md index 99af279c9c0d..4bfff11f178b 100644 --- a/lib/node_modules/@stdlib/blas/base/zscal/README.md +++ b/lib/node_modules/@stdlib/blas/base/zscal/README.md @@ -82,7 +82,7 @@ var alpha = new Complex128( 2.0, 2.0 ); // Create an offset view: var x1 = new Complex128Array( x0.buffer, x0.BYTES_PER_ELEMENT*1 ); // start at 2nd element -// Scales every other value from `zx1` by `za`... +// Scales every other value from `x1` by `alpha`... zscal( 3, alpha, x1, 1 ); // x0 => [ 1.0, 2.0, -2.0, 14.0, -2.0, 22.0, -2.0, 30.0 ] ``` diff --git a/lib/node_modules/@stdlib/blas/base/zscal/benchmark/benchmark.js b/lib/node_modules/@stdlib/blas/base/zscal/benchmark/benchmark.js index 411fa52eaa30..2240d19e822b 100644 --- a/lib/node_modules/@stdlib/blas/base/zscal/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/blas/base/zscal/benchmark/benchmark.js @@ -47,14 +47,14 @@ var options = { * @returns {Function} benchmark function */ function createBenchmark( len ) { - var zxbuf; - var za; - var zx; + var alpha; + var xbuf; + var x; - zxbuf = uniform( len*2, -100.0, 100.0, options ); - zx = new Complex128Array( zxbuf.buffer ); + xbuf = uniform( len*2, -100.0, 100.0, options ); + x = new Complex128Array( xbuf.buffer ); - za = new Complex128( 1.0, 0.0 ); + alpha = new Complex128( 1.0, 0.0 ); return benchmark; @@ -69,13 +69,13 @@ function createBenchmark( len ) { b.tic(); for ( i = 0; i < b.iterations; i++ ) { - zscal( zx.length, za, zx, 1 ); - if ( isnan( zxbuf[ i%(len*2) ] ) ) { + zscal( x.length, alpha, x, 1 ); + if ( isnan( xbuf[ i%(len*2) ] ) ) { b.fail( 'should not return NaN' ); } } b.toc(); - if ( isnan( zxbuf[ i%(len*2) ] ) ) { + if ( isnan( xbuf[ i%(len*2) ] ) ) { b.fail( 'should not return NaN' ); } b.pass( 'benchmark finished' ); diff --git a/lib/node_modules/@stdlib/blas/base/zscal/benchmark/benchmark.native.js b/lib/node_modules/@stdlib/blas/base/zscal/benchmark/benchmark.native.js index 4c0b66f05081..e9fdbd63bb34 100644 --- a/lib/node_modules/@stdlib/blas/base/zscal/benchmark/benchmark.native.js +++ b/lib/node_modules/@stdlib/blas/base/zscal/benchmark/benchmark.native.js @@ -52,14 +52,14 @@ var options = { * @returns {Function} benchmark function */ function createBenchmark( len ) { - var zxbuf; - var za; - var zx; + var alpha; + var xbuf; + var x; - zxbuf = uniform( len*2, -100.0, 100.0, options ); - zx = new Complex128Array( zxbuf.buffer ); + xbuf = uniform( len*2, -100.0, 100.0, options ); + x = new Complex128Array( xbuf.buffer ); - za = new Complex128( 1.0, 0.0 ); + alpha = new Complex128( 1.0, 0.0 ); return benchmark; @@ -74,13 +74,13 @@ function createBenchmark( len ) { b.tic(); for ( i = 0; i < b.iterations; i++ ) { - zscal( zx.length, za, zx, 1 ); - if ( isnan( zxbuf[ i%(len*2) ] ) ) { + zscal( x.length, alpha, x, 1 ); + if ( isnan( xbuf[ i%(len*2) ] ) ) { b.fail( 'should not return NaN' ); } } b.toc(); - if ( isnan( zxbuf[ i%(len*2) ] ) ) { + if ( isnan( xbuf[ i%(len*2) ] ) ) { b.fail( 'should not return NaN' ); } b.pass( 'benchmark finished' ); diff --git a/lib/node_modules/@stdlib/blas/base/zscal/benchmark/benchmark.ndarray.js b/lib/node_modules/@stdlib/blas/base/zscal/benchmark/benchmark.ndarray.js index 4784b36e9801..70e11fc3fce2 100644 --- a/lib/node_modules/@stdlib/blas/base/zscal/benchmark/benchmark.ndarray.js +++ b/lib/node_modules/@stdlib/blas/base/zscal/benchmark/benchmark.ndarray.js @@ -47,14 +47,14 @@ var options = { * @returns {Function} benchmark function */ function createBenchmark( len ) { - var zxbuf; - var za; - var zx; + var alpha; + var xbuf; + var x; - zxbuf = uniform( len*2, -100.0, 100.0, options ); - zx = new Complex128Array( zxbuf.buffer ); + xbuf = uniform( len*2, -100.0, 100.0, options ); + x = new Complex128Array( xbuf.buffer ); - za = new Complex128( 1.0, 0.0 ); + alpha = new Complex128( 1.0, 0.0 ); return benchmark; @@ -69,13 +69,13 @@ function createBenchmark( len ) { b.tic(); for ( i = 0; i < b.iterations; i++ ) { - zscal( zx.length, za, zx, 1, 0 ); - if ( isnan( zxbuf[ i%(len*2) ] ) ) { + zscal( x.length, alpha, x, 1, 0 ); + if ( isnan( xbuf[ i%(len*2) ] ) ) { b.fail( 'should not return NaN' ); } } b.toc(); - if ( isnan( zxbuf[ i%(len*2) ] ) ) { + if ( isnan( xbuf[ i%(len*2) ] ) ) { b.fail( 'should not return NaN' ); } b.pass( 'benchmark finished' ); diff --git a/lib/node_modules/@stdlib/blas/base/zscal/benchmark/benchmark.ndarray.native.js b/lib/node_modules/@stdlib/blas/base/zscal/benchmark/benchmark.ndarray.native.js index 5b78b2319e67..dcb0b1ae3e5f 100644 --- a/lib/node_modules/@stdlib/blas/base/zscal/benchmark/benchmark.ndarray.native.js +++ b/lib/node_modules/@stdlib/blas/base/zscal/benchmark/benchmark.ndarray.native.js @@ -52,14 +52,14 @@ var options = { * @returns {Function} benchmark function */ function createBenchmark( len ) { - var zxbuf; - var za; - var zx; + var alpha; + var xbuf; + var x; - zxbuf = uniform( len*2, -100.0, 100.0, options ); - zx = new Complex128Array( zxbuf.buffer ); + xbuf = uniform( len*2, -100.0, 100.0, options ); + x = new Complex128Array( xbuf.buffer ); - za = new Complex128( 1.0, 0.0 ); + alpha = new Complex128( 1.0, 0.0 ); return benchmark; @@ -74,13 +74,13 @@ function createBenchmark( len ) { b.tic(); for ( i = 0; i < b.iterations; i++ ) { - zscal( zx.length, za, zx, 1, 0 ); - if ( isnan( zxbuf[ i%(len*2) ] ) ) { + zscal( x.length, alpha, x, 1, 0 ); + if ( isnan( xbuf[ i%(len*2) ] ) ) { b.fail( 'should not return NaN' ); } } b.toc(); - if ( isnan( zxbuf[ i%(len*2) ] ) ) { + if ( isnan( xbuf[ i%(len*2) ] ) ) { b.fail( 'should not return NaN' ); } b.pass( 'benchmark finished' ); diff --git a/lib/node_modules/@stdlib/blas/base/zscal/benchmark/c/benchmark.length.c b/lib/node_modules/@stdlib/blas/base/zscal/benchmark/c/benchmark.length.c index 6055f7f10712..f325705dd28a 100644 --- a/lib/node_modules/@stdlib/blas/base/zscal/benchmark/c/benchmark.length.c +++ b/lib/node_modules/@stdlib/blas/base/zscal/benchmark/c/benchmark.length.c @@ -96,27 +96,27 @@ static double rand_double( void ) { * @return elapsed time in seconds */ static double benchmark1( int iterations, int len ) { - stdlib_complex128_t za; - double zx[ len*2 ]; + stdlib_complex128_t alpha; + double x[ len*2 ]; double elapsed; double t; int i; - za = stdlib_complex128( 1.0, 0.0 ); + alpha = stdlib_complex128( 1.0, 0.0 ); for ( i = 0; i < len*2; i+=2 ) { - zx[ i ] = ( rand_double()*2.0 ) - 1.0; - zx[ i+1 ] = ( rand_double()*2.0 ) - 1.0; + x[ i ] = ( rand_double()*2.0 ) - 1.0; + x[ i+1 ] = ( rand_double()*2.0 ) - 1.0; } t = tic(); for ( i = 0; i < iterations; i++ ) { - c_zscal( len, za, (void *)zx, 1 ); - if ( zx[ 0 ] != zx[ 0 ] ) { + c_zscal( len, alpha, (void *)x, 1 ); + if ( x[ 0 ] != x[ 0 ] ) { printf( "should not return NaN\n" ); break; } } elapsed = tic() - t; - if ( zx[ 0 ] != zx[ 0 ] ) { + if ( x[ 0 ] != x[ 0 ] ) { printf( "should not return NaN\n" ); } return elapsed; @@ -130,27 +130,27 @@ static double benchmark1( int iterations, int len ) { * @return elapsed time in seconds */ static double benchmark2( int iterations, int len ) { - stdlib_complex128_t za; - double zx[ len*2 ]; + stdlib_complex128_t alpha; + double x[ len*2 ]; double elapsed; double t; int i; - za = stdlib_complex128( 1.0, 0.0 ); + alpha = stdlib_complex128( 1.0, 0.0 ); for ( i = 0; i < len*2; i+=2 ) { - zx[ i ] = ( rand_double()*2.0 ) - 1.0; - zx[ i+1 ] = ( rand_double()*2.0 ) - 1.0; + x[ i ] = ( rand_double()*2.0 ) - 1.0; + x[ i+1 ] = ( rand_double()*2.0 ) - 1.0; } t = tic(); for ( i = 0; i < iterations; i++ ) { - c_zscal_ndarray( len, za, (void *)zx, 1, 0 ); - if ( zx[ 0 ] != zx[ 0 ] ) { + c_zscal_ndarray( len, alpha, (void *)x, 1, 0 ); + if ( x[ 0 ] != x[ 0 ] ) { printf( "should not return NaN\n" ); break; } } elapsed = tic() - t; - if ( zx[ 0 ] != zx[ 0 ] ) { + if ( x[ 0 ] != x[ 0 ] ) { printf( "should not return NaN\n" ); } return elapsed; diff --git a/lib/node_modules/@stdlib/blas/base/zscal/benchmark/fortran/benchmark.length.f b/lib/node_modules/@stdlib/blas/base/zscal/benchmark/fortran/benchmark.length.f index 966c13533b30..9d585c856fc2 100644 --- a/lib/node_modules/@stdlib/blas/base/zscal/benchmark/fortran/benchmark.length.f +++ b/lib/node_modules/@stdlib/blas/base/zscal/benchmark/fortran/benchmark.length.f @@ -124,8 +124,8 @@ double precision function benchmark( iterations, len ) ! .. ! External functions: interface - subroutine zscal( N, za, zx, strideX ) - complex(kind=kind(0.0d0)) :: za, zx(*) + subroutine zscal( N, alpha, x, strideX ) + complex(kind=kind(0.0d0)) :: alpha, x(*) integer :: strideX, N end subroutine zscal end interface @@ -142,7 +142,7 @@ end subroutine zscal complex(kind=kind(0.0d0)), allocatable :: x(:) ! .. ! Local scalar: - complex(kind=kind(0.0d0)) :: za + complex(kind=kind(0.0d0)) :: alpha ! .. ! Intrinsic functions: intrinsic random_number, cpu_time, cmplx @@ -152,7 +152,7 @@ end subroutine zscal ! .. call random_number( r1 ) call random_number( r2 ) - za = cmplx( (r1*1.0d0), (r2*0.0d0), kind=kind(0.0d0) ) + alpha = cmplx( (r1*1.0d0), (r2*0.0d0), kind=kind(0.0d0) ) do i = 1, len call random_number( r1 ) call random_number( r2 ) @@ -162,7 +162,7 @@ end subroutine zscal call cpu_time( t1 ) ! .. do i = 1, iterations - call zscal( len, za, x, 1 ); + call zscal( len, alpha, x, 1 ); if ( x( 1 ) /= x( 1 ) ) then print '(A)', 'should not return NaN' exit @@ -219,4 +219,4 @@ subroutine main() end do call print_summary( count, count ) end subroutine main -end program bench \ No newline at end of file +end program bench diff --git a/lib/node_modules/@stdlib/blas/base/zscal/lib/ndarray.native.js b/lib/node_modules/@stdlib/blas/base/zscal/lib/ndarray.native.js index f3c26a77d2d4..989b1e4c064f 100644 --- a/lib/node_modules/@stdlib/blas/base/zscal/lib/ndarray.native.js +++ b/lib/node_modules/@stdlib/blas/base/zscal/lib/ndarray.native.js @@ -47,8 +47,8 @@ var addon = require( './../src/addon.node' ); * // x => [ -2.0, 6.0, -2.0, 14.0, -2.0, 22.0 ] */ function zscal( N, alpha, x, strideX, offsetX ) { - var viewZX = reinterpret( x, 0 ); - addon.ndarray( N, alpha, viewZX, strideX, offsetX ); + var viewX = reinterpret( x, 0 ); + addon.ndarray( N, alpha, viewX, strideX, offsetX ); return x; } diff --git a/lib/node_modules/@stdlib/blas/base/zscal/lib/zscal.native.js b/lib/node_modules/@stdlib/blas/base/zscal/lib/zscal.native.js index 67bd2abec939..bc748b31905b 100644 --- a/lib/node_modules/@stdlib/blas/base/zscal/lib/zscal.native.js +++ b/lib/node_modules/@stdlib/blas/base/zscal/lib/zscal.native.js @@ -46,8 +46,8 @@ var addon = require( './../src/addon.node' ); * // x => [ -2.0, 6.0, -2.0, 14.0, -2.0, 22.0 ] */ function zscal( N, alpha, x, strideX ) { - var viewZX = reinterpret( x, 0 ); - addon( N, alpha, viewZX, strideX ); + var viewX = reinterpret( x, 0 ); + addon( N, alpha, viewX, strideX ); return x; } diff --git a/lib/node_modules/@stdlib/blas/base/zscal/src/zscal.f b/lib/node_modules/@stdlib/blas/base/zscal/src/zscal.f index 13a35c91b3ff..98e331ed3721 100644 --- a/lib/node_modules/@stdlib/blas/base/zscal/src/zscal.f +++ b/lib/node_modules/@stdlib/blas/base/zscal/src/zscal.f @@ -49,19 +49,19 @@ ! > * We will gladly answer any questions regarding the software. If a modification is done, however, it is the responsibility of the person who modified the routine to provide support. ! ! @param {integer} N - number of indexed elements -! @param {complex} za - scalar constant -! @param {Array>} zx - input array -! @param {integer} strideX - `zx` stride length +! @param {complex} alpha - scalar constant +! @param {Array>} x - input array +! @param {integer} strideX - `x` stride length !< -subroutine zscal( N, za, zx, strideX ) +subroutine zscal( N, alpha, x, strideX ) implicit none ! .. ! Scalar arguments: - complex(kind=kind(0.0d0)) :: za + complex(kind=kind(0.0d0)) :: alpha integer :: strideX, N ! .. ! Array arguments: - complex(kind=kind(0.0d0)) :: zx(*) + complex(kind=kind(0.0d0)) :: x(*) ! .. ! Local scalars: integer :: ix, i @@ -72,14 +72,14 @@ subroutine zscal( N, za, zx, strideX ) ! .. if ( strideX == 1 ) then do i = 1, N - zx(i) = za * zx(i) + x(i) = alpha * x(i) end do else ix = 1 do i = 1, N - zx(ix) = za * zx(ix) + x(ix) = alpha * x(ix) ix = ix + strideX end do end if return -end subroutine zscal \ No newline at end of file +end subroutine zscal diff --git a/lib/node_modules/@stdlib/blas/base/zscal/test/test.ndarray.js b/lib/node_modules/@stdlib/blas/base/zscal/test/test.ndarray.js index 9eae3749bda4..3ac91f3eda2a 100644 --- a/lib/node_modules/@stdlib/blas/base/zscal/test/test.ndarray.js +++ b/lib/node_modules/@stdlib/blas/base/zscal/test/test.ndarray.js @@ -71,13 +71,13 @@ tape( 'the function has an arity of 5', function test( t ) { t.end(); }); -tape( 'the function scales elements from `zx` by `za`', function test( t ) { +tape( 'the function scales elements from `x` by `alpha`', function test( t ) { var expected; var viewX; - var za; - var zx; + var alpha; + var x; - zx = new Complex128Array([ + x = new Complex128Array([ 0.3, // 1 0.1, // 1 0.5, // 2 @@ -91,11 +91,11 @@ tape( 'the function scales elements from `zx` by `za`', function test( t ) { 2.0, 3.0 ]); - za = new Complex128( 0.4, -0.7 ); + alpha = new Complex128( 0.4, -0.7 ); - zscal( 4, za, zx, 1, 0 ); + zscal( 4, alpha, x, 1, 0 ); - viewX = new Float64Array( zx.buffer ); + viewX = new Float64Array( x.buffer ); expected = new Float64Array([ 0.19, // 1 -0.17, // 1 @@ -115,13 +115,13 @@ tape( 'the function scales elements from `zx` by `za`', function test( t ) { t.end(); }); -tape( 'the function supports a `zx` stride', function test( t ) { +tape( 'the function supports a `x` stride', function test( t ) { var expected; var viewX; - var za; - var zx; + var alpha; + var x; - zx = new Complex128Array([ + x = new Complex128Array([ 0.1, // 1 0.1, // 1 3.0, @@ -135,11 +135,11 @@ tape( 'the function supports a `zx` stride', function test( t ) { 7.0, 2.0 ]); - za = new Complex128( 0.4, -0.7 ); + alpha = new Complex128( 0.4, -0.7 ); - zscal( 3, za, zx, 2, 0 ); + zscal( 3, alpha, x, 2, 0 ); - viewX = new Float64Array( zx.buffer ); + viewX = new Float64Array( x.buffer ); expected = new Float64Array([ 0.11, // 1 -0.03, // 1 @@ -159,13 +159,13 @@ tape( 'the function supports a `zx` stride', function test( t ) { t.end(); }); -tape( 'the function supports a negative `zx` stride', function test( t ) { +tape( 'the function supports a negative `x` stride', function test( t ) { var expected; var viewX; - var za; - var zx; + var alpha; + var x; - zx = new Complex128Array([ + x = new Complex128Array([ 0.1, // 3 0.1, // 3 3.0, @@ -179,11 +179,11 @@ tape( 'the function supports a negative `zx` stride', function test( t ) { 7.0, 2.0 ]); - za = new Complex128( 0.4, -0.7 ); + alpha = new Complex128( 0.4, -0.7 ); - zscal( 3, za, zx, -2, 4 ); + zscal( 3, alpha, x, -2, 4 ); - viewX = new Float64Array( zx.buffer ); + viewX = new Float64Array( x.buffer ); expected = new Float64Array([ 0.11, // 3 -0.03, // 3 @@ -203,13 +203,13 @@ tape( 'the function supports a negative `zx` stride', function test( t ) { t.end(); }); -tape( 'the function supports a `zx` offset', function test( t ) { +tape( 'the function supports a `x` offset', function test( t ) { var expected; var viewX; - var za; - var zx; + var alpha; + var x; - zx = new Complex128Array([ + x = new Complex128Array([ 0.1, 0.1, 3.0, @@ -223,11 +223,11 @@ tape( 'the function supports a `zx` offset', function test( t ) { 7.0, // 3 2.0 // 3 ]); - za = new Complex128( 0.4, -0.7 ); + alpha = new Complex128( 0.4, -0.7 ); - zscal( 3, za, zx, 1, 3 ); + zscal( 3, alpha, x, 1, 3 ); - viewX = new Float64Array( zx.buffer ); + viewX = new Float64Array( x.buffer ); expected = new Float64Array([ 0.1, 0.1, @@ -248,35 +248,35 @@ tape( 'the function supports a `zx` offset', function test( t ) { }); tape( 'the function returns a reference to the input array', function test( t ) { + var alpha; var out; - var za; - var zx; + var x; - zx = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); - za = new Complex128( 2.0, 2.0 ); + x = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); + alpha = new Complex128( 2.0, 2.0 ); - out = zscal( 4, za, zx, 1, 0 ); + out = zscal( 4, alpha, x, 1, 0 ); - t.strictEqual( out, zx, 'same reference' ); + t.strictEqual( out, x, 'same reference' ); t.end(); }); tape( 'if provided an `N` parameter less than or equal to `0`, the function returns the input array unchanged', function test( t ) { var expected; var viewX; - var za; - var zx; + var alpha; + var x; - zx = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); - za = new Complex128( 2.0, 2.0 ); + x = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); + alpha = new Complex128( 2.0, 2.0 ); - viewX = new Float64Array( zx.buffer ); + viewX = new Float64Array( x.buffer ); expected = new Float64Array([ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); - zscal( -1, za, zx, 1, 0 ); + zscal( -1, alpha, x, 1, 0 ); t.deepEqual( viewX, expected, 'returns expected value' ); - zscal( 0, za, zx, 1, 0 ); + zscal( 0, alpha, x, 1, 0 ); t.deepEqual( viewX, expected, 'returns expected value' ); t.end(); @@ -285,10 +285,10 @@ tape( 'if provided an `N` parameter less than or equal to `0`, the function retu tape( 'the function supports complex access patterns', function test( t ) { var expected; var viewX; - var za; - var zx; + var alpha; + var x; - zx = new Complex128Array([ + x = new Complex128Array([ 0.1, 0.1, 3.0, @@ -304,11 +304,11 @@ tape( 'the function supports complex access patterns', function test( t ) { 2.0, // 2 3.0 // 2 ]); - za = new Complex128( 0.4, -0.7 ); + alpha = new Complex128( 0.4, -0.7 ); - zscal( 2, za, zx, 3, 3 ); + zscal( 2, alpha, x, 3, 3 ); - viewX = new Float64Array( zx.buffer ); + viewX = new Float64Array( x.buffer ); expected = new Float64Array([ 0.1, 0.1, diff --git a/lib/node_modules/@stdlib/blas/base/zscal/test/test.ndarray.native.js b/lib/node_modules/@stdlib/blas/base/zscal/test/test.ndarray.native.js index e1a375cfd691..78a041e2d7ce 100644 --- a/lib/node_modules/@stdlib/blas/base/zscal/test/test.ndarray.native.js +++ b/lib/node_modules/@stdlib/blas/base/zscal/test/test.ndarray.native.js @@ -80,13 +80,13 @@ tape( 'the function has an arity of 5', opts, function test( t ) { t.end(); }); -tape( 'the function scales elements from `zx` by `za`', opts, function test( t ) { +tape( 'the function scales elements from `x` by `alpha`', opts, function test( t ) { var expected; var viewX; - var za; - var zx; + var alpha; + var x; - zx = new Complex128Array([ + x = new Complex128Array([ 0.3, // 1 0.1, // 1 0.5, // 2 @@ -100,11 +100,11 @@ tape( 'the function scales elements from `zx` by `za`', opts, function test( t ) 2.0, 3.0 ]); - za = new Complex128( 0.4, -0.7 ); + alpha = new Complex128( 0.4, -0.7 ); - zscal( 4, za, zx, 1, 0 ); + zscal( 4, alpha, x, 1, 0 ); - viewX = new Float64Array( zx.buffer ); + viewX = new Float64Array( x.buffer ); expected = new Float64Array([ 0.19, // 1 -0.17, // 1 @@ -124,13 +124,13 @@ tape( 'the function scales elements from `zx` by `za`', opts, function test( t ) t.end(); }); -tape( 'the function supports a `zx` stride', opts, function test( t ) { +tape( 'the function supports a `x` stride', opts, function test( t ) { var expected; var viewX; - var za; - var zx; + var alpha; + var x; - zx = new Complex128Array([ + x = new Complex128Array([ 0.1, // 1 0.1, // 1 3.0, @@ -144,11 +144,11 @@ tape( 'the function supports a `zx` stride', opts, function test( t ) { 7.0, 2.0 ]); - za = new Complex128( 0.4, -0.7 ); + alpha = new Complex128( 0.4, -0.7 ); - zscal( 3, za, zx, 2, 0 ); + zscal( 3, alpha, x, 2, 0 ); - viewX = new Float64Array( zx.buffer ); + viewX = new Float64Array( x.buffer ); expected = new Float64Array([ 0.11, // 1 -0.03, // 1 @@ -168,13 +168,13 @@ tape( 'the function supports a `zx` stride', opts, function test( t ) { t.end(); }); -tape( 'the function supports a negative `zx` stride', opts, function test( t ) { +tape( 'the function supports a negative `x` stride', opts, function test( t ) { var expected; var viewX; - var za; - var zx; + var alpha; + var x; - zx = new Complex128Array([ + x = new Complex128Array([ 0.1, // 3 0.1, // 3 3.0, @@ -188,11 +188,11 @@ tape( 'the function supports a negative `zx` stride', opts, function test( t ) { 7.0, 2.0 ]); - za = new Complex128( 0.4, -0.7 ); + alpha = new Complex128( 0.4, -0.7 ); - zscal( 3, za, zx, -2, 4 ); + zscal( 3, alpha, x, -2, 4 ); - viewX = new Float64Array( zx.buffer ); + viewX = new Float64Array( x.buffer ); expected = new Float64Array([ 0.11, // 3 -0.03, // 3 @@ -212,13 +212,13 @@ tape( 'the function supports a negative `zx` stride', opts, function test( t ) { t.end(); }); -tape( 'the function supports a `zx` offset', opts, function test( t ) { +tape( 'the function supports a `x` offset', opts, function test( t ) { var expected; var viewX; - var za; - var zx; + var alpha; + var x; - zx = new Complex128Array([ + x = new Complex128Array([ 0.1, 0.1, 3.0, @@ -232,11 +232,11 @@ tape( 'the function supports a `zx` offset', opts, function test( t ) { 7.0, // 3 2.0 // 3 ]); - za = new Complex128( 0.4, -0.7 ); + alpha = new Complex128( 0.4, -0.7 ); - zscal( 3, za, zx, 1, 3 ); + zscal( 3, alpha, x, 1, 3 ); - viewX = new Float64Array( zx.buffer ); + viewX = new Float64Array( x.buffer ); expected = new Float64Array([ 0.1, 0.1, @@ -257,35 +257,35 @@ tape( 'the function supports a `zx` offset', opts, function test( t ) { }); tape( 'the function returns a reference to the input array', opts, function test( t ) { + var alpha; var out; - var za; - var zx; + var x; - zx = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); - za = new Complex128( 2.0, 2.0 ); + x = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); + alpha = new Complex128( 2.0, 2.0 ); - out = zscal( 4, za, zx, 1, 0 ); + out = zscal( 4, alpha, x, 1, 0 ); - t.strictEqual( out, zx, 'same reference' ); + t.strictEqual( out, x, 'same reference' ); t.end(); }); tape( 'if provided an `N` parameter less than or equal to `0`, the function returns the input array unchanged', opts, function test( t ) { var expected; var viewX; - var za; - var zx; + var alpha; + var x; - zx = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); - za = new Complex128( 2.0, 2.0 ); + x = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); + alpha = new Complex128( 2.0, 2.0 ); - viewX = new Float64Array( zx.buffer ); + viewX = new Float64Array( x.buffer ); expected = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); - zscal( -1, za, zx, 1, 0 ); + zscal( -1, alpha, x, 1, 0 ); t.deepEqual( viewX, expected, 'returns expected value' ); - zscal( 0, za, zx, 1, 0 ); + zscal( 0, alpha, x, 1, 0 ); t.deepEqual( viewX, expected, 'returns expected value' ); t.end(); @@ -294,10 +294,10 @@ tape( 'if provided an `N` parameter less than or equal to `0`, the function retu tape( 'the function supports complex access patterns', opts, function test( t ) { var expected; var viewX; - var za; - var zx; + var alpha; + var x; - zx = new Complex128Array([ + x = new Complex128Array([ 0.1, 0.1, 3.0, @@ -313,11 +313,11 @@ tape( 'the function supports complex access patterns', opts, function test( t ) 2.0, // 2 3.0 // 2 ]); - za = new Complex128( 0.4, -0.7 ); + alpha = new Complex128( 0.4, -0.7 ); - zscal( 2, za, zx, 3, 3 ); + zscal( 2, alpha, x, 3, 3 ); - viewX = new Float64Array( zx.buffer ); + viewX = new Float64Array( x.buffer ); expected = new Float64Array([ 0.1, 0.1, diff --git a/lib/node_modules/@stdlib/blas/base/zscal/test/test.zscal.js b/lib/node_modules/@stdlib/blas/base/zscal/test/test.zscal.js index 9bc8a2001a86..da2df09846d6 100644 --- a/lib/node_modules/@stdlib/blas/base/zscal/test/test.zscal.js +++ b/lib/node_modules/@stdlib/blas/base/zscal/test/test.zscal.js @@ -71,13 +71,13 @@ tape( 'the function has an arity of 4', function test( t ) { t.end(); }); -tape( 'the function scales elements from `zx` by `za`', function test( t ) { +tape( 'the function scales elements from `x` by `alpha`', function test( t ) { var expected; var viewX; - var za; - var zx; + var alpha; + var x; - zx = new Complex128Array([ + x = new Complex128Array([ 0.3, // 1 0.1, // 1 0.5, // 2 @@ -87,11 +87,11 @@ tape( 'the function scales elements from `zx` by `za`', function test( t ) { 0.0, // 4 0.2 // 4 ]); - za = new Complex128( 0.4, -0.7 ); + alpha = new Complex128( 0.4, -0.7 ); - zscal( 4, za, zx, 1 ); + zscal( 4, alpha, x, 1 ); - viewX = new Float64Array( zx.buffer ); + viewX = new Float64Array( x.buffer ); expected = new Float64Array([ 0.19, // 1 -0.17, // 1 @@ -107,13 +107,13 @@ tape( 'the function scales elements from `zx` by `za`', function test( t ) { t.end(); }); -tape( 'the function supports a `zx` stride', function test( t ) { +tape( 'the function supports a `x` stride', function test( t ) { var expected; var viewX; - var za; - var zx; + var alpha; + var x; - zx = new Complex128Array([ + x = new Complex128Array([ 0.1, // 1 0.1, // 1 3.0, @@ -127,11 +127,11 @@ tape( 'the function supports a `zx` stride', function test( t ) { 7.0, 2.0 ]); - za = new Complex128( 0.4, -0.7 ); + alpha = new Complex128( 0.4, -0.7 ); - zscal( 3, za, zx, 2 ); + zscal( 3, alpha, x, 2 ); - viewX = new Float64Array( zx.buffer ); + viewX = new Float64Array( x.buffer ); expected = new Float64Array([ 0.11, // 1 -0.03, // 1 @@ -151,13 +151,13 @@ tape( 'the function supports a `zx` stride', function test( t ) { t.end(); }); -tape( 'the function supports a negative `zx` stride', function test( t ) { +tape( 'the function supports a negative `x` stride', function test( t ) { var expected; var viewX; - var za; - var zx; + var alpha; + var x; - zx = new Complex128Array([ + x = new Complex128Array([ 0.1, // 3 0.1, // 3 3.0, @@ -171,11 +171,11 @@ tape( 'the function supports a negative `zx` stride', function test( t ) { 7.0, 2.0 ]); - za = new Complex128( 0.4, -0.7 ); + alpha = new Complex128( 0.4, -0.7 ); - zscal( 3, za, zx, -2 ); + zscal( 3, alpha, x, -2 ); - viewX = new Float64Array( zx.buffer ); + viewX = new Float64Array( x.buffer ); expected = new Float64Array([ 0.11, // 3 -0.03, // 3 @@ -196,35 +196,35 @@ tape( 'the function supports a negative `zx` stride', function test( t ) { }); tape( 'the function returns a reference to the input array', function test( t ) { + var alpha; var out; - var za; - var zx; + var x; - zx = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); - za = new Complex128( 2.0, 2.0 ); + x = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); + alpha = new Complex128( 2.0, 2.0 ); - out = zscal( 4, za, zx, 1 ); + out = zscal( 4, alpha, x, 1 ); - t.strictEqual( out, zx, 'same reference' ); + t.strictEqual( out, x, 'same reference' ); t.end(); }); tape( 'if provided an `N` parameter less than or equal to `0`, the function returns the input array unchanged', function test( t ) { var expected; var viewX; - var za; - var zx; + var alpha; + var x; - zx = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); - za = new Complex128( 2.0, 2.0 ); + x = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); + alpha = new Complex128( 2.0, 2.0 ); - viewX = new Float64Array( zx.buffer ); + viewX = new Float64Array( x.buffer ); expected = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); - zscal( -1, za, zx, 1 ); + zscal( -1, alpha, x, 1 ); t.deepEqual( viewX, expected, 'returns expected value' ); - zscal( 0, za, zx, 1 ); + zscal( 0, alpha, x, 1 ); t.deepEqual( viewX, expected, 'returns expected value' ); t.end(); @@ -233,12 +233,12 @@ tape( 'if provided an `N` parameter less than or equal to `0`, the function retu tape( 'the function supports view offsets', function test( t ) { var expected; var viewX; - var zx0; - var zx1; - var za; + var alpha; + var x0; + var x1; // Initial arrays... - zx0 = new Complex128Array([ + x0 = new Complex128Array([ 0.1, -0.3, 8.0, // 1 @@ -250,14 +250,14 @@ tape( 'the function supports view offsets', function test( t ) { 2.0, 3.0 ]); - za = new Complex128( 0.4, -0.7 ); + alpha = new Complex128( 0.4, -0.7 ); // Create offset views... - zx1 = new Complex128Array( zx0.buffer, zx0.BYTES_PER_ELEMENT*1 ); // begin at 2nd element + x1 = new Complex128Array( x0.buffer, x0.BYTES_PER_ELEMENT*1 ); // begin at 2nd element - zscal( 3, za, zx1, 1 ); + zscal( 3, alpha, x1, 1 ); - viewX = new Float64Array( zx0.buffer ); + viewX = new Float64Array( x0.buffer ); expected = new Float64Array([ 0.1, -0.3, diff --git a/lib/node_modules/@stdlib/blas/base/zscal/test/test.zscal.native.js b/lib/node_modules/@stdlib/blas/base/zscal/test/test.zscal.native.js index 02510078a31e..fb6ef40b6ab9 100644 --- a/lib/node_modules/@stdlib/blas/base/zscal/test/test.zscal.native.js +++ b/lib/node_modules/@stdlib/blas/base/zscal/test/test.zscal.native.js @@ -80,13 +80,13 @@ tape( 'the function has an arity of 4', opts, function test( t ) { t.end(); }); -tape( 'the function scales elements from `zx` by `za`', opts, function test( t ) { +tape( 'the function scales elements from `x` by `alpha`', opts, function test( t ) { var expected; var viewX; - var za; - var zx; + var alpha; + var x; - zx = new Complex128Array([ + x = new Complex128Array([ 0.3, // 1 0.1, // 1 0.5, // 2 @@ -96,11 +96,11 @@ tape( 'the function scales elements from `zx` by `za`', opts, function test( t ) 0.0, // 4 0.2 // 4 ]); - za = new Complex128( 0.4, -0.7 ); + alpha = new Complex128( 0.4, -0.7 ); - zscal( 4, za, zx, 1 ); + zscal( 4, alpha, x, 1 ); - viewX = new Float64Array( zx.buffer ); + viewX = new Float64Array( x.buffer ); expected = new Float64Array([ 0.19, // 1 -0.17, // 1 @@ -116,13 +116,13 @@ tape( 'the function scales elements from `zx` by `za`', opts, function test( t ) t.end(); }); -tape( 'the function supports a `zx` stride', opts, function test( t ) { +tape( 'the function supports a `x` stride', opts, function test( t ) { var expected; var viewX; - var za; - var zx; + var alpha; + var x; - zx = new Complex128Array([ + x = new Complex128Array([ 0.1, // 1 0.1, // 1 3.0, @@ -136,11 +136,11 @@ tape( 'the function supports a `zx` stride', opts, function test( t ) { 7.0, 2.0 ]); - za = new Complex128( 0.4, -0.7 ); + alpha = new Complex128( 0.4, -0.7 ); - zscal( 3, za, zx, 2 ); + zscal( 3, alpha, x, 2 ); - viewX = new Float64Array( zx.buffer ); + viewX = new Float64Array( x.buffer ); expected = new Float64Array([ 0.11, // 1 -0.03, // 1 @@ -160,13 +160,13 @@ tape( 'the function supports a `zx` stride', opts, function test( t ) { t.end(); }); -tape( 'the function supports a negative `zx` stride', opts, function test( t ) { +tape( 'the function supports a negative `x` stride', opts, function test( t ) { var expected; var viewX; - var za; - var zx; + var alpha; + var x; - zx = new Complex128Array([ + x = new Complex128Array([ 0.1, // 3 0.1, // 3 3.0, @@ -180,11 +180,11 @@ tape( 'the function supports a negative `zx` stride', opts, function test( t ) { 7.0, 2.0 ]); - za = new Complex128( 0.4, -0.7 ); + alpha = new Complex128( 0.4, -0.7 ); - zscal( 3, za, zx, -2 ); + zscal( 3, alpha, x, -2 ); - viewX = new Float64Array( zx.buffer ); + viewX = new Float64Array( x.buffer ); expected = new Float64Array([ 0.11, // 3 -0.03, // 3 @@ -205,35 +205,35 @@ tape( 'the function supports a negative `zx` stride', opts, function test( t ) { }); tape( 'the function returns a reference to the input array', opts, function test( t ) { + var alpha; var out; - var za; - var zx; + var x; - zx = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); - za = new Complex128( 2.0, 2.0 ); + x = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); + alpha = new Complex128( 2.0, 2.0 ); - out = zscal( 4, za, zx, 1 ); + out = zscal( 4, alpha, x, 1 ); - t.strictEqual( out, zx, 'same reference' ); + t.strictEqual( out, x, 'same reference' ); t.end(); }); tape( 'if provided an `N` parameter less than or equal to `0`, the function returns the input array unchanged', opts, function test( t ) { var expected; var viewX; - var za; - var zx; + var alpha; + var x; - zx = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); - za = new Complex128( 2.0, 2.0 ); + x = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); + alpha = new Complex128( 2.0, 2.0 ); - viewX = new Float64Array( zx.buffer ); + viewX = new Float64Array( x.buffer ); expected = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); - zscal( -1, za, zx, 1 ); + zscal( -1, alpha, x, 1 ); t.deepEqual( viewX, expected, 'returns expected value' ); - zscal( 0, za, zx, 1 ); + zscal( 0, alpha, x, 1 ); t.deepEqual( viewX, expected, 'returns expected value' ); t.end(); @@ -242,12 +242,12 @@ tape( 'if provided an `N` parameter less than or equal to `0`, the function retu tape( 'the function supports view offsets', opts, function test( t ) { var expected; var viewX; - var zx0; - var zx1; - var za; + var alpha; + var x0; + var x1; // Initial arrays... - zx0 = new Complex128Array([ + x0 = new Complex128Array([ 0.1, -0.3, 8.0, // 1 @@ -259,14 +259,14 @@ tape( 'the function supports view offsets', opts, function test( t ) { 2.0, 3.0 ]); - za = new Complex128( 0.4, -0.7 ); + alpha = new Complex128( 0.4, -0.7 ); // Create offset views... - zx1 = new Complex128Array( zx0.buffer, zx0.BYTES_PER_ELEMENT*1 ); // begin at 2nd element + x1 = new Complex128Array( x0.buffer, x0.BYTES_PER_ELEMENT*1 ); // begin at 2nd element - zscal( 3, za, zx1, 1 ); + zscal( 3, alpha, x1, 1 ); - viewX = new Float64Array( zx0.buffer ); + viewX = new Float64Array( x0.buffer ); expected = new Float64Array([ 0.1, -0.3,