diff --git a/lib/node_modules/@stdlib/blas/base/zdscal/README.md b/lib/node_modules/@stdlib/blas/base/zdscal/README.md index 49d5fc189255..20da42768f86 100644 --- a/lib/node_modules/@stdlib/blas/base/zdscal/README.md +++ b/lib/node_modules/@stdlib/blas/base/zdscal/README.md @@ -30,35 +30,35 @@ limitations under the License. var zdscal = require( '@stdlib/blas/base/zdscal' ); ``` -#### zdscal( N, da, zx, strideZX ) +#### zdscal( N, alpha, x, strideX ) Scales a double-precision complex floating-point vector by a double-precision floating-point constant. ```javascript var Complex128Array = require( '@stdlib/array/complex128' ); -var zx = new Complex128Array( [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ] ); +var x = new Complex128Array( [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ] ); -zdscal( 3, 2.0, zx, 1 ); -// zx => [ 2.0, 2.0, 2.0, 2.0, 2.0, 2.0 ] +zdscal( 3, 2.0, x, 1 ); +// x => [ 2.0, 2.0, 2.0, 2.0, 2.0, 2.0 ] ``` The function has the following parameters: - **N**: number of indexed elements. -- **da**: scalar constant. -- **zx**: input [`Complex128Array`][@stdlib/array/complex128]. -- **strideZX**: stride length for `zx`. +- **alpha**: scalar constant. +- **x**: input [`Complex128Array`][@stdlib/array/complex128]. +- **strideX**: stride length for `x`. -The `N` and stride parameters determine which elements in `zx` are scaled by `da`. For example, to scale every other element in `zx` by `da`, +The `N` and stride parameters determine which elements in `x` are scaled by `alpha`. For example, to scale every other element in `x` by `alpha`, ```javascript var Complex128Array = require( '@stdlib/array/complex128' ); -var zx = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); +var x = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); -zdscal( 2, 2.0, zx, 2 ); -// zx => [ 2.0, 4.0, 3.0, 4.0, 10.0, 12.0, 7.0, 8.0 ] +zdscal( 2, 2.0, x, 2 ); +// x => [ 2.0, 4.0, 3.0, 4.0, 10.0, 12.0, 7.0, 8.0 ] ``` Note that indexing is relative to the first index. To introduce an offset, use [`typed array`][mdn-typed-array] views. @@ -69,42 +69,42 @@ Note that indexing is relative to the first index. To introduce an offset, use [ var Complex128Array = require( '@stdlib/array/complex128' ); // Initial array: -var zx0 = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); +var x0 = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); // Create an offset view: -var zx1 = new Complex128Array( zx0.buffer, zx0.BYTES_PER_ELEMENT*1 ); // start at 2nd element +var x1 = new Complex128Array( x0.buffer, x0.BYTES_PER_ELEMENT*1 ); // start at 2nd element -// Scale every element in `zx1`: -zdscal( 3, 2.0, zx1, 1 ); -// zx0 => [ 1.0, 2.0, 6.0, 8.0, 10.0, 12.0, 14.0, 16.0 ] +// Scale every element in `x1`: +zdscal( 3, 2.0, x1, 1 ); +// x0 => [ 1.0, 2.0, 6.0, 8.0, 10.0, 12.0, 14.0, 16.0 ] ``` -#### zdscal.ndarray( N, da, zx, strideZX, offsetZX ) +#### zdscal.ndarray( N, alpha, x, strideX, offsetX ) Scales a double-precision complex floating-point vector by a double-precision floating-point constant using alternative indexing semantics. ```javascript var Complex128Array = require( '@stdlib/array/complex128' ); -var zx = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); +var x = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); -zdscal.ndarray( 3, 2.0, zx, 1, 0 ); -// zx => [ 2.0, 4.0, 6.0, 8.0, 10.0, 12.0 ] +zdscal.ndarray( 3, 2.0, x, 1, 0 ); +// x => [ 2.0, 4.0, 6.0, 8.0, 10.0, 12.0 ] ``` The function has the following additional parameters: -- **offsetZX**: starting index for `zx`. +- **offsetX**: starting index for `x`. While [`typed array`][mdn-typed-array] views mandate a view offset based on the underlying buffer, the offset parameter supports indexing semantics based on a starting index. For example, to scale every other element in the input strided array starting from the second element, ```javascript var Complex128Array = require( '@stdlib/array/complex128' ); -var zx = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); +var x = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); -zdscal.ndarray( 2, 2.0, zx, 2, 1 ); -// zx => [ 1.0, 2.0, 6.0, 8.0, 5.0, 6.0, 14.0, 16.0 ] +zdscal.ndarray( 2, 2.0, x, 2, 1 ); +// x => [ 1.0, 2.0, 6.0, 8.0, 5.0, 6.0, 14.0, 16.0 ] ``` @@ -115,7 +115,7 @@ zdscal.ndarray( 2, 2.0, zx, 2, 1 ); ## Notes -- If `N <= 0`, both functions return `zx` unchanged. +- If `N <= 0`, both functions return `x` unchanged. - `zdscal()` corresponds to the [BLAS][blas] level 1 function [`zdscal`][zdscal]. @@ -138,11 +138,11 @@ function rand() { return new Complex128( discreteUniform( 0, 10 ), discreteUniform( -5, 5 ) ); } -var zx = filledarrayBy( 10, 'complex128', rand ); -console.log( zx.toString() ); +var x = filledarrayBy( 10, 'complex128', rand ); +console.log( x.toString() ); -zdscal( zx.length, 2.0, zx, 1 ); -console.log( zx.toString() ); +zdscal( x.length, 2.0, x, 1 ); +console.log( x.toString() ); ``` diff --git a/lib/node_modules/@stdlib/blas/base/zdscal/benchmark/benchmark.js b/lib/node_modules/@stdlib/blas/base/zdscal/benchmark/benchmark.js index 44194d6be6b4..9deb8596ec58 100644 --- a/lib/node_modules/@stdlib/blas/base/zdscal/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/blas/base/zdscal/benchmark/benchmark.js @@ -46,11 +46,11 @@ var options = { * @returns {Function} benchmark function */ function createBenchmark( len ) { - var zxbuf; - var zx; + 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 ); return benchmark; @@ -65,13 +65,13 @@ function createBenchmark( len ) { b.tic(); for ( i = 0; i < b.iterations; i++ ) { - zdscal( zx.length, 2.0, zx, 1 ); - if ( isnan( zxbuf[ i%(len*2) ] ) ) { + zdscal( x.length, 2.0, 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/zdscal/benchmark/benchmark.ndarray.js b/lib/node_modules/@stdlib/blas/base/zdscal/benchmark/benchmark.ndarray.js index ebefeb815a35..94d2bb316175 100644 --- a/lib/node_modules/@stdlib/blas/base/zdscal/benchmark/benchmark.ndarray.js +++ b/lib/node_modules/@stdlib/blas/base/zdscal/benchmark/benchmark.ndarray.js @@ -46,11 +46,11 @@ var options = { * @returns {Function} benchmark function */ function createBenchmark( len ) { - var zxbuf; - var zx; + 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 ); return benchmark; @@ -65,13 +65,13 @@ function createBenchmark( len ) { b.tic(); for ( i = 0; i < b.iterations; i++ ) { - zdscal( zx.length, 2.0, zx, 1, 0 ); - if ( isnan( zxbuf[ i%(len*2) ] ) ) { + zdscal( x.length, 2.0, 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/zdscal/docs/repl.txt b/lib/node_modules/@stdlib/blas/base/zdscal/docs/repl.txt index ce5aed79bca3..27a80ea8b21a 100644 --- a/lib/node_modules/@stdlib/blas/base/zdscal/docs/repl.txt +++ b/lib/node_modules/@stdlib/blas/base/zdscal/docs/repl.txt @@ -1,15 +1,15 @@ -{{alias}}( N, da, zx, strideZX ) +{{alias}}( N, alpha, x, strideX ) Scales a double-precision complex floating-point vector by a double- precision floating-point constant. - The `N` and stride parameters determine which elements in `zx` are scaled by - `da`. + The `N` and stride parameters determine which elements in `x` are scaled by + `alpha`. Indexing is relative to the first index. To introduce an offset, use typed array views. - If `N` is less than or equal to `0`, the function returns `zx` unchanged. + If `N` is less than or equal to `0`, the function returns `x` unchanged. Parameters @@ -17,42 +17,42 @@ N: integer Number of indexed elements. - da: double + alpha: double Scalar constant. - zx: Complex128Array + x: Complex128Array Input array. - strideZX: integer - Stride length for `zx`. + strideX: integer + Stride length for `x`. Returns ------- - zx: Complex128Array + x: Complex128Array Input array. Examples -------- // Standard usage: - > var zx = new {{alias:@stdlib/array/complex128}}( [ 1.0, 2.0, 3.0, 4.0 ] ); - > {{alias}}( 2, 2.0, zx, 1 ) + > var x = new {{alias:@stdlib/array/complex128}}( [ 1.0, 2.0, 3.0, 4.0 ] ); + > {{alias}}( 2, 2.0, x, 1 ) [ 2.0, 4.0, 6.0, 8.0 ] // N and stride parameters: - > zx = new {{alias:@stdlib/array/complex128}}( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); - > {{alias}}( 2, 2.0, zx, 2 ) + > x = new {{alias:@stdlib/array/complex128}}( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); + > {{alias}}( 2, 2.0, x, 2 ) [ 2.0, 4.0, 3.0, 4.0, 10.0, 12.0 ] // Using typed array views: - > var zx0 = new {{alias:@stdlib/array/complex128}}( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); - > var zx1 = new {{alias:@stdlib/array/complex128}}( zx0.buffer, zx0.BYTES_PER_ELEMENT*1 ); - > {{alias}}( 2, 2.0, zx1, 1 ) + > var x0 = new {{alias:@stdlib/array/complex128}}( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); + > var x1 = new {{alias:@stdlib/array/complex128}}( x0.buffer, x0.BYTES_PER_ELEMENT*1 ); + > {{alias}}( 2, 2.0, x1, 1 ) [ 6.0, 8.0, 10.0, 12.0 ] - > zx0 + > x0 [ 1.0, 2.0, 6.0, 8.0, 10.0, 12.0 ] -{{alias}}.ndarray( N, da, zx, strideZX, offsetZX ) +{{alias}}.ndarray( N, alpha, x, strideX, offsetX ) Scales a double-precision complex floating-point vector by a double- precision floating-point constant using alternative indexing semantics. @@ -65,33 +65,33 @@ N: integer Number of indexed elements. - da: number + alpha: number Scalar constant. - zx: Complex128Array + x: Complex128Array Input array. - strideZX: integer - Stride length for `zx`. + strideX: integer + Stride length for `x`. - offsetZX: integer - Starting index for `zx`. + offsetX: integer + Starting index for `x`. Returns ------- - zx: Complex128Array + x: Complex128Array Input array. Examples -------- // Standard usage: - > var zx = new {{alias:@stdlib/array/complex128}}( [ 1.0, 2.0, 3.0, 4.0 ] ); - > {{alias}}.ndarray( 2, 2.0, zx, 1, 0 ) + > var x = new {{alias:@stdlib/array/complex128}}( [ 1.0, 2.0, 3.0, 4.0 ] ); + > {{alias}}.ndarray( 2, 2.0, x, 1, 0 ) [ 2.0, 4.0, 6.0, 8.0 ] // Advanced indexing: - > zx = new {{alias:@stdlib/array/complex128}}( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); - > {{alias}}.ndarray( 2, 2.0, zx, 1, 2 ) + > x = new {{alias:@stdlib/array/complex128}}( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); + > {{alias}}.ndarray( 2, 2.0, x, 1, 2 ) [ 1.0, 2.0, 3.0, 4.0, 10.0, 12.0, 14.0, 16.0 ] See Also diff --git a/lib/node_modules/@stdlib/blas/base/zdscal/docs/types/index.d.ts b/lib/node_modules/@stdlib/blas/base/zdscal/docs/types/index.d.ts index 09dab952001a..c24d3409c1cf 100644 --- a/lib/node_modules/@stdlib/blas/base/zdscal/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/blas/base/zdscal/docs/types/index.d.ts @@ -30,66 +30,66 @@ interface Routine { * Scales a double-precision complex floating-point vector by a double-precision floating-point constant. * * @param N - number of indexed elements - * @param da - scalar constant - * @param zx - input array - * @param strideZX - `zx` stride length + * @param alpha - scalar constant + * @param x - input array + * @param strideX - `x` stride length * @returns input array * * @example * var Complex128Array = require( '@stdlib/array/complex128' ); * - * var zx = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); + * var x = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); * - * zdscal( 3, 2.0, zx, 1 ); - * // zx => [ 2.0, 4.0, 6.0, 8.0, 10.0, 12.0 ] + * zdscal( 3, 2.0, x, 1 ); + * // x => [ 2.0, 4.0, 6.0, 8.0, 10.0, 12.0 ] */ - ( N: number, da: number, zx: Complex128Array, strideZX: number ): Complex128Array; + ( N: number, alpha: number, x: Complex128Array, strideX: number ): Complex128Array; /** * Scales a double-precision complex floating-point vector by a double-precision floating-point constant. * * @param N - number of indexed elements - * @param da - scalar constant - * @param zx - input array - * @param strideZX - `zx` stride length - * @param offsetZX - starting index for `zx` + * @param alpha - scalar constant + * @param x - input array + * @param strideX - `x` stride length + * @param offsetX - starting index for `x` * @returns input array * * @example * var Complex128Array = require( '@stdlib/array/complex128' ); * - * var zx = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); + * var x = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); * - * zdscal.ndarray( 3, 2.0, zx, 1, 0 ); - * // zx => [ 2.0, 4.0, 6.0, 8.0, 10.0, 12.0 ] + * zdscal.ndarray( 3, 2.0, x, 1, 0 ); + * // x => [ 2.0, 4.0, 6.0, 8.0, 10.0, 12.0 ] */ - ndarray( N: number, da: number, zx: Complex128Array, strideZX: number, offsetZX: number ): Complex128Array; + ndarray( N: number, alpha: number, x: Complex128Array, strideX: number, offsetX: number ): Complex128Array; } /** * Scales a double-precision complex floating-point vector by a double-precision floating-point constant. * * @param N - number of indexed elements -* @param da - scalar constant -* @param zx - input array -* @param strideZX - `zx` stride length +* @param alpha - scalar constant +* @param x - input array +* @param strideX - `x` stride length * @returns input array * * @example * var Complex128Array = require( '@stdlib/array/complex128' ); * -* var zx = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); +* var x = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); * -* zdscal( 3, 2.0, zx, 1 ); -* // zx => [ 2.0, 4.0, 6.0, 8.0, 10.0, 12.0 ] +* zdscal( 3, 2.0, x, 1 ); +* // x => [ 2.0, 4.0, 6.0, 8.0, 10.0, 12.0 ] * * @example * var Complex128Array = require( '@stdlib/array/complex128' ); * -* var zx = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); +* var x = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); * -* zdscal.ndarray( 2, 2.0, zx, 1, 1 ); -* // zx => [ 1.0, 2.0, 6.0, 8.0, 10.0, 12.0 ] +* zdscal.ndarray( 2, 2.0, x, 1, 1 ); +* // x => [ 1.0, 2.0, 6.0, 8.0, 10.0, 12.0 ] */ declare var zdscal: Routine; diff --git a/lib/node_modules/@stdlib/blas/base/zdscal/docs/types/test.ts b/lib/node_modules/@stdlib/blas/base/zdscal/docs/types/test.ts index d857869e57da..c7e1e8f10e03 100644 --- a/lib/node_modules/@stdlib/blas/base/zdscal/docs/types/test.ts +++ b/lib/node_modules/@stdlib/blas/base/zdscal/docs/types/test.ts @@ -25,167 +25,167 @@ import zdscal = require( './index' ); // The function returns a Complex128Array... { - const zx = new Complex128Array( 10 ); + const x = new Complex128Array( 10 ); - zdscal( zx.length, 2.0, zx, 1 ); // $ExpectType Complex128Array + zdscal( x.length, 2.0, x, 1 ); // $ExpectType Complex128Array } // The compiler throws an error if the function is provided a first argument which is not a number... { - const zx = new Complex128Array( 10 ); - - zdscal( '10', 2.0, zx, 1 ); // $EzxpectError - zdscal( true, 2.0, zx, 1 ); // $ExpectError - zdscal( false, 2.0, zx, 1 ); // $ExpectError - zdscal( null, 2.0, zx, 1 ); // $ExpectError - zdscal( undefined, 2.0, zx, 1 ); // $ExpectError - zdscal( [], 2.0, zx, 1 ); // $ExpectError - zdscal( {}, 2.0, zx, 1 ); // $ExpectError - zdscal( ( zx: number ): number => zx, 2.0, zx, 1 ); // $ExpectError + const x = new Complex128Array( 10 ); + + zdscal( '10', 2.0, x, 1 ); // $EzxpectError + zdscal( true, 2.0, x, 1 ); // $ExpectError + zdscal( false, 2.0, x, 1 ); // $ExpectError + zdscal( null, 2.0, x, 1 ); // $ExpectError + zdscal( undefined, 2.0, x, 1 ); // $ExpectError + zdscal( [], 2.0, x, 1 ); // $ExpectError + zdscal( {}, 2.0, x, 1 ); // $ExpectError + zdscal( ( x: number ): number => x, 2.0, x, 1 ); // $ExpectError } // The compiler throws an error if the function is provided a second argument which is not a number... { - const zx = new Complex128Array( 10 ); - - zdscal( zx.length, new Complex128( 1.0, 2.0 ), zx, 1 ); // $ExpectError - zdscal( zx.length, '10', zx, 1 ); // $ExpectError - zdscal( zx.length, true, zx, 1 ); // $ExpectError - zdscal( zx.length, false, zx, 1 ); // $ExpectError - zdscal( zx.length, null, zx, 1 ); // $ExpectError - zdscal( zx.length, undefined, zx, 1 ); // $ExpectError - zdscal( zx.length, [ '1' ], zx, 1 ); // $ExpectError - zdscal( zx.length, {}, zx, 1 ); // $ExpectError - zdscal( zx.length, ( zx: number ): number => zx, zx, 1 ); // $ExpectError + const x = new Complex128Array( 10 ); + + zdscal( x.length, new Complex128( 1.0, 2.0 ), x, 1 ); // $ExpectError + zdscal( x.length, '10', x, 1 ); // $ExpectError + zdscal( x.length, true, x, 1 ); // $ExpectError + zdscal( x.length, false, x, 1 ); // $ExpectError + zdscal( x.length, null, x, 1 ); // $ExpectError + zdscal( x.length, undefined, x, 1 ); // $ExpectError + zdscal( x.length, [ '1' ], x, 1 ); // $ExpectError + zdscal( x.length, {}, x, 1 ); // $ExpectError + zdscal( x.length, ( x: number ): number => x, x, 1 ); // $ExpectError } // The compiler throws an error if the function is provided a third argument which is not a Complex128Array... { - const zx = new Complex128Array( 10 ); - - zdscal( zx.length, 2.0, 10, 1 ); // $ExpectError - zdscal( zx.length, 2.0, '10', 1 ); // $ExpectError - zdscal( zx.length, 2.0, true, 1 ); // $ExpectError - zdscal( zx.length, 2.0, false, 1 ); // $ExpectError - zdscal( zx.length, 2.0, null, 1 ); // $ExpectError - zdscal( zx.length, 2.0, undefined, 1 ); // $ExpectError - zdscal( zx.length, 2.0, [ '1' ], 1 ); // $ExpectError - zdscal( zx.length, 2.0, {}, 1 ); // $ExpectError - zdscal( zx.length, 2.0, ( zx: number ): number => zx, 1 ); // $ExpectError + const x = new Complex128Array( 10 ); + + zdscal( x.length, 2.0, 10, 1 ); // $ExpectError + zdscal( x.length, 2.0, '10', 1 ); // $ExpectError + zdscal( x.length, 2.0, true, 1 ); // $ExpectError + zdscal( x.length, 2.0, false, 1 ); // $ExpectError + zdscal( x.length, 2.0, null, 1 ); // $ExpectError + zdscal( x.length, 2.0, undefined, 1 ); // $ExpectError + zdscal( x.length, 2.0, [ '1' ], 1 ); // $ExpectError + zdscal( x.length, 2.0, {}, 1 ); // $ExpectError + zdscal( x.length, 2.0, ( x: number ): number => x, 1 ); // $ExpectError } // The compiler throws an error if the function is provided a fourth argument which is not a number... { - const zx = new Complex128Array( 10 ); - - zdscal( zx.length, 2.0, zx, '10' ); // $ExpectError - zdscal( zx.length, 2.0, zx, true ); // $ExpectError - zdscal( zx.length, 2.0, zx, false ); // $ExpectError - zdscal( zx.length, 2.0, zx, null ); // $ExpectError - zdscal( zx.length, 2.0, zx, undefined ); // $ExpectError - zdscal( zx.length, 2.0, zx, [] ); // $ExpectError - zdscal( zx.length, 2.0, zx, {} ); // $ExpectError - zdscal( zx.length, 2.0, zx, ( zx: number ): number => zx ); // $ExpectError + const x = new Complex128Array( 10 ); + + zdscal( x.length, 2.0, x, '10' ); // $ExpectError + zdscal( x.length, 2.0, x, true ); // $ExpectError + zdscal( x.length, 2.0, x, false ); // $ExpectError + zdscal( x.length, 2.0, x, null ); // $ExpectError + zdscal( x.length, 2.0, x, undefined ); // $ExpectError + zdscal( x.length, 2.0, x, [] ); // $ExpectError + zdscal( x.length, 2.0, x, {} ); // $ExpectError + zdscal( x.length, 2.0, x, ( x: number ): number => x ); // $ExpectError } // The compiler throws an error if the function is provided an unsupported number of arguments... { - const zx = new Complex128Array( 10 ); + const x = new Complex128Array( 10 ); zdscal(); // $ExpectError - zdscal( zx.length ); // $ExpectError - zdscal( zx.length, 2.0 ); // $ExpectError - zdscal( zx.length, 2.0, zx ); // $ExpectError - zdscal( zx.length, 2.0, zx, 1, 10 ); // $ExpectError + zdscal( x.length ); // $ExpectError + zdscal( x.length, 2.0 ); // $ExpectError + zdscal( x.length, 2.0, x ); // $ExpectError + zdscal( x.length, 2.0, x, 1, 10 ); // $ExpectError } // Attached to main export is an `ndarray` method which returns a Complex128Array... { - const zx = new Complex128Array( 10 ); + const x = new Complex128Array( 10 ); - zdscal.ndarray( zx.length, 2.0, zx, 1, 0 ); // $ExpectType Complex128Array + zdscal.ndarray( x.length, 2.0, x, 1, 0 ); // $ExpectType Complex128Array } // The compiler throws an error if the `ndarray` method is provided a first argument which is not a number... { - const zx = new Complex128Array( 10 ); - - zdscal.ndarray( '10', 2.0, zx, 1, 0 ); // $ExpectError - zdscal.ndarray( true, 2.0, zx, 1, 0 ); // $ExpectError - zdscal.ndarray( false, 2.0, zx, 1, 0 ); // $ExpectError - zdscal.ndarray( null, 2.0, zx, 1, 0 ); // $ExpectError - zdscal.ndarray( undefined, 2.0, zx, 1, 0 ); // $ExpectError - zdscal.ndarray( [], 2.0, zx, 1, 0 ); // $ExpectError - zdscal.ndarray( {}, 2.0, zx, 1, 0 ); // $ExpectError - zdscal.ndarray( ( zx: number ): number => zx, 2.0, zx, 1, 0 ); // $ExpectError + const x = new Complex128Array( 10 ); + + zdscal.ndarray( '10', 2.0, x, 1, 0 ); // $ExpectError + zdscal.ndarray( true, 2.0, x, 1, 0 ); // $ExpectError + zdscal.ndarray( false, 2.0, x, 1, 0 ); // $ExpectError + zdscal.ndarray( null, 2.0, x, 1, 0 ); // $ExpectError + zdscal.ndarray( undefined, 2.0, x, 1, 0 ); // $ExpectError + zdscal.ndarray( [], 2.0, x, 1, 0 ); // $ExpectError + zdscal.ndarray( {}, 2.0, x, 1, 0 ); // $ExpectError + zdscal.ndarray( ( x: number ): number => x, 2.0, x, 1, 0 ); // $ExpectError } // The compiler throws an error if the `ndarray` method is provided a second argument which is not a number... { - const zx = new Complex128Array( 10 ); - - zdscal.ndarray( zx.length, new Complex128( 1.0, 2.0 ), zx, 1, 0 ); // $ExpectError - zdscal.ndarray( zx.length, '10', zx, 1, 0 ); // $ExpectError - zdscal.ndarray( zx.length, true, zx, 1, 0 ); // $ExpectError - zdscal.ndarray( zx.length, false, zx, 1, 0 ); // $ExpectError - zdscal.ndarray( zx.length, null, zx, 1, 0 ); // $ExpectError - zdscal.ndarray( zx.length, undefined, zx, 1, 0 ); // $ExpectError - zdscal.ndarray( zx.length, [ '1' ], zx, 1, 0 ); // $ExpectError - zdscal.ndarray( zx.length, {}, zx, 1, 0 ); // $ExpectError - zdscal.ndarray( zx.length, ( zx: number ): number => zx, zx, 1, 0 ); // $ExpectError + const x = new Complex128Array( 10 ); + + zdscal.ndarray( x.length, new Complex128( 1.0, 2.0 ), x, 1, 0 ); // $ExpectError + zdscal.ndarray( x.length, '10', x, 1, 0 ); // $ExpectError + zdscal.ndarray( x.length, true, x, 1, 0 ); // $ExpectError + zdscal.ndarray( x.length, false, x, 1, 0 ); // $ExpectError + zdscal.ndarray( x.length, null, x, 1, 0 ); // $ExpectError + zdscal.ndarray( x.length, undefined, x, 1, 0 ); // $ExpectError + zdscal.ndarray( x.length, [ '1' ], x, 1, 0 ); // $ExpectError + zdscal.ndarray( x.length, {}, x, 1, 0 ); // $ExpectError + zdscal.ndarray( x.length, ( x: number ): number => x, x, 1, 0 ); // $ExpectError } // The compiler throws an error if the `ndarray` method is provided a third argument which is not a Complex128Array... { - const zx = new Complex128Array( 10 ); - - zdscal( zx.length, 2.0, 10, 1, 0 ); // $ExpectError - zdscal( zx.length, 2.0, '10', 1, 0 ); // $ExpectError - zdscal( zx.length, 2.0, true, 1, 0 ); // $ExpectError - zdscal( zx.length, 2.0, false, 1, 0 ); // $ExpectError - zdscal( zx.length, 2.0, null, 1, 0 ); // $ExpectError - zdscal( zx.length, 2.0, undefined, 1, 0 ); // $ExpectError - zdscal( zx.length, 2.0, [ '1' ], 1, 0 ); // $ExpectError - zdscal( zx.length, 2.0, {}, 1, 0 ); // $ExpectError - zdscal( zx.length, 2.0, ( zx: number ): number => zx, 1, 0 ); // $ExpectError + const x = new Complex128Array( 10 ); + + zdscal.ndarray( x.length, 2.0, 10, 1, 0 ); // $ExpectError + zdscal.ndarray( x.length, 2.0, '10', 1, 0 ); // $ExpectError + zdscal.ndarray( x.length, 2.0, true, 1, 0 ); // $ExpectError + zdscal.ndarray( x.length, 2.0, false, 1, 0 ); // $ExpectError + zdscal.ndarray( x.length, 2.0, null, 1, 0 ); // $ExpectError + zdscal.ndarray( x.length, 2.0, undefined, 1, 0 ); // $ExpectError + zdscal.ndarray( x.length, 2.0, [ '1' ], 1, 0 ); // $ExpectError + zdscal.ndarray( x.length, 2.0, {}, 1, 0 ); // $ExpectError + zdscal.ndarray( x.length, 2.0, ( x: number ): number => x, 1, 0 ); // $ExpectError } // The compiler throws an error if the `ndarray` method is provided a fourth argument which is not a number... { - const zx = new Complex128Array( 10 ); - - zdscal.ndarray( zx.length, 2.0, zx, '10', 0 ); // $ExpectError - zdscal.ndarray( zx.length, 2.0, zx, true, 0 ); // $ExpectError - zdscal.ndarray( zx.length, 2.0, zx, false, 0 ); // $ExpectError - zdscal.ndarray( zx.length, 2.0, zx, null, 0 ); // $ExpectError - zdscal.ndarray( zx.length, 2.0, zx, undefined, 0 ); // $ExpectError - zdscal.ndarray( zx.length, 2.0, zx, [], 0 ); // $ExpectError - zdscal.ndarray( zx.length, 2.0, zx, {}, 0 ); // $ExpectError - zdscal.ndarray( zx.length, 2.0, zx, ( zx: number ): number => zx, 0 ); // $ExpectError + const x = new Complex128Array( 10 ); + + zdscal.ndarray( x.length, 2.0, x, '10', 0 ); // $ExpectError + zdscal.ndarray( x.length, 2.0, x, true, 0 ); // $ExpectError + zdscal.ndarray( x.length, 2.0, x, false, 0 ); // $ExpectError + zdscal.ndarray( x.length, 2.0, x, null, 0 ); // $ExpectError + zdscal.ndarray( x.length, 2.0, x, undefined, 0 ); // $ExpectError + zdscal.ndarray( x.length, 2.0, x, [], 0 ); // $ExpectError + zdscal.ndarray( x.length, 2.0, x, {}, 0 ); // $ExpectError + zdscal.ndarray( x.length, 2.0, x, ( x: number ): number => x, 0 ); // $ExpectError } // The compiler throws an error if the `ndarray` method is provided a fifth argument which is not a number... { - const zx = new Complex128Array( 10 ); - - zdscal.ndarray( zx.length, 2.0, zx, 1, '10' ); // $ExpectError - zdscal.ndarray( zx.length, 2.0, zx, 1, true ); // $ExpectError - zdscal.ndarray( zx.length, 2.0, zx, 1, false ); // $ExpectError - zdscal.ndarray( zx.length, 2.0, zx, 1, null ); // $ExpectError - zdscal.ndarray( zx.length, 2.0, zx, 1, undefined ); // $ExpectError - zdscal.ndarray( zx.length, 2.0, zx, 1, [] ); // $ExpectError - zdscal.ndarray( zx.length, 2.0, zx, 1, {} ); // $ExpectError - zdscal.ndarray( zx.length, 2.0, zx, 1, ( zx: number ): number => zx ); // $ExpectError + const x = new Complex128Array( 10 ); + + zdscal.ndarray( x.length, 2.0, x, 1, '10' ); // $ExpectError + zdscal.ndarray( x.length, 2.0, x, 1, true ); // $ExpectError + zdscal.ndarray( x.length, 2.0, x, 1, false ); // $ExpectError + zdscal.ndarray( x.length, 2.0, x, 1, null ); // $ExpectError + zdscal.ndarray( x.length, 2.0, x, 1, undefined ); // $ExpectError + zdscal.ndarray( x.length, 2.0, x, 1, [] ); // $ExpectError + zdscal.ndarray( x.length, 2.0, x, 1, {} ); // $ExpectError + zdscal.ndarray( x.length, 2.0, x, 1, ( x: number ): number => x ); // $ExpectError } // The compiler throws an error if the `ndarray` method is provided an unsupported number of arguments... { - const zx = new Complex128Array( 10 ); + const x = new Complex128Array( 10 ); zdscal.ndarray(); // $ExpectError - zdscal.ndarray( zx.length ); // $ExpectError - zdscal.ndarray( zx.length, 2.0 ); // $ExpectError - zdscal.ndarray( zx.length, 2.0, zx ); // $ExpectError - zdscal.ndarray( zx.length, 2.0, zx, 1 ); // $ExpectError - zdscal.ndarray( zx.length, 2.0, zx, 1, 0, 10 ); // $ExpectError + zdscal.ndarray( x.length ); // $ExpectError + zdscal.ndarray( x.length, 2.0 ); // $ExpectError + zdscal.ndarray( x.length, 2.0, x ); // $ExpectError + zdscal.ndarray( x.length, 2.0, x, 1 ); // $ExpectError + zdscal.ndarray( x.length, 2.0, x, 1, 0, 10 ); // $ExpectError } diff --git a/lib/node_modules/@stdlib/blas/base/zdscal/examples/index.js b/lib/node_modules/@stdlib/blas/base/zdscal/examples/index.js index 86e6529bb69e..55490cda48b3 100644 --- a/lib/node_modules/@stdlib/blas/base/zdscal/examples/index.js +++ b/lib/node_modules/@stdlib/blas/base/zdscal/examples/index.js @@ -27,8 +27,8 @@ function rand() { return new Complex128( discreteUniform( 0, 10 ), discreteUniform( -5, 5 ) ); } -var zx = filledarrayBy( 10, 'complex128', rand ); -console.log( zx.toString() ); +var x = filledarrayBy( 10, 'complex128', rand ); +console.log( x.toString() ); -zdscal( zx.length, 2.0, zx, 1 ); -console.log( zx.toString() ); +zdscal( x.length, 2.0, x, 1 ); +console.log( x.toString() ); diff --git a/lib/node_modules/@stdlib/blas/base/zdscal/lib/index.js b/lib/node_modules/@stdlib/blas/base/zdscal/lib/index.js index d560906f0e30..9e875ea97b79 100644 --- a/lib/node_modules/@stdlib/blas/base/zdscal/lib/index.js +++ b/lib/node_modules/@stdlib/blas/base/zdscal/lib/index.js @@ -27,19 +27,19 @@ * var Complex128Array = require( '@stdlib/array/complex128' ); * var zdscal = require( '@stdlib/blas/base/zdscal' ); * -* var zx = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); +* var x = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); * -* zdscal( 3, 2.0, zx, 1 ); -* // zx => [ 2.0, 4.0, 6.0, 8.0, 10.0, 12.0 ] +* zdscal( 3, 2.0, x, 1 ); +* // x => [ 2.0, 4.0, 6.0, 8.0, 10.0, 12.0 ] * * @example * var Complex128Array = require( '@stdlib/array/complex128' ); * var zdscal = require( '@stdlib/blas/base/zdscal' ); * -* var zx = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); +* var x = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); * -* zdscal.ndarray( 3, 2.0, zx, 1, 0 ); -* // zx => [ 2.0, 4.0, 6.0, 8.0, 10.0, 12.0 ] +* zdscal.ndarray( 3, 2.0, x, 1, 0 ); +* // x => [ 2.0, 4.0, 6.0, 8.0, 10.0, 12.0 ] */ // MODULES // diff --git a/lib/node_modules/@stdlib/blas/base/zdscal/lib/ndarray.js b/lib/node_modules/@stdlib/blas/base/zdscal/lib/ndarray.js index be9eab9e337d..a16185c871d8 100644 --- a/lib/node_modules/@stdlib/blas/base/zdscal/lib/ndarray.js +++ b/lib/node_modules/@stdlib/blas/base/zdscal/lib/ndarray.js @@ -30,42 +30,42 @@ var scale = require( '@stdlib/complex/float64/base/scale' ).strided; * Scales a double-precision complex floating-point vector by a double-precision floating-point constant. * * @param {PositiveInteger} N - number of indexed elements -* @param {number} da - constant -* @param {Complex128Array} zx - input array -* @param {integer} strideZX - `zx` stride length -* @param {NonNegativeInteger} offsetZX - starting `zx` index +* @param {number} alpha - constant +* @param {Complex128Array} x - input array +* @param {integer} strideX - `x` stride length +* @param {NonNegativeInteger} offsetX - starting `x` index * @returns {Complex128Array} input array * * @example * var Complex128Array = require( '@stdlib/array/complex128' ); * var Complex128 = require( '@stdlib/complex/float64/ctor' ); * -* var zx = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); +* var x = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); * -* zdscal( 3, 2.0, zx, 1, 0 ); -* // zx => [ 2.0, 4.0, 6.0, 8.0, 10.0, 12.0 ] +* zdscal( 3, 2.0, x, 1, 0 ); +* // x => [ 2.0, 4.0, 6.0, 8.0, 10.0, 12.0 ] */ -function zdscal( N, da, zx, strideZX, offsetZX ) { - var zx64; +function zdscal( N, alpha, x, strideX, offsetX ) { + var x64; var ix; var sx; var i; - if ( N <= 0 || da === 1.0 ) { - return zx; + if ( N <= 0 || alpha === 1.0 ) { + return x; } // Reinterpret the input array as a real-valued array of interleaved real and imaginary components: - zx64 = reinterpret( zx, 0 ); + x64 = reinterpret( x, 0 ); // Adjust the stride and offset accordingly: - ix = offsetZX * 2; - sx = strideZX * 2; + ix = offsetX * 2; + sx = strideX * 2; for ( i = 0; i < N; i++ ) { - scale( da, zx64, 1, ix, zx64, 1, ix ); + scale( alpha, x64, 1, ix, x64, 1, ix ); ix += sx; } - return zx; + return x; } diff --git a/lib/node_modules/@stdlib/blas/base/zdscal/lib/zdscal.js b/lib/node_modules/@stdlib/blas/base/zdscal/lib/zdscal.js index ea99cf74dd32..1f9f580bb5f3 100644 --- a/lib/node_modules/@stdlib/blas/base/zdscal/lib/zdscal.js +++ b/lib/node_modules/@stdlib/blas/base/zdscal/lib/zdscal.js @@ -30,21 +30,21 @@ var ndarray = require( './ndarray.js' ); * Scales a double-precision complex floating-point vector by a double-precision floating-point constant. * * @param {PositiveInteger} N - number of indexed elements -* @param {number} da - constant -* @param {Complex128Array} zx - input array -* @param {integer} strideZX - `zx` stride length +* @param {number} alpha - constant +* @param {Complex128Array} x - input array +* @param {integer} strideX - `x` stride length * @returns {Complex128Array} input array * * @example * var Complex128Array = require( '@stdlib/array/complex128' ); * -* var zx = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); +* var x = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); * -* zdscal( 3, 2.0, zx, 1 ); -* // zx => [ 2.0, 4.0, 6.0, 8.0, 10.0, 12.0 ] +* zdscal( 3, 2.0, x, 1 ); +* // x => [ 2.0, 4.0, 6.0, 8.0, 10.0, 12.0 ] */ -function zdscal( N, da, zx, strideZX ) { - return ndarray( N, da, zx, strideZX, stride2offset( N, strideZX ) ); +function zdscal( N, alpha, x, strideX ) { + return ndarray( N, alpha, x, strideX, stride2offset( N, strideX ) ); } diff --git a/lib/node_modules/@stdlib/blas/base/zdscal/test/test.ndarray.js b/lib/node_modules/@stdlib/blas/base/zdscal/test/test.ndarray.js index c8e16e0b6450..4b3b0b78e101 100644 --- a/lib/node_modules/@stdlib/blas/base/zdscal/test/test.ndarray.js +++ b/lib/node_modules/@stdlib/blas/base/zdscal/test/test.ndarray.js @@ -39,11 +39,11 @@ tape( 'the function has an arity of 5', function test( t ) { t.end(); }); -tape( 'the function scales elements from `zx` by `da`', function test( t ) { +tape( 'the function scales elements from `x` by `alpha`', function test( t ) { var expected; - var zx; + var x; - zx = new Complex128Array([ + x = new Complex128Array([ 0.3, // 1 0.1, // 1 0.5, // 2 @@ -58,7 +58,7 @@ tape( 'the function scales elements from `zx` by `da`', function test( t ) { 3.0 ]); - zdscal( 4, 2.0, zx, 1, 0 ); + zdscal( 4, 2.0, x, 1, 0 ); expected = new Complex128Array([ 0.6, // 1 @@ -74,15 +74,15 @@ tape( 'the function scales elements from `zx` by `da`', function test( t ) { 2.0, 3.0 ]); - t.strictEqual( isSameComplex128Array( zx, expected ), true, 'returns expected value' ); + t.strictEqual( isSameComplex128Array( x, expected ), true, 'returns expected value' ); 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 zx; + var x; - zx = new Complex128Array([ + x = new Complex128Array([ 0.1, // 1 0.1, // 1 3.0, @@ -97,7 +97,7 @@ tape( 'the function supports a `zx` stride', function test( t ) { 2.0 ]); - zdscal( 3, 2.0, zx, 2, 0 ); + zdscal( 3, 2.0, x, 2, 0 ); expected = new Complex128Array([ 0.2, // 1 @@ -113,15 +113,15 @@ tape( 'the function supports a `zx` stride', function test( t ) { 7.0, 2.0 ]); - t.strictEqual( isSameComplex128Array( zx, expected ), true, 'returns expected value' ); + t.strictEqual( isSameComplex128Array( x, expected ), true, 'returns expected value' ); 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 zx; + var x; - zx = new Complex128Array([ + x = new Complex128Array([ 0.1, // 3 0.1, // 3 3.0, @@ -136,7 +136,7 @@ tape( 'the function supports a negative `zx` stride', function test( t ) { 2.0 ]); - zdscal( 3, 2.0, zx, -2, 4 ); + zdscal( 3, 2.0, x, -2, 4 ); expected = new Complex128Array([ 0.2, // 3 @@ -152,15 +152,15 @@ tape( 'the function supports a negative `zx` stride', function test( t ) { 7.0, 2.0 ]); - t.strictEqual( isSameComplex128Array( zx, expected ), true, 'returns expected value' ); + t.strictEqual( isSameComplex128Array( x, expected ), true, 'returns expected value' ); 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 zx; + var x; - zx = new Complex128Array([ + x = new Complex128Array([ 0.1, 0.1, 3.0, @@ -175,7 +175,7 @@ tape( 'the function supports a `zx` offset', function test( t ) { 2.0 // 3 ]); - zdscal( 3, 2.0, zx, 1, 3 ); + zdscal( 3, 2.0, x, 1, 3 ); expected = new Complex128Array([ 0.1, @@ -191,43 +191,43 @@ tape( 'the function supports a `zx` offset', function test( t ) { 14.0, // 3 4.0 // 3 ]); - t.strictEqual( isSameComplex128Array( zx, expected ), true, 'returns expected value' ); + t.strictEqual( isSameComplex128Array( x, expected ), true, 'returns expected value' ); t.end(); }); tape( 'the function returns a reference to the input array', function test( t ) { var out; - var zx; + var x; - zx = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); - out = zdscal( 4, 2.0, zx, 1, 0 ); + x = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); + out = zdscal( 4, 2.0, 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 zx; + var x; - zx = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); + x = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); expected = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); // eslint-disable-line max-len - zdscal( -1, 2.0, zx, 1, 0 ); - t.strictEqual( isSameComplex128Array( zx, expected ), true, 'returns expected value' ); + zdscal( -1, 2.0, x, 1, 0 ); + t.strictEqual( isSameComplex128Array( x, expected ), true, 'returns expected value' ); - zdscal( 0, 2.0, zx, 1, 0 ); - t.strictEqual( isSameComplex128Array( zx, expected ), true, 'returns expected value' ); + zdscal( 0, 2.0, x, 1, 0 ); + t.strictEqual( isSameComplex128Array( x, expected ), true, 'returns expected value' ); t.end(); }); tape( 'the function supports complex access patterns', function test( t ) { var expected; - var zx; + var x; - zx = new Complex128Array([ + x = new Complex128Array([ 0.1, 0.1, 3.0, @@ -244,7 +244,7 @@ tape( 'the function supports complex access patterns', function test( t ) { 3.0 // 1 ]); - zdscal( 2, 2.0, zx, -3, 6 ); + zdscal( 2, 2.0, x, -3, 6 ); expected = new Complex128Array([ 0.1, @@ -262,6 +262,6 @@ tape( 'the function supports complex access patterns', function test( t ) { 4.0, // 1 6.0 // 1 ]); - t.strictEqual( isSameComplex128Array( zx, expected ), true, 'returns expected value' ); + t.strictEqual( isSameComplex128Array( x, expected ), true, 'returns expected value' ); t.end(); }); diff --git a/lib/node_modules/@stdlib/blas/base/zdscal/test/test.zdscal.js b/lib/node_modules/@stdlib/blas/base/zdscal/test/test.zdscal.js index dd012578436b..63406edca653 100644 --- a/lib/node_modules/@stdlib/blas/base/zdscal/test/test.zdscal.js +++ b/lib/node_modules/@stdlib/blas/base/zdscal/test/test.zdscal.js @@ -39,11 +39,11 @@ tape( 'the function has an arity of 4', function test( t ) { t.end(); }); -tape( 'the function scales elements from `zx` by `da`', function test( t ) { +tape( 'the function scales elements from `x` by `alpha`', function test( t ) { var expected; - var zx; + var x; - zx = new Complex128Array([ + x = new Complex128Array([ 0.3, // 1 0.1, // 1 0.5, // 2 @@ -54,7 +54,7 @@ tape( 'the function scales elements from `zx` by `da`', function test( t ) { 0.2 // 4 ]); - zdscal( 4, 2.0, zx, 1 ); + zdscal( 4, 2.0, x, 1 ); expected = new Complex128Array([ 0.6, // 1 @@ -66,15 +66,15 @@ tape( 'the function scales elements from `zx` by `da`', function test( t ) { 0.0, // 4 0.4 // 4 ]); - t.strictEqual( isSameComplex128Array( zx, expected ), true, 'returns expected value' ); + t.strictEqual( isSameComplex128Array( x, expected ), true, 'returns expected value' ); 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 zx; + var x; - zx = new Complex128Array([ + x = new Complex128Array([ 0.1, // 1 0.1, // 1 3.0, @@ -89,7 +89,7 @@ tape( 'the function supports a `zx` stride', function test( t ) { 2.0 ]); - zdscal( 3, 2.0, zx, 2 ); + zdscal( 3, 2.0, x, 2 ); expected = new Complex128Array([ 0.2, // 1 @@ -105,15 +105,15 @@ tape( 'the function supports a `zx` stride', function test( t ) { 7.0, 2.0 ]); - t.strictEqual( isSameComplex128Array( zx, expected ), true, 'returns expected value' ); + t.strictEqual( isSameComplex128Array( x, expected ), true, 'returns expected value' ); 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 zx; + var x; - zx = new Complex128Array([ + x = new Complex128Array([ 0.1, // 3 0.1, // 3 3.0, @@ -128,7 +128,7 @@ tape( 'the function supports a negative `zx` stride', function test( t ) { 2.0 ]); - zdscal( 3, 2.0, zx, -2 ); + zdscal( 3, 2.0, x, -2 ); expected = new Complex128Array([ 0.2, // 3 @@ -144,34 +144,34 @@ tape( 'the function supports a negative `zx` stride', function test( t ) { 7.0, 2.0 ]); - t.strictEqual( isSameComplex128Array( zx, expected ), true, 'returns expected value' ); + t.strictEqual( isSameComplex128Array( x, expected ), true, 'returns expected value' ); t.end(); }); tape( 'the function returns a reference to the input array', function test( t ) { var out; - var zx; + var x; - zx = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); - out = zdscal( 4, 2.0, zx, 1 ); + x = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); + out = zdscal( 4, 2.0, 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 zx; + var x; - zx = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); + x = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); expected = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); // eslint-disable-line max-len - zdscal( -1, 2.0, zx, 1 ); - t.strictEqual( isSameComplex128Array( zx, expected ), true, 'returns expected value' ); + zdscal( -1, 2.0, x, 1 ); + t.strictEqual( isSameComplex128Array( x, expected ), true, 'returns expected value' ); - zdscal( 0, 2.0, zx, 1 ); - t.strictEqual( isSameComplex128Array( zx, expected ), true, 'returns expected value' ); + zdscal( 0, 2.0, x, 1 ); + t.strictEqual( isSameComplex128Array( x, expected ), true, 'returns expected value' ); t.end(); });