From 0a5e6d4447d52c439c5b439456b7408ddf5ac203 Mon Sep 17 00:00:00 2001 From: ShabiShett07 Date: Sat, 26 Apr 2025 13:49:28 +0530 Subject: [PATCH 1/3] docs: change variable naming in blas/base/csrot --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: passed - task: lint_package_json status: na - task: lint_repl_help status: passed - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: passed - task: lint_javascript_tests status: passed - task: lint_javascript_benchmarks status: passed - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: missing_dependencies - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: passed - task: lint_license_headers status: passed --- --- .../@stdlib/blas/base/csrot/README.md | 110 ++--- .../blas/base/csrot/benchmark/benchmark.js | 12 +- .../base/csrot/benchmark/benchmark.native.js | 12 +- .../base/csrot/benchmark/benchmark.ndarray.js | 12 +- .../benchmark/benchmark.ndarray.native.js | 12 +- .../@stdlib/blas/base/csrot/docs/repl.txt | 86 ++-- .../blas/base/csrot/docs/types/index.d.ts | 78 ++-- .../blas/base/csrot/docs/types/test.ts | 406 +++++++++--------- .../@stdlib/blas/base/csrot/examples/index.js | 12 +- .../csrot/include/stdlib/blas/base/csrot.h | 4 +- .../include/stdlib/blas/base/csrot_cblas.h | 2 +- .../@stdlib/blas/base/csrot/lib/csrot.js | 24 +- .../blas/base/csrot/lib/csrot.native.js | 28 +- .../@stdlib/blas/base/csrot/lib/index.js | 20 +- .../@stdlib/blas/base/csrot/lib/ndarray.js | 34 +- .../blas/base/csrot/lib/ndarray.native.js | 32 +- .../@stdlib/blas/base/csrot/src/addon.c | 12 +- .../@stdlib/blas/base/csrot/src/csrot.c | 12 +- .../@stdlib/blas/base/csrot/src/csrot_cblas.c | 30 +- .../@stdlib/blas/base/csrot/src/csrot_f.c | 36 +- .../blas/base/csrot/src/csrot_ndarray.c | 18 +- .../blas/base/csrot/test/test.csrot.js | 264 ++++++------ .../blas/base/csrot/test/test.csrot.native.js | 264 ++++++------ .../blas/base/csrot/test/test.ndarray.js | 296 ++++++------- .../base/csrot/test/test.ndarray.native.js | 296 ++++++------- 25 files changed, 1056 insertions(+), 1056 deletions(-) diff --git a/lib/node_modules/@stdlib/blas/base/csrot/README.md b/lib/node_modules/@stdlib/blas/base/csrot/README.md index f8ea5e539fb8..114d27bce551 100644 --- a/lib/node_modules/@stdlib/blas/base/csrot/README.md +++ b/lib/node_modules/@stdlib/blas/base/csrot/README.md @@ -30,40 +30,40 @@ limitations under the License. var csrot = require( '@stdlib/blas/base/csrot' ); ``` -#### csrot( N, cx, strideX, cy, strideY, c, s ) +#### csrot( N, x, strideX, y, strideY, c, s ) Applies a plane rotation. ```javascript var Complex64Array = require( '@stdlib/array/complex64' ); -var cx = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); -var cy = new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ); +var x = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); +var y = new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ); -csrot( cx.length, cx, 1, cy, 1, 0.8, 0.6 ); -// cx => [ ~0.8, ~1.6, ~2.4, ~3.2, 4.0, ~4.8, ~5.6, ~6.4 ] -// cy => [ ~-0.6, ~-1.2, ~-1.8, ~-2.4, -3.0, ~-3.6, ~-4.2, ~-4.8 ] +csrot( x.length, x, 1, y, 1, 0.8, 0.6 ); +// x => [ ~0.8, ~1.6, ~2.4, ~3.2, 4.0, ~4.8, ~5.6, ~6.4 ] +// y => [ ~-0.6, ~-1.2, ~-1.8, ~-2.4, -3.0, ~-3.6, ~-4.2, ~-4.8 ] ``` The function has the following parameters: - **N**: number of indexed elements. -- **cx**: first input [`Complex64Array`][@stdlib/array/complex64]. -- **strideX**: index increment for `cx`. -- **cy**: second input [`Complex64Array`][@stdlib/array/complex64]. -- **strideY**: index increment for `cy`. +- **x**: first input [`Complex64Array`][@stdlib/array/complex64]. +- **strideX**: index increment for `x`. +- **y**: second input [`Complex64Array`][@stdlib/array/complex64]. +- **strideY**: index increment for `y`. -The `N` and stride parameters determine how values from `cx` and `cy` are accessed at runtime. For example, to apply a plane rotation to every other element, +The `N` and stride parameters determine how values from `x` and `y` are accessed at runtime. For example, to apply a plane rotation to every other element, ```javascript var Complex64Array = require( '@stdlib/array/complex64' ); -var cx = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); -var cy = new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ); +var x = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); +var y = new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ); -csrot( 2, cx, 2, cy, 2, 0.8, 0.6 ); -// cx => [ ~0.8, ~1.6, 3.0, 4.0, 4.0, ~4.8, 7.0, 8.0 ] -// cy => [ ~-0.6, ~-1.2, 0.0, 0.0, -3.0, ~-3.6, 0.0, 0.0 ] +csrot( 2, x, 2, y, 2, 0.8, 0.6 ); +// x => [ ~0.8, ~1.6, 3.0, 4.0, 4.0, ~4.8, 7.0, 8.0 ] +// y => [ ~-0.6, ~-1.2, 0.0, 0.0, -3.0, ~-3.6, 0.0, 0.0 ] ``` Note that indexing is relative to the first index. To introduce an offset, use [`typed array`][mdn-typed-array] views. @@ -74,49 +74,49 @@ Note that indexing is relative to the first index. To introduce an offset, use [ var Complex64Array = require( '@stdlib/array/complex64' ); // Initial arrays... -var cx0 = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); -var cy0 = new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ); +var x0 = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); +var y0 = new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ); // Create offset views... -var cx1 = new Complex64Array( cx0.buffer, cx0.BYTES_PER_ELEMENT*1 ); // start at 2nd element -var cy1 = new Complex64Array( cy0.buffer, cy0.BYTES_PER_ELEMENT*2 ); // start at 3rd element +var x1 = new Complex64Array( x0.buffer, x0.BYTES_PER_ELEMENT*1 ); // start at 2nd element +var y1 = new Complex64Array( y0.buffer, y0.BYTES_PER_ELEMENT*2 ); // start at 3rd element -csrot( 2, cx1, -2, cy1, 1, 0.8, 0.6 ); -// cx0 => [ 1.0, 2.0, ~2.4, ~3.2, 5.0, 6.0, ~5.6, ~6.4 ] -// cy0 => [ 0.0, 0.0, 0.0, 0.0, ~-4.2, ~-4.8, ~-1.8, ~-2.4 ] +csrot( 2, x1, -2, y1, 1, 0.8, 0.6 ); +// x0 => [ 1.0, 2.0, ~2.4, ~3.2, 5.0, 6.0, ~5.6, ~6.4 ] +// y0 => [ 0.0, 0.0, 0.0, 0.0, ~-4.2, ~-4.8, ~-1.8, ~-2.4 ] ``` -#### csrot.ndarray( N, cx, strideX, offsetX, cy, strideY, offsetY, c, s ) +#### csrot.ndarray( N, x, strideX, offsetX, y, strideY, offsetY, c, s ) Applies a plane rotation using alternative indexing semantics. ```javascript var Complex64Array = require( '@stdlib/array/complex64' ); -var cx = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); -var cy = new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ); +var x = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); +var y = new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ); -csrot.ndarray( cx.length, cx, 1, 0, cy, 1, 0, 0.8, 0.6 ); -// cx => [ ~0.8, ~1.6, ~2.4, ~3.2, 4.0, ~4.8 ] -// cy => [ ~-0.6, ~-1.2, ~-1.8, ~-2.4, -3.0, ~-3.6 ] +csrot.ndarray( x.length, x, 1, 0, y, 1, 0, 0.8, 0.6 ); +// x => [ ~0.8, ~1.6, ~2.4, ~3.2, 4.0, ~4.8 ] +// y => [ ~-0.6, ~-1.2, ~-1.8, ~-2.4, -3.0, ~-3.6 ] ``` The function has the following additional parameters: -- **offsetX**: starting index for `cx`. -- **offsetY**: starting index for `cy`. +- **offsetX**: starting index for `x`. +- **offsetY**: starting index for `y`. While [`typed array`][mdn-typed-array] views mandate a view offset based on the underlying buffer, the offset parameters support indexing semantics based on starting indices. For example, to apply a plane rotation to every other element starting from the second element, ```javascript var Complex64Array = require( '@stdlib/array/complex64' ); -var cx = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); -var cy = new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ); +var x = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); +var y = new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ); -csrot.ndarray( 2, cx, 2, 1, cy, 2, 1, 0.8, 0.6 ); -// cx => [ 1.0, 2.0, ~2.4, ~3.2, 5.0, 6.0, ~5.6, ~6.4 ] -// cy => [ 0.0, 0.0, ~-1.8, ~-2.4, 0.0, 0.0, ~-4.2, ~-4.8 ] +csrot.ndarray( 2, x, 2, 1, y, 2, 1, 0.8, 0.6 ); +// x => [ 1.0, 2.0, ~2.4, ~3.2, 5.0, 6.0, ~5.6, ~6.4 ] +// y => [ 0.0, 0.0, ~-1.8, ~-2.4, 0.0, 0.0, ~-4.2, ~-4.8 ] ``` @@ -127,7 +127,7 @@ csrot.ndarray( 2, cx, 2, 1, cy, 2, 1, 0.8, 0.6 ); ## Notes -- If `N <= 0`, both functions leave `cx` and `cy` unchanged. +- If `N <= 0`, both functions leave `x` and `y` unchanged. - `csrot()` corresponds to the [BLAS][blas] level 1 function [`csrot`][csrot]. @@ -154,17 +154,17 @@ function rand() { } // Generate random input arrays: -var cx = filledarrayBy( 10, 'complex64', rand ); -var cxc = ccopy( cx.length, cx, 1, zeros( cx.length, 'complex64' ), 1 ); +var x = filledarrayBy( 10, 'complex64', rand ); +var xc = ccopy( x.length, x, 1, zeros( x.length, 'complex64' ), 1 ); -var cy = filledarrayBy( 10, 'complex64', rand ); -var cyc = ccopy( cy.length, cy, 1, zeros( cy.length, 'complex64' ), 1 ); +var y = filledarrayBy( 10, 'complex64', rand ); +var yc = ccopy( y.length, y, 1, zeros( y.length, 'complex64' ), 1 ); // Apply a plane rotation: -csrot( cx.length, cx, 1, cy, 1, 0.8, 0.6 ); +csrot( x.length, x, 1, y, 1, 0.8, 0.6 ); // Print the results: -logEach( '(%s,%s) => (%s,%s)', cxc, cyc, cx, cy ); +logEach( '(%s,%s) => (%s,%s)', xc, yc, x, y ); ``` @@ -211,15 +211,15 @@ c_csrot( 2, (void *)x, 1, (void *)y, 1, 0.8f, 0.6f ); The function accepts the following arguments: - **N**: `[in] CBLAS_INT` number of indexed elements. -- **CX**: `[inout] void*` first input array. -- **strideX**: `[in] CBLAS_INT` index increment for `CX`. -- **CY**: `[inout] void*` second input array. -- **strideY**: `[in] CBLAS_INT` index increment for `CY`. +- **X**: `[inout] void*` first input array. +- **strideX**: `[in] CBLAS_INT` index increment for `X`. +- **Y**: `[inout] void*` second input array. +- **strideY**: `[in] CBLAS_INT` index increment for `Y`. - **c**: `[in] float` cosine of the angle of rotation. - **s**: `[in] float` sine of the angle of rotation. ```c -void c_csrot( const CBLAS_INT N, void *CX, const CBLAS_INT strideX, void *CY, const CBLAS_INT strideY, const float c, const float s ); +void c_csrot( const CBLAS_INT N, void *X, const CBLAS_INT strideX, void *Y, const CBLAS_INT strideY, const float c, const float s ); ``` #### c_csrot_ndarray( N, \*X, strideX, offsetX, \*Y, strideY, offsetY, c, s ) @@ -236,17 +236,17 @@ c_csrot_ndarray( 2, (void *)x, 1, 0, (void *)y, 1, 0, 0.8f, 0.6f ); The function accepts the following arguments: - **N**: `[in] CBLAS_INT` number of indexed elements. -- **CX**: `[inout] void*` first input array. -- **strideX**: `[in] CBLAS_INT` index increment for `CX`. -- **offsetX**: `[in] CBLAS_INT` starting index for `CX`. -- **CY**: `[inout] void*` second input array. -- **strideY**: `[in] CBLAS_INT` index increment for `CY`. -- **offsetY**: `[in] CBLAS_INT` starting index for `CY`. +- **X**: `[inout] void*` first input array. +- **strideX**: `[in] CBLAS_INT` index increment for `X`. +- **offsetX**: `[in] CBLAS_INT` starting index for `X`. +- **Y**: `[inout] void*` second input array. +- **strideY**: `[in] CBLAS_INT` index increment for `Y`. +- **offsetY**: `[in] CBLAS_INT` starting index for `Y`. - **c**: `[in] float` cosine of the angle of rotation. - **s**: `[in] float` sine of the angle of rotation. ```c -void c_csrot_ndarray( const CBLAS_INT N, void *CX, const CBLAS_INT strideX, const CBLAS_INT offsetX, void *CY, const CBLAS_INT strideY, const CBLAS_INT offsetY, const float c, const float s ); +void c_csrot_ndarray( const CBLAS_INT N, void *X, const CBLAS_INT strideX, const CBLAS_INT offsetX, void *Y, const CBLAS_INT strideY, const CBLAS_INT offsetY, const float c, const float s ); ``` diff --git a/lib/node_modules/@stdlib/blas/base/csrot/benchmark/benchmark.js b/lib/node_modules/@stdlib/blas/base/csrot/benchmark/benchmark.js index 9c58e4b31fb7..5ba13a2efe57 100644 --- a/lib/node_modules/@stdlib/blas/base/csrot/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/blas/base/csrot/benchmark/benchmark.js @@ -47,11 +47,11 @@ var options = { * @returns {Function} benchmark function */ function createBenchmark( len ) { - var cx; - var cy; + var x; + var y; - cx = new Complex64Array( uniform( len*2, -100.0, 100.0, options ) ); - cy = new Complex64Array( uniform( len*2, -100.0, 100.0, options ) ); + x = new Complex64Array( uniform( len*2, -100.0, 100.0, options ) ); + y = new Complex64Array( uniform( len*2, -100.0, 100.0, options ) ); return benchmark; @@ -65,10 +65,10 @@ function createBenchmark( len ) { var viewX; var i; - viewX = reinterpret( cx, 0 ); + viewX = reinterpret( x, 0 ); b.tic(); for ( i = 0; i < b.iterations; i++ ) { - csrot( cx.length, cx, 1, cy, 1, 0.8, 0.6 ); + csrot( x.length, x, 1, y, 1, 0.8, 0.6 ); if ( isnanf( viewX[ i%(len*2) ] ) ) { b.fail( 'should not return NaN' ); } diff --git a/lib/node_modules/@stdlib/blas/base/csrot/benchmark/benchmark.native.js b/lib/node_modules/@stdlib/blas/base/csrot/benchmark/benchmark.native.js index 1d332777e761..4716c87325e7 100644 --- a/lib/node_modules/@stdlib/blas/base/csrot/benchmark/benchmark.native.js +++ b/lib/node_modules/@stdlib/blas/base/csrot/benchmark/benchmark.native.js @@ -52,11 +52,11 @@ var options = { * @returns {Function} benchmark function */ function createBenchmark( len ) { - var cx; - var cy; + var x; + var y; - cx = new Complex64Array( uniform( len*2, -100.0, 100.0, options ) ); - cy = new Complex64Array( uniform( len*2, -100.0, 100.0, options ) ); + x = new Complex64Array( uniform( len*2, -100.0, 100.0, options ) ); + y = new Complex64Array( uniform( len*2, -100.0, 100.0, options ) ); return benchmark; @@ -70,10 +70,10 @@ function createBenchmark( len ) { var viewX; var i; - viewX = reinterpret( cx, 0 ); + viewX = reinterpret( x, 0 ); b.tic(); for ( i = 0; i < b.iterations; i++ ) { - csrot( cx.length, cx, 1, cy, 1, 0.8, 0.6 ); + csrot( x.length, x, 1, y, 1, 0.8, 0.6 ); if ( isnanf( viewX[ i%(len*2) ] ) ) { b.fail( 'should not return NaN' ); } diff --git a/lib/node_modules/@stdlib/blas/base/csrot/benchmark/benchmark.ndarray.js b/lib/node_modules/@stdlib/blas/base/csrot/benchmark/benchmark.ndarray.js index f5a2add8b887..617ce0e69564 100644 --- a/lib/node_modules/@stdlib/blas/base/csrot/benchmark/benchmark.ndarray.js +++ b/lib/node_modules/@stdlib/blas/base/csrot/benchmark/benchmark.ndarray.js @@ -47,11 +47,11 @@ var options = { * @returns {Function} benchmark function */ function createBenchmark( len ) { - var cx; - var cy; + var x; + var y; - cx = new Complex64Array( uniform( len*2, -100.0, 100.0, options ) ); - cy = new Complex64Array( uniform( len*2, -100.0, 100.0, options ) ); + x = new Complex64Array( uniform( len*2, -100.0, 100.0, options ) ); + y = new Complex64Array( uniform( len*2, -100.0, 100.0, options ) ); return benchmark; @@ -65,10 +65,10 @@ function createBenchmark( len ) { var viewX; var i; - viewX = reinterpret( cx, 0 ); + viewX = reinterpret( x, 0 ); b.tic(); for ( i = 0; i < b.iterations; i++ ) { - csrot( cx.length, cx, 1, 0, cy, 1, 0, 0.8, 0.6 ); + csrot( x.length, x, 1, 0, y, 1, 0, 0.8, 0.6 ); if ( isnanf( viewX[ i%(len*2) ] ) ) { b.fail( 'should not return NaN' ); } diff --git a/lib/node_modules/@stdlib/blas/base/csrot/benchmark/benchmark.ndarray.native.js b/lib/node_modules/@stdlib/blas/base/csrot/benchmark/benchmark.ndarray.native.js index 229b0f5402fa..02e4db88f5ff 100644 --- a/lib/node_modules/@stdlib/blas/base/csrot/benchmark/benchmark.ndarray.native.js +++ b/lib/node_modules/@stdlib/blas/base/csrot/benchmark/benchmark.ndarray.native.js @@ -52,11 +52,11 @@ var options = { * @returns {Function} benchmark function */ function createBenchmark( len ) { - var cx; - var cy; + var x; + var y; - cx = new Complex64Array( uniform( len*2, -100.0, 100.0, options ) ); - cy = new Complex64Array( uniform( len*2, -100.0, 100.0, options ) ); + x = new Complex64Array( uniform( len*2, -100.0, 100.0, options ) ); + y = new Complex64Array( uniform( len*2, -100.0, 100.0, options ) ); return benchmark; @@ -70,10 +70,10 @@ function createBenchmark( len ) { var viewX; var i; - viewX = reinterpret( cx, 0 ); + viewX = reinterpret( x, 0 ); b.tic(); for ( i = 0; i < b.iterations; i++ ) { - csrot( cx.length, cx, 1, 0, cy, 1, 0, 0.8, 0.6 ); + csrot( x.length, x, 1, 0, y, 1, 0, 0.8, 0.6 ); if ( isnanf( viewX[ i%(len*2) ] ) ) { b.fail( 'should not return NaN' ); } diff --git a/lib/node_modules/@stdlib/blas/base/csrot/docs/repl.txt b/lib/node_modules/@stdlib/blas/base/csrot/docs/repl.txt index 9f5badf3b294..fd532c718af0 100644 --- a/lib/node_modules/@stdlib/blas/base/csrot/docs/repl.txt +++ b/lib/node_modules/@stdlib/blas/base/csrot/docs/repl.txt @@ -1,5 +1,5 @@ -{{alias}}( N, cx, strideX, cy, strideY, c, s ) +{{alias}}( N, x, strideX, y, strideY, c, s ) Applies a plane rotation. The `N` and stride parameters determine how values in the strided arrays are @@ -15,17 +15,17 @@ N: integer Number of indexed elements. - cx: Complex64Array + x: Complex64Array First input array. strideX: integer - Index increment for `cx`. + Index increment for `x`. - cy: Complex64Array + y: Complex64Array Second input array. strideY: integer - Index increment for `cy`. + Index increment for `y`. c: number Cosine of the angle of rotation. @@ -35,42 +35,42 @@ Returns ------- - cy: Complex64Array - Input array `cy`. + y: Complex64Array + Input array `y`. Examples -------- // Standard usage: - > var cx = new {{alias:@stdlib/array/complex64}}( [ 1.0, 2.0, 3.0, 4.0 ] ); - > var cy = new {{alias:@stdlib/array/complex64}}( [ 0.0, 0.0, 0.0, 0.0 ] ); - > {{alias}}( cx.length, cx, 1, cy, 1, 0.8, 0.6 ); - > cx + > var x = new {{alias:@stdlib/array/complex64}}( [ 1.0, 2.0, 3.0, 4.0 ] ); + > var y = new {{alias:@stdlib/array/complex64}}( [ 0.0, 0.0, 0.0, 0.0 ] ); + > {{alias}}( x.length, x, 1, y, 1, 0.8, 0.6 ); + > x [ ~0.8, ~1.6, ~2.4, ~3.2 ] - > cy + > y [ ~-0.6, ~-1.2, ~-1.8, ~-2.4 ] // Advanced indexing: - > cx = new {{alias:@stdlib/array/complex64}}( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); - > cy = new {{alias:@stdlib/array/complex64}}( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - > {{alias}}( 2, cx, -2, cy, 1, 0.8, 0.6 ); - > cx + > x = new {{alias:@stdlib/array/complex64}}( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); + > y = new {{alias:@stdlib/array/complex64}}( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ); + > {{alias}}( 2, x, -2, y, 1, 0.8, 0.6 ); + > x [ ~0.8, ~1.6, 3.0, 4.0, 4.0, ~4.8, 7.0, 8.0 ] - > cy + > y [ -3.0, ~-3.6, ~-0.6, ~-1.2, 0.0, 0.0, 0.0, 0.0 ] // Using typed array views: - > var cx0 = new {{alias:@stdlib/array/complex64}}( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); - > var cy0 = new {{alias:@stdlib/array/complex64}}( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - > var cx1 = new {{alias:@stdlib/array/complex64}}( cx0.buffer, cx0.BYTES_PER_ELEMENT*1 ); - > var cy1 = new {{alias:@stdlib/array/complex64}}( cy0.buffer, cy0.BYTES_PER_ELEMENT*2 ); - > {{alias}}( 1, cx1, 1, cy1, 1, 0.8, 0.6 ); - > cx0 + > var x0 = new {{alias:@stdlib/array/complex64}}( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); + > var y0 = new {{alias:@stdlib/array/complex64}}( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ); + > var x1 = new {{alias:@stdlib/array/complex64}}( x0.buffer, x0.BYTES_PER_ELEMENT*1 ); + > var y1 = new {{alias:@stdlib/array/complex64}}( y0.buffer, y0.BYTES_PER_ELEMENT*2 ); + > {{alias}}( 1, x1, 1, y1, 1, 0.8, 0.6 ); + > x0 [ 1.0, 2.0, ~2.4, ~3.2, 5.0, 6.0 ] - > cy0 + > y0 [ 0.0, 0.0, 0.0, 0.0, ~-1.8, ~-2.4 ] -{{alias}}.ndarray( N, cx, strideX, offsetX, cy, strideY, offsetY, c, s ) +{{alias}}.ndarray( N, x, strideX, offsetX, y, strideY, offsetY, c, s ) Applies a plane rotation using alternative indexing semantics. While typed array views mandate a view offset based on the underlying @@ -82,23 +82,23 @@ N: integer Number of indexed elements. - cx: Complex64Array + x: Complex64Array First input array. strideX: integer - Index increment for `cx`. + Index increment for `x`. offsetX: integer - Starting index for `cx`. + Starting index for `x`. - cy: Complex64Array + y: Complex64Array Second input array. strideY: integer - Index increment for `cy`. + Index increment for `y`. offsetY: integer - Starting index for `cy`. + Starting index for `y`. c: number Cosine of the angle of rotation. @@ -108,27 +108,27 @@ Returns ------- - cy: Complex64Array - Input array `cy`. + y: Complex64Array + Input array `y`. Examples -------- // Standard usage: - > var cx = new {{alias:@stdlib/array/complex64}}( [ 1.0, 2.0, 3.0, 4.0 ] ); - > var cy = new {{alias:@stdlib/array/complex64}}( [ 0.0, 0.0, 0.0, 0.0 ] ); - > {{alias}}.ndarray( cx.length, cx, 1, 0, cy, 1, 0, 0.8, 0.6 ); - > cx + > var x = new {{alias:@stdlib/array/complex64}}( [ 1.0, 2.0, 3.0, 4.0 ] ); + > var y = new {{alias:@stdlib/array/complex64}}( [ 0.0, 0.0, 0.0, 0.0 ] ); + > {{alias}}.ndarray( x.length, x, 1, 0, y, 1, 0, 0.8, 0.6 ); + > x [ ~0.8, ~1.6, ~2.4, ~3.2 ] - > cy + > y [ ~-0.6, ~-1.2, ~-1.8, ~-2.4 ] // Advanced indexing: - > cx = new {{alias:@stdlib/array/complex64}}( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); - > cy = new {{alias:@stdlib/array/complex64}}( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - > {{alias}}.ndarray( 1, cx, 2, 1, cy, 2, 1, 0.8, 0.6 ); - > cx + > x = new {{alias:@stdlib/array/complex64}}( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); + > y = new {{alias:@stdlib/array/complex64}}( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ); + > {{alias}}.ndarray( 1, x, 2, 1, y, 2, 1, 0.8, 0.6 ); + > x [ 1.0, 2.0, ~2.4, ~3.2, 5.0, 6.0 ] - > cy + > y [ 0.0, 0.0, ~-1.8, ~-2.4, 0.0, 0.0 ] See Also diff --git a/lib/node_modules/@stdlib/blas/base/csrot/docs/types/index.d.ts b/lib/node_modules/@stdlib/blas/base/csrot/docs/types/index.d.ts index 4c5a61e56d68..350eefdf4181 100644 --- a/lib/node_modules/@stdlib/blas/base/csrot/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/blas/base/csrot/docs/types/index.d.ts @@ -30,84 +30,84 @@ interface Routine { * Applies a plane rotation. * * @param N - number of indexed elements - * @param cx - first input array - * @param strideX - `cx` stride length - * @param cy - second input array - * @param strideY - `cy` stride length + * @param x - first input array + * @param strideX - `x` stride length + * @param y - second input array + * @param strideY - `y` stride length * @param c - cosine of the angle of rotation * @param s - sine of the angle of rotation - * @returns `cy` + * @returns `y` * * @example * var Complex64Array = require( '@stdlib/array/complex64' ); * - * var cx = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); - * var cy = new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ); + * var x = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); + * var y = new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ); * - * csrot( cx.length, cx, 1, cy, 1, 0.8, 0.6 ); - * // cx => [ ~0.8, ~1.6, ~2.4, ~3.2, 4.0, ~4.8, ~5.6, ~6.4 ] - * // cy => [ ~-0.6, ~-1.2, ~-1.8, ~-2.4, -3.0, ~-3.6, ~-4.2, ~-4.8 ] + * csrot( x.length, x, 1, y, 1, 0.8, 0.6 ); + * // x => [ ~0.8, ~1.6, ~2.4, ~3.2, 4.0, ~4.8, ~5.6, ~6.4 ] + * // y => [ ~-0.6, ~-1.2, ~-1.8, ~-2.4, -3.0, ~-3.6, ~-4.2, ~-4.8 ] */ - ( N: number, cx: Complex64Array, strideX: number, cy: Complex64Array, strideY: number, c: number, s: number ): Complex64Array; + ( N: number, x: Complex64Array, strideX: number, y: Complex64Array, strideY: number, c: number, s: number ): Complex64Array; /** * Applies a plane rotation using alternative indexing semantics. * * @param N - number of indexed elements - * @param cx - first input array - * @param strideX - `cx` stride length - * @param offsetX - starting index for `cx` - * @param cy - second input array - * @param strideY - `cy` stride length - * @param offsetY - starting index for `cy` + * @param x - first input array + * @param strideX - `x` stride length + * @param offsetX - starting index for `x` + * @param y - second input array + * @param strideY - `y` stride length + * @param offsetY - starting index for `y` * @param c - cosine of the angle of rotation * @param s - sine of the angle of rotation - * @returns `cy` + * @returns `y` * * @example * var Complex64Array = require( '@stdlib/array/complex64' ); * - * var cx = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); - * var cy = new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ); + * var x = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); + * var y = new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ); * - * csrot.ndarray( cx.length, cx, 1, 0, cy, 1, 0, 0.8, 0.6 ); - * // cx => [ ~0.8, ~1.6, ~2.4, ~3.2, 4.0, ~4.8, ~5.6, ~6.4 ] - * // cy => [ ~-0.6, ~-1.2, ~-1.8, ~-2.4, -3.0, ~-3.6, ~-4.2, ~-4.8 ] + * csrot.ndarray( x.length, x, 1, 0, y, 1, 0, 0.8, 0.6 ); + * // x => [ ~0.8, ~1.6, ~2.4, ~3.2, 4.0, ~4.8, ~5.6, ~6.4 ] + * // y => [ ~-0.6, ~-1.2, ~-1.8, ~-2.4, -3.0, ~-3.6, ~-4.2, ~-4.8 ] */ - ndarray( N: number, cx: Complex64Array, strideX: number, offsetX: number, cy: Complex64Array, strideY: number, offsetY: number, c: number, s: number ): Complex64Array; + ndarray( N: number, x: Complex64Array, strideX: number, offsetX: number, y: Complex64Array, strideY: number, offsetY: number, c: number, s: number ): Complex64Array; } /** * Applies a plane rotation. * * @param N - number of indexed elements -* @param cx - first input array -* @param strideX - `cx` stride length -* @param cy - second input array -* @param strideY - `cy` stride length +* @param x - first input array +* @param strideX - `x` stride length +* @param y - second input array +* @param strideY - `y` stride length * @param c - cosine of the angle of rotation * @param s - sine of the angle of rotation -* @returns `cy` +* @returns `y` * * @example * var Complex64Array = require( '@stdlib/array/complex64' ); * -* var cx = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); -* var cy = new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ); +* var x = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); +* var y = new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ); * -* csrot( 2, cx, 2, cy, 1, 0.8, 0.6 ); -* // cx => [ ~0.8, ~1.6, 3.0, 4.0, 4.0, ~4.8, 7.0, 8.0 ] -* // cy => [ ~-0.6, ~-1.2, -3.0, ~-3.6, 0.0, 0.0, 0.0, 0.0 ] +* csrot( 2, x, 2, y, 1, 0.8, 0.6 ); +* // x => [ ~0.8, ~1.6, 3.0, 4.0, 4.0, ~4.8, 7.0, 8.0 ] +* // y => [ ~-0.6, ~-1.2, -3.0, ~-3.6, 0.0, 0.0, 0.0, 0.0 ] * * @example * var Complex64Array = require( '@stdlib/array/complex64' ); * -* var cx = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); -* var cy = new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ); +* var x = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); +* var y = new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ); * -* csrot.ndarray( 2, cx, 2, 0, cy, 1, 0, 0.8, 0.6 ); -* // cx => [ ~0.8, ~1.6, 3.0, 4.0, 4.0, ~4.8, 7.0, 8.0 ] -* // cy => [ ~-0.6, ~-1.2, -3.0, ~-3.6, 0.0, 0.0, 0.0, 0.0 ] +* csrot.ndarray( 2, x, 2, 0, y, 1, 0, 0.8, 0.6 ); +* // x => [ ~0.8, ~1.6, 3.0, 4.0, 4.0, ~4.8, 7.0, 8.0 ] +* // y => [ ~-0.6, ~-1.2, -3.0, ~-3.6, 0.0, 0.0, 0.0, 0.0 ] */ declare var csrot: Routine; diff --git a/lib/node_modules/@stdlib/blas/base/csrot/docs/types/test.ts b/lib/node_modules/@stdlib/blas/base/csrot/docs/types/test.ts index 3fc3b0541692..9362cb44c8f8 100644 --- a/lib/node_modules/@stdlib/blas/base/csrot/docs/types/test.ts +++ b/lib/node_modules/@stdlib/blas/base/csrot/docs/types/test.ts @@ -24,289 +24,289 @@ import csrot = require( './index' ); // The function returns a Complex64Array... { - const cx = new Complex64Array( 10 ); - const cy = new Complex64Array( 10 ); + const x = new Complex64Array( 10 ); + const y = new Complex64Array( 10 ); - csrot( cx.length, cx, 1, cy, 1, 0.8, 0.6 ); // $ExpectType Complex64Array + csrot( x.length, x, 1, y, 1, 0.8, 0.6 ); // $ExpectType Complex64Array } // The compiler throws an error if the function is provided a first argument which is not a number... { - const cx = new Complex64Array( 10 ); - const cy = new Complex64Array( 10 ); - - csrot( '10', cx, 1, cy, 1, 0.8, 0.6 ); // $ExpectError - csrot( true, cx, 1, cy, 1, 0.8, 0.6 ); // $ExpectError - csrot( false, cx, 1, cy, 1, 0.8, 0.6 ); // $ExpectError - csrot( null, cx, 1, cy, 1, 0.8, 0.6 ); // $ExpectError - csrot( undefined, cx, 1, cy, 1, 0.8, 0.6 ); // $ExpectError - csrot( [], cx, 1, cy, 1, 0.8, 0.6 ); // $ExpectError - csrot( {}, cx, 1, cy, 1, 0.8, 0.6 ); // $ExpectError - csrot( ( cx: number ): number => cx, cx, 1, cy, 1, 0.8, 0.6 ); // $ExpectError + const x = new Complex64Array( 10 ); + const y = new Complex64Array( 10 ); + + csrot( '10', x, 1, y, 1, 0.8, 0.6 ); // $ExpectError + csrot( true, x, 1, y, 1, 0.8, 0.6 ); // $ExpectError + csrot( false, x, 1, y, 1, 0.8, 0.6 ); // $ExpectError + csrot( null, x, 1, y, 1, 0.8, 0.6 ); // $ExpectError + csrot( undefined, x, 1, y, 1, 0.8, 0.6 ); // $ExpectError + csrot( [], x, 1, y, 1, 0.8, 0.6 ); // $ExpectError + csrot( {}, x, 1, y, 1, 0.8, 0.6 ); // $ExpectError + csrot( ( x: number ): number => x, x, 1, y, 1, 0.8, 0.6 ); // $ExpectError } // The compiler throws an error if the function is provided a second argument which is not a Complex64Array... { - const cx = new Complex64Array( 10 ); - const cy = new Complex64Array( 10 ); - - csrot( cx.length, 10, 1, cy, 1, 0.8, 0.6 ); // $ExpectError - csrot( cx.length, '10', 1, cy, 1, 0.8, 0.6 ); // $ExpectError - csrot( cx.length, true, 1, cy, 1, 0.8, 0.6 ); // $ExpectError - csrot( cx.length, false, 1, cy, 1, 0.8, 0.6 ); // $ExpectError - csrot( cx.length, null, 1, cy, 1, 0.8, 0.6 ); // $ExpectError - csrot( cx.length, undefined, 1, cy, 1, 0.8, 0.6 ); // $ExpectError - csrot( cx.length, [ '1' ], 1, cy, 1, 0.8, 0.6 ); // $ExpectError - csrot( cx.length, {}, 1, cy, 1, 0.8, 0.6 ); // $ExpectError - csrot( cx.length, ( cx: number ): number => cx, 1, cy, 1, 0.8, 0.6 ); // $ExpectError + const x = new Complex64Array( 10 ); + const y = new Complex64Array( 10 ); + + csrot( x.length, 10, 1, y, 1, 0.8, 0.6 ); // $ExpectError + csrot( x.length, '10', 1, y, 1, 0.8, 0.6 ); // $ExpectError + csrot( x.length, true, 1, y, 1, 0.8, 0.6 ); // $ExpectError + csrot( x.length, false, 1, y, 1, 0.8, 0.6 ); // $ExpectError + csrot( x.length, null, 1, y, 1, 0.8, 0.6 ); // $ExpectError + csrot( x.length, undefined, 1, y, 1, 0.8, 0.6 ); // $ExpectError + csrot( x.length, [ '1' ], 1, y, 1, 0.8, 0.6 ); // $ExpectError + csrot( x.length, {}, 1, y, 1, 0.8, 0.6 ); // $ExpectError + csrot( x.length, ( x: number ): number => x, 1, y, 1, 0.8, 0.6 ); // $ExpectError } // The compiler throws an error if the function is provided a third argument which is not a number... { - const cx = new Complex64Array( 10 ); - const cy = new Complex64Array( 10 ); - - csrot( cx.length, cx, '10', cy, 1, 0.8, 0.6 ); // $ExpectError - csrot( cx.length, cx, true, cy, 1, 0.8, 0.6 ); // $ExpectError - csrot( cx.length, cx, false, cy, 1, 0.8, 0.6 ); // $ExpectError - csrot( cx.length, cx, null, cy, 1, 0.8, 0.6 ); // $ExpectError - csrot( cx.length, cx, undefined, cy, 1, 0.8, 0.6 ); // $ExpectError - csrot( cx.length, cx, [], cy, 1, 0.8, 0.6 ); // $ExpectError - csrot( cx.length, cx, {}, cy, 1, 0.8, 0.6 ); // $ExpectError - csrot( cx.length, cx, ( cx: number ): number => cx, cy, 1, 0.8, 0.6 ); // $ExpectError + const x = new Complex64Array( 10 ); + const y = new Complex64Array( 10 ); + + csrot( x.length, x, '10', y, 1, 0.8, 0.6 ); // $ExpectError + csrot( x.length, x, true, y, 1, 0.8, 0.6 ); // $ExpectError + csrot( x.length, x, false, y, 1, 0.8, 0.6 ); // $ExpectError + csrot( x.length, x, null, y, 1, 0.8, 0.6 ); // $ExpectError + csrot( x.length, x, undefined, y, 1, 0.8, 0.6 ); // $ExpectError + csrot( x.length, x, [], y, 1, 0.8, 0.6 ); // $ExpectError + csrot( x.length, x, {}, y, 1, 0.8, 0.6 ); // $ExpectError + csrot( x.length, x, ( x: number ): number => x, y, 1, 0.8, 0.6 ); // $ExpectError } // The compiler throws an error if the function is provided a fourth argument which is not a Complex64Array... { - const cx = new Complex64Array( 10 ); - - csrot( cx.length, cx, 1, 10, 1, 0.8, 0.6 ); // $ExpectError - csrot( cx.length, cx, 1, '10', 1, 0.8, 0.6 ); // $ExpectError - csrot( cx.length, cx, 1, true, 1, 0.8, 0.6 ); // $ExpectError - csrot( cx.length, cx, 1, false, 1, 0.8, 0.6 ); // $ExpectError - csrot( cx.length, cx, 1, null, 1, 0.8, 0.6 ); // $ExpectError - csrot( cx.length, cx, 1, undefined, 1, 0.8, 0.6 ); // $ExpectError - csrot( cx.length, cx, 1, [ '1' ], 1, 0.8, 0.6 ); // $ExpectError - csrot( cx.length, cx, 1, {}, 1, 0.8, 0.6 ); // $ExpectError - csrot( cx.length, cx, 1, ( cx: number ): number => cx, 1, 0.8, 0.6 ); // $ExpectError + const x = new Complex64Array( 10 ); + + csrot( x.length, x, 1, 10, 1, 0.8, 0.6 ); // $ExpectError + csrot( x.length, x, 1, '10', 1, 0.8, 0.6 ); // $ExpectError + csrot( x.length, x, 1, true, 1, 0.8, 0.6 ); // $ExpectError + csrot( x.length, x, 1, false, 1, 0.8, 0.6 ); // $ExpectError + csrot( x.length, x, 1, null, 1, 0.8, 0.6 ); // $ExpectError + csrot( x.length, x, 1, undefined, 1, 0.8, 0.6 ); // $ExpectError + csrot( x.length, x, 1, [ '1' ], 1, 0.8, 0.6 ); // $ExpectError + csrot( x.length, x, 1, {}, 1, 0.8, 0.6 ); // $ExpectError + csrot( x.length, x, 1, ( x: number ): number => x, 1, 0.8, 0.6 ); // $ExpectError } // The compiler throws an error if the function is provided a fifth argument which is not a number... { - const cx = new Complex64Array( 10 ); - const cy = new Complex64Array( 10 ); - - csrot( cx.length, cx, 1, cy, '10', 0.8, 0.6 ); // $ExpectError - csrot( cx.length, cx, 1, cy, true, 0.8, 0.6 ); // $ExpectError - csrot( cx.length, cx, 1, cy, false, 0.8, 0.6 ); // $ExpectError - csrot( cx.length, cx, 1, cy, null, 0.8, 0.6 ); // $ExpectError - csrot( cx.length, cx, 1, cy, undefined, 0.8, 0.6 ); // $ExpectError - csrot( cx.length, cx, 1, cy, [], 0.8, 0.6 ); // $ExpectError - csrot( cx.length, cx, 1, cy, {}, 0.8, 0.6 ); // $ExpectError - csrot( cx.length, cx, 1, cy, ( cx: number ): number => cx, 0.8, 0.6 ); // $ExpectError + const x = new Complex64Array( 10 ); + const y = new Complex64Array( 10 ); + + csrot( x.length, x, 1, y, '10', 0.8, 0.6 ); // $ExpectError + csrot( x.length, x, 1, y, true, 0.8, 0.6 ); // $ExpectError + csrot( x.length, x, 1, y, false, 0.8, 0.6 ); // $ExpectError + csrot( x.length, x, 1, y, null, 0.8, 0.6 ); // $ExpectError + csrot( x.length, x, 1, y, undefined, 0.8, 0.6 ); // $ExpectError + csrot( x.length, x, 1, y, [], 0.8, 0.6 ); // $ExpectError + csrot( x.length, x, 1, y, {}, 0.8, 0.6 ); // $ExpectError + csrot( x.length, x, 1, y, ( x: number ): number => x, 0.8, 0.6 ); // $ExpectError } // The compiler throws an error if the function is provided a sixth argument which is not a number... { - const cx = new Complex64Array( 10 ); - const cy = new Complex64Array( 10 ); - - csrot( cx.length, cx, 1, cy, 1, '10', 0.8 ); // $ExpectError - csrot( cx.length, cx, 1, cy, 1, true, 0.8 ); // $ExpectError - csrot( cx.length, cx, 1, cy, 1, false, 0.8 ); // $ExpectError - csrot( cx.length, cx, 1, cy, 1, null, 0.8 ); // $ExpectError - csrot( cx.length, cx, 1, cy, 1, undefined, 0.8 ); // $ExpectError - csrot( cx.length, cx, 1, cy, 1, [], 0.8 ); // $ExpectError - csrot( cx.length, cx, 1, cy, 1, {}, 0.8 ); // $ExpectError - csrot( cx.length, cx, 1, cy, 1, ( cx: number ): number => cx, 0.8 ); // $ExpectError + const x = new Complex64Array( 10 ); + const y = new Complex64Array( 10 ); + + csrot( x.length, x, 1, y, 1, '10', 0.8 ); // $ExpectError + csrot( x.length, x, 1, y, 1, true, 0.8 ); // $ExpectError + csrot( x.length, x, 1, y, 1, false, 0.8 ); // $ExpectError + csrot( x.length, x, 1, y, 1, null, 0.8 ); // $ExpectError + csrot( x.length, x, 1, y, 1, undefined, 0.8 ); // $ExpectError + csrot( x.length, x, 1, y, 1, [], 0.8 ); // $ExpectError + csrot( x.length, x, 1, y, 1, {}, 0.8 ); // $ExpectError + csrot( x.length, x, 1, y, 1, ( x: number ): number => x, 0.8 ); // $ExpectError } // The compiler throws an error if the function is provided a seventh argument which is not a number... { - const cx = new Complex64Array( 10 ); - const cy = new Complex64Array( 10 ); - - csrot( cx.length, cx, 1, cy, 1, 0.8, '10' ); // $ExpectError - csrot( cx.length, cx, 1, cy, 1, 0.8, true ); // $ExpectError - csrot( cx.length, cx, 1, cy, 1, 0.8, false ); // $ExpectError - csrot( cx.length, cx, 1, cy, 1, 0.8, null ); // $ExpectError - csrot( cx.length, cx, 1, cy, 1, 0.8, undefined ); // $ExpectError - csrot( cx.length, cx, 1, cy, 1, 0.8, [] ); // $ExpectError - csrot( cx.length, cx, 1, cy, 1, 0.8, {} ); // $ExpectError - csrot( cx.length, cx, 1, cy, 1, 0.8, ( cx: number ): number => cx ); // $ExpectError + const x = new Complex64Array( 10 ); + const y = new Complex64Array( 10 ); + + csrot( x.length, x, 1, y, 1, 0.8, '10' ); // $ExpectError + csrot( x.length, x, 1, y, 1, 0.8, true ); // $ExpectError + csrot( x.length, x, 1, y, 1, 0.8, false ); // $ExpectError + csrot( x.length, x, 1, y, 1, 0.8, null ); // $ExpectError + csrot( x.length, x, 1, y, 1, 0.8, undefined ); // $ExpectError + csrot( x.length, x, 1, y, 1, 0.8, [] ); // $ExpectError + csrot( x.length, x, 1, y, 1, 0.8, {} ); // $ExpectError + csrot( x.length, x, 1, y, 1, 0.8, ( x: number ): number => x ); // $ExpectError } // The compiler throws an error if the function is provided an unsupported number of arguments... { - const cx = new Complex64Array( 10 ); - const cy = new Complex64Array( 10 ); + const x = new Complex64Array( 10 ); + const y = new Complex64Array( 10 ); csrot(); // $ExpectError - csrot( cx.length ); // $ExpectError - csrot( cx.length, cx ); // $ExpectError - csrot( cx.length, cx, 1 ); // $ExpectError - csrot( cx.length, cx, 1, cy ); // $ExpectError - csrot( cx.length, cx, 1, cy, 1, 0.8 ); // $ExpectError - csrot( cx.length, cx, 1, cy, 1, 0.8, 0.6, 10 ); // $ExpectError + csrot( x.length ); // $ExpectError + csrot( x.length, x ); // $ExpectError + csrot( x.length, x, 1 ); // $ExpectError + csrot( x.length, x, 1, y ); // $ExpectError + csrot( x.length, x, 1, y, 1, 0.8 ); // $ExpectError + csrot( x.length, x, 1, y, 1, 0.8, 0.6, 10 ); // $ExpectError } // Attached to main export is an `ndarray` method which returns a Complex64Array... { - const cx = new Complex64Array( 10 ); - const cy = new Complex64Array( 10 ); + const x = new Complex64Array( 10 ); + const y = new Complex64Array( 10 ); - csrot.ndarray( cx.length, cx, 1, 0, cy, 1, 0, 0.8, 0.6 ); // $ExpectType Complex64Array + csrot.ndarray( x.length, x, 1, 0, y, 1, 0, 0.8, 0.6 ); // $ExpectType Complex64Array } // The compiler throws an error if the `ndarray` method is provided a first argument which is not a number... { - const cx = new Complex64Array( 10 ); - const cy = new Complex64Array( 10 ); - - csrot.ndarray( '10', cx, 1, 0, cy, 1, 0, 0.8, 0.6 ); // $ExpectError - csrot.ndarray( true, cx, 1, 0, cy, 1, 0, 0.8, 0.6 ); // $ExpectError - csrot.ndarray( false, cx, 1, 0, cy, 1, 0, 0.8, 0.6 ); // $ExpectError - csrot.ndarray( null, cx, 1, 0, cy, 1, 0, 0.8, 0.6 ); // $ExpectError - csrot.ndarray( undefined, cx, 1, 0, cy, 1, 0, 0.8, 0.6 ); // $ExpectError - csrot.ndarray( [], cx, 1, 0, cy, 1, 0, 0.8, 0.6 ); // $ExpectError - csrot.ndarray( {}, cx, 1, 0, cy, 1, 0, 0.8, 0.6 ); // $ExpectError - csrot.ndarray( ( cx: number ): number => cx, cx, 1, 0, cy, 1, 0, 0.8, 0.6 ); // $ExpectError + const x = new Complex64Array( 10 ); + const y = new Complex64Array( 10 ); + + csrot.ndarray( '10', x, 1, 0, y, 1, 0, 0.8, 0.6 ); // $ExpectError + csrot.ndarray( true, x, 1, 0, y, 1, 0, 0.8, 0.6 ); // $ExpectError + csrot.ndarray( false, x, 1, 0, y, 1, 0, 0.8, 0.6 ); // $ExpectError + csrot.ndarray( null, x, 1, 0, y, 1, 0, 0.8, 0.6 ); // $ExpectError + csrot.ndarray( undefined, x, 1, 0, y, 1, 0, 0.8, 0.6 ); // $ExpectError + csrot.ndarray( [], x, 1, 0, y, 1, 0, 0.8, 0.6 ); // $ExpectError + csrot.ndarray( {}, x, 1, 0, y, 1, 0, 0.8, 0.6 ); // $ExpectError + csrot.ndarray( ( x: number ): number => x, x, 1, 0, y, 1, 0, 0.8, 0.6 ); // $ExpectError } // The compiler throws an error if the `ndarray` method is provided a second argument which is not a Complex64Array... { - const cx = new Complex64Array( 10 ); - const cy = new Complex64Array( 10 ); - - csrot.ndarray( cx.length, 10, 1, 0, cy, 1, 0, 0.8, 0.6 ); // $ExpectError - csrot.ndarray( cx.length, '10', 1, 0, cy, 1, 0, 0.8, 0.6 ); // $ExpectError - csrot.ndarray( cx.length, true, 1, 0, cy, 1, 0, 0.8, 0.6 ); // $ExpectError - csrot.ndarray( cx.length, false, 1, 0, cy, 1, 0, 0.8, 0.6 ); // $ExpectError - csrot.ndarray( cx.length, null, 1, 0, cy, 1, 0, 0.8, 0.6 ); // $ExpectError - csrot.ndarray( cx.length, undefined, 1, 0, cy, 1, 0, 0.8, 0.6 ); // $ExpectError - csrot.ndarray( cx.length, [ '1' ], 1, 0, cy, 1, 0, 0.8, 0.6 ); // $ExpectError - csrot.ndarray( cx.length, {}, 1, 0, cy, 1, 0, 0.8, 0.6 ); // $ExpectError - csrot.ndarray( cx.length, ( cx: number ): number => cx, 1, 0, cy, 1, 0, 0.8, 0.6 ); // $ExpectError + const x = new Complex64Array( 10 ); + const y = new Complex64Array( 10 ); + + csrot.ndarray( x.length, 10, 1, 0, y, 1, 0, 0.8, 0.6 ); // $ExpectError + csrot.ndarray( x.length, '10', 1, 0, y, 1, 0, 0.8, 0.6 ); // $ExpectError + csrot.ndarray( x.length, true, 1, 0, y, 1, 0, 0.8, 0.6 ); // $ExpectError + csrot.ndarray( x.length, false, 1, 0, y, 1, 0, 0.8, 0.6 ); // $ExpectError + csrot.ndarray( x.length, null, 1, 0, y, 1, 0, 0.8, 0.6 ); // $ExpectError + csrot.ndarray( x.length, undefined, 1, 0, y, 1, 0, 0.8, 0.6 ); // $ExpectError + csrot.ndarray( x.length, [ '1' ], 1, 0, y, 1, 0, 0.8, 0.6 ); // $ExpectError + csrot.ndarray( x.length, {}, 1, 0, y, 1, 0, 0.8, 0.6 ); // $ExpectError + csrot.ndarray( x.length, ( x: number ): number => x, 1, 0, y, 1, 0, 0.8, 0.6 ); // $ExpectError } // The compiler throws an error if the `ndarray` method is provided a third argument which is not a number... { - const cx = new Complex64Array( 10 ); - const cy = new Complex64Array( 10 ); - - csrot.ndarray( cx.length, cx, '10', 0, cy, 1, 0, 0.8, 0.6 ); // $ExpectError - csrot.ndarray( cx.length, cx, true, 0, cy, 1, 0, 0.8, 0.6 ); // $ExpectError - csrot.ndarray( cx.length, cx, false, 0, cy, 1, 0, 0.8, 0.6 ); // $ExpectError - csrot.ndarray( cx.length, cx, null, 0, cy, 1, 0, 0.8, 0.6 ); // $ExpectError - csrot.ndarray( cx.length, cx, undefined, 0, cy, 1, 0, 0.8, 0.6 ); // $ExpectError - csrot.ndarray( cx.length, cx, [], 0, cy, 1, 0, 0.8, 0.6 ); // $ExpectError - csrot.ndarray( cx.length, cx, {}, 0, cy, 1, 0, 0.8, 0.6 ); // $ExpectError - csrot.ndarray( cx.length, cx, ( cx: number ): number => cx, 0, cy, 1, 0, 0.8, 0.6 ); // $ExpectError + const x = new Complex64Array( 10 ); + const y = new Complex64Array( 10 ); + + csrot.ndarray( x.length, x, '10', 0, y, 1, 0, 0.8, 0.6 ); // $ExpectError + csrot.ndarray( x.length, x, true, 0, y, 1, 0, 0.8, 0.6 ); // $ExpectError + csrot.ndarray( x.length, x, false, 0, y, 1, 0, 0.8, 0.6 ); // $ExpectError + csrot.ndarray( x.length, x, null, 0, y, 1, 0, 0.8, 0.6 ); // $ExpectError + csrot.ndarray( x.length, x, undefined, 0, y, 1, 0, 0.8, 0.6 ); // $ExpectError + csrot.ndarray( x.length, x, [], 0, y, 1, 0, 0.8, 0.6 ); // $ExpectError + csrot.ndarray( x.length, x, {}, 0, y, 1, 0, 0.8, 0.6 ); // $ExpectError + csrot.ndarray( x.length, x, ( x: number ): number => x, 0, y, 1, 0, 0.8, 0.6 ); // $ExpectError } // The compiler throws an error if the `ndarray` method is provided a fourth argument which is not a number... { - const cx = new Complex64Array( 10 ); - const cy = new Complex64Array( 10 ); - - csrot.ndarray( cx.length, cx, 1, '10', cy, 1, 0, 0.8, 0.6 ); // $ExpectError - csrot.ndarray( cx.length, cx, 1, true, cy, 1, 0, 0.8, 0.6 ); // $ExpectError - csrot.ndarray( cx.length, cx, 1, false, cy, 1, 0, 0.8, 0.6 ); // $ExpectError - csrot.ndarray( cx.length, cx, 1, null, cy, 1, 0, 0.8, 0.6 ); // $ExpectError - csrot.ndarray( cx.length, cx, 1, undefined, cy, 1, 0, 0.8, 0.6 ); // $ExpectError - csrot.ndarray( cx.length, cx, 1, [], cy, 1, 0, 0.8, 0.6 ); // $ExpectError - csrot.ndarray( cx.length, cx, 1, {}, cy, 1, 0, 0.8, 0.6 ); // $ExpectError - csrot.ndarray( cx.length, cx, 1, ( cx: number ): number => cx, cy, 1, 0, 0.8, 0.6 ); // $ExpectError + const x = new Complex64Array( 10 ); + const y = new Complex64Array( 10 ); + + csrot.ndarray( x.length, x, 1, '10', y, 1, 0, 0.8, 0.6 ); // $ExpectError + csrot.ndarray( x.length, x, 1, true, y, 1, 0, 0.8, 0.6 ); // $ExpectError + csrot.ndarray( x.length, x, 1, false, y, 1, 0, 0.8, 0.6 ); // $ExpectError + csrot.ndarray( x.length, x, 1, null, y, 1, 0, 0.8, 0.6 ); // $ExpectError + csrot.ndarray( x.length, x, 1, undefined, y, 1, 0, 0.8, 0.6 ); // $ExpectError + csrot.ndarray( x.length, x, 1, [], y, 1, 0, 0.8, 0.6 ); // $ExpectError + csrot.ndarray( x.length, x, 1, {}, y, 1, 0, 0.8, 0.6 ); // $ExpectError + csrot.ndarray( x.length, x, 1, ( x: number ): number => x, y, 1, 0, 0.8, 0.6 ); // $ExpectError } // The compiler throws an error if the `ndarray` method is provided a fifth argument which is not a Complex64Array... { - const cx = new Complex64Array( 10 ); - - csrot.ndarray( cx.length, cx, 1, 0, 10, 1, 0, 0.8, 0.6 ); // $ExpectError - csrot.ndarray( cx.length, cx, 1, 0, '10', 1, 0, 0.8, 0.6 ); // $ExpectError - csrot.ndarray( cx.length, cx, 1, 0, true, 1, 0, 0.8, 0.6 ); // $ExpectError - csrot.ndarray( cx.length, cx, 1, 0, false, 1, 0, 0.8, 0.6 ); // $ExpectError - csrot.ndarray( cx.length, cx, 1, 0, null, 1, 0, 0.8, 0.6 ); // $ExpectError - csrot.ndarray( cx.length, cx, 1, 0, undefined, 1, 0, 0.8, 0.6 ); // $ExpectError - csrot.ndarray( cx.length, cx, 1, 0, [ '1' ], 1, 0, 0.8, 0.6 ); // $ExpectError - csrot.ndarray( cx.length, cx, 1, 0, {}, 1, 0, 0.8, 0.6 ); // $ExpectError - csrot.ndarray( cx.length, cx, 1, 0, ( cx: number ): number => cx, 1, 0, 0.8, 0.6 ); // $ExpectError + const x = new Complex64Array( 10 ); + + csrot.ndarray( x.length, x, 1, 0, 10, 1, 0, 0.8, 0.6 ); // $ExpectError + csrot.ndarray( x.length, x, 1, 0, '10', 1, 0, 0.8, 0.6 ); // $ExpectError + csrot.ndarray( x.length, x, 1, 0, true, 1, 0, 0.8, 0.6 ); // $ExpectError + csrot.ndarray( x.length, x, 1, 0, false, 1, 0, 0.8, 0.6 ); // $ExpectError + csrot.ndarray( x.length, x, 1, 0, null, 1, 0, 0.8, 0.6 ); // $ExpectError + csrot.ndarray( x.length, x, 1, 0, undefined, 1, 0, 0.8, 0.6 ); // $ExpectError + csrot.ndarray( x.length, x, 1, 0, [ '1' ], 1, 0, 0.8, 0.6 ); // $ExpectError + csrot.ndarray( x.length, x, 1, 0, {}, 1, 0, 0.8, 0.6 ); // $ExpectError + csrot.ndarray( x.length, x, 1, 0, ( x: number ): number => x, 1, 0, 0.8, 0.6 ); // $ExpectError } // The compiler throws an error if the `ndarray` method is provided a sixth argument which is not a number... { - const cx = new Complex64Array( 10 ); - const cy = new Complex64Array( 10 ); - - csrot.ndarray( cx.length, cx, 1, 0, cy, '10', 0, 0.8, 0.6 ); // $ExpectError - csrot.ndarray( cx.length, cx, 1, 0, cy, true, 0, 0.8, 0.6 ); // $ExpectError - csrot.ndarray( cx.length, cx, 1, 0, cy, false, 0, 0.8, 0.6 ); // $ExpectError - csrot.ndarray( cx.length, cx, 1, 0, cy, null, 0, 0.8, 0.6 ); // $ExpectError - csrot.ndarray( cx.length, cx, 1, 0, cy, undefined, 0, 0.8, 0.6 ); // $ExpectError - csrot.ndarray( cx.length, cx, 1, 0, cy, [], 0, 0.8, 0.6 ); // $ExpectError - csrot.ndarray( cx.length, cx, 1, 0, cy, {}, 0, 0.8, 0.6 ); // $ExpectError - csrot.ndarray( cx.length, cx, 1, 0, cy, ( cx: number ): number => cx, 0, 0.8, 0.6 ); // $ExpectError + const x = new Complex64Array( 10 ); + const y = new Complex64Array( 10 ); + + csrot.ndarray( x.length, x, 1, 0, y, '10', 0, 0.8, 0.6 ); // $ExpectError + csrot.ndarray( x.length, x, 1, 0, y, true, 0, 0.8, 0.6 ); // $ExpectError + csrot.ndarray( x.length, x, 1, 0, y, false, 0, 0.8, 0.6 ); // $ExpectError + csrot.ndarray( x.length, x, 1, 0, y, null, 0, 0.8, 0.6 ); // $ExpectError + csrot.ndarray( x.length, x, 1, 0, y, undefined, 0, 0.8, 0.6 ); // $ExpectError + csrot.ndarray( x.length, x, 1, 0, y, [], 0, 0.8, 0.6 ); // $ExpectError + csrot.ndarray( x.length, x, 1, 0, y, {}, 0, 0.8, 0.6 ); // $ExpectError + csrot.ndarray( x.length, x, 1, 0, y, ( x: number ): number => x, 0, 0.8, 0.6 ); // $ExpectError } // The compiler throws an error if the `ndarray` method is provided a seventh argument which is not a number... { - const cx = new Complex64Array( 10 ); - const cy = new Complex64Array( 10 ); - - csrot.ndarray( cx.length, cx, 1, 0, cy, 1, '10', 0.8, 0.6 ); // $ExpectError - csrot.ndarray( cx.length, cx, 1, 0, cy, 1, true, 0.8, 0.6 ); // $ExpectError - csrot.ndarray( cx.length, cx, 1, 0, cy, 1, false, 0.8, 0.6 ); // $ExpectError - csrot.ndarray( cx.length, cx, 1, 0, cy, 1, null, 0.8, 0.6 ); // $ExpectError - csrot.ndarray( cx.length, cx, 1, 0, cy, 1, undefined, 0.8, 0.6 ); // $ExpectError - csrot.ndarray( cx.length, cx, 1, 0, cy, 1, [], 0.8, 0.6 ); // $ExpectError - csrot.ndarray( cx.length, cx, 1, 0, cy, 1, {}, 0.8, 0.6 ); // $ExpectError - csrot.ndarray( cx.length, cx, 1, 0, cy, 1, ( cx: number ): number => cx, 0.8, 0.6 ); // $ExpectError + const x = new Complex64Array( 10 ); + const y = new Complex64Array( 10 ); + + csrot.ndarray( x.length, x, 1, 0, y, 1, '10', 0.8, 0.6 ); // $ExpectError + csrot.ndarray( x.length, x, 1, 0, y, 1, true, 0.8, 0.6 ); // $ExpectError + csrot.ndarray( x.length, x, 1, 0, y, 1, false, 0.8, 0.6 ); // $ExpectError + csrot.ndarray( x.length, x, 1, 0, y, 1, null, 0.8, 0.6 ); // $ExpectError + csrot.ndarray( x.length, x, 1, 0, y, 1, undefined, 0.8, 0.6 ); // $ExpectError + csrot.ndarray( x.length, x, 1, 0, y, 1, [], 0.8, 0.6 ); // $ExpectError + csrot.ndarray( x.length, x, 1, 0, y, 1, {}, 0.8, 0.6 ); // $ExpectError + csrot.ndarray( x.length, x, 1, 0, y, 1, ( x: number ): number => x, 0.8, 0.6 ); // $ExpectError } // The compiler throws an error if the `ndarray` method is provided an eighth argument which is not a number... { - const cx = new Complex64Array( 10 ); - const cy = new Complex64Array( 10 ); - - csrot.ndarray( cx.length, cx, 1, 0, cy, 1, 0, '10', 0.6 ); // $ExpectError - csrot.ndarray( cx.length, cx, 1, 0, cy, 1, 0, true, 0.6 ); // $ExpectError - csrot.ndarray( cx.length, cx, 1, 0, cy, 1, 0, false, 0.6 ); // $ExpectError - csrot.ndarray( cx.length, cx, 1, 0, cy, 1, 0, null, 0.6 ); // $ExpectError - csrot.ndarray( cx.length, cx, 1, 0, cy, 1, 0, undefined, 0.6 ); // $ExpectError - csrot.ndarray( cx.length, cx, 1, 0, cy, 1, 0, [], 0.6 ); // $ExpectError - csrot.ndarray( cx.length, cx, 1, 0, cy, 1, 0, {}, 0.6 ); // $ExpectError - csrot.ndarray( cx.length, cx, 1, 0, cy, 1, 0, ( cx: number ): number => cx, 0.6 ); // $ExpectError + const x = new Complex64Array( 10 ); + const y = new Complex64Array( 10 ); + + csrot.ndarray( x.length, x, 1, 0, y, 1, 0, '10', 0.6 ); // $ExpectError + csrot.ndarray( x.length, x, 1, 0, y, 1, 0, true, 0.6 ); // $ExpectError + csrot.ndarray( x.length, x, 1, 0, y, 1, 0, false, 0.6 ); // $ExpectError + csrot.ndarray( x.length, x, 1, 0, y, 1, 0, null, 0.6 ); // $ExpectError + csrot.ndarray( x.length, x, 1, 0, y, 1, 0, undefined, 0.6 ); // $ExpectError + csrot.ndarray( x.length, x, 1, 0, y, 1, 0, [], 0.6 ); // $ExpectError + csrot.ndarray( x.length, x, 1, 0, y, 1, 0, {}, 0.6 ); // $ExpectError + csrot.ndarray( x.length, x, 1, 0, y, 1, 0, ( x: number ): number => x, 0.6 ); // $ExpectError } // The compiler throws an error if the `ndarray` method is provided a ninth argument which is not a number... { - const cx = new Complex64Array( 10 ); - const cy = new Complex64Array( 10 ); - - csrot.ndarray( cx.length, cx, 1, 0, cy, 1, 0, 0.8, '10' ); // $ExpectError - csrot.ndarray( cx.length, cx, 1, 0, cy, 1, 0, 0.8, true ); // $ExpectError - csrot.ndarray( cx.length, cx, 1, 0, cy, 1, 0, 0.8, false ); // $ExpectError - csrot.ndarray( cx.length, cx, 1, 0, cy, 1, 0, 0.8, null ); // $ExpectError - csrot.ndarray( cx.length, cx, 1, 0, cy, 1, 0, 0.8, undefined ); // $ExpectError - csrot.ndarray( cx.length, cx, 1, 0, cy, 1, 0, 0.8, [] ); // $ExpectError - csrot.ndarray( cx.length, cx, 1, 0, cy, 1, 0, 0.8, {} ); // $ExpectError - csrot.ndarray( cx.length, cx, 1, 0, cy, 1, 0, 0.8, ( cx: number ): number => cx ); // $ExpectError + const x = new Complex64Array( 10 ); + const y = new Complex64Array( 10 ); + + csrot.ndarray( x.length, x, 1, 0, y, 1, 0, 0.8, '10' ); // $ExpectError + csrot.ndarray( x.length, x, 1, 0, y, 1, 0, 0.8, true ); // $ExpectError + csrot.ndarray( x.length, x, 1, 0, y, 1, 0, 0.8, false ); // $ExpectError + csrot.ndarray( x.length, x, 1, 0, y, 1, 0, 0.8, null ); // $ExpectError + csrot.ndarray( x.length, x, 1, 0, y, 1, 0, 0.8, undefined ); // $ExpectError + csrot.ndarray( x.length, x, 1, 0, y, 1, 0, 0.8, [] ); // $ExpectError + csrot.ndarray( x.length, x, 1, 0, y, 1, 0, 0.8, {} ); // $ExpectError + csrot.ndarray( x.length, x, 1, 0, y, 1, 0, 0.8, ( x: number ): number => x ); // $ExpectError } // The compiler throws an error if the `ndarray` method is provided an unsupported number of arguments... { - const cx = new Complex64Array( 10 ); - const cy = new Complex64Array( 10 ); + const x = new Complex64Array( 10 ); + const y = new Complex64Array( 10 ); csrot.ndarray(); // $ExpectError - csrot.ndarray( cx.length ); // $ExpectError - csrot.ndarray( cx.length, cx ); // $ExpectError - csrot.ndarray( cx.length, cx, 1 ); // $ExpectError - csrot.ndarray( cx.length, cx, 1, 0 ); // $ExpectError - csrot.ndarray( cx.length, cx, 1, 0, cy ); // $ExpectError - csrot.ndarray( cx.length, cx, 1, 0, cy, 1 ); // $ExpectError - csrot.ndarray( cx.length, cx, 1, 0, cy, 1, 0 ); // $ExpectError - csrot.ndarray( cx.length, cx, 1, 0, cy, 1, 0, 0.8 ); // $ExpectError - csrot.ndarray( cx.length, cx, 1, 0, cy, 1, 0, 0.8, 0.6, 10 ); // $ExpectError + csrot.ndarray( x.length ); // $ExpectError + csrot.ndarray( x.length, x ); // $ExpectError + csrot.ndarray( x.length, x, 1 ); // $ExpectError + csrot.ndarray( x.length, x, 1, 0 ); // $ExpectError + csrot.ndarray( x.length, x, 1, 0, y ); // $ExpectError + csrot.ndarray( x.length, x, 1, 0, y, 1 ); // $ExpectError + csrot.ndarray( x.length, x, 1, 0, y, 1, 0 ); // $ExpectError + csrot.ndarray( x.length, x, 1, 0, y, 1, 0, 0.8 ); // $ExpectError + csrot.ndarray( x.length, x, 1, 0, y, 1, 0, 0.8, 0.6, 10 ); // $ExpectError } diff --git a/lib/node_modules/@stdlib/blas/base/csrot/examples/index.js b/lib/node_modules/@stdlib/blas/base/csrot/examples/index.js index 0fd3fbc5eba5..929557075eeb 100644 --- a/lib/node_modules/@stdlib/blas/base/csrot/examples/index.js +++ b/lib/node_modules/@stdlib/blas/base/csrot/examples/index.js @@ -31,14 +31,14 @@ function rand() { } // Generate random input arrays: -var cx = filledarrayBy( 10, 'complex64', rand ); -var cxc = ccopy( cx.length, cx, 1, zeros( cx.length, 'complex64' ), 1 ); +var x = filledarrayBy( 10, 'complex64', rand ); +var xc = ccopy( x.length, x, 1, zeros( x.length, 'complex64' ), 1 ); -var cy = filledarrayBy( 10, 'complex64', rand ); -var cyc = ccopy( cy.length, cy, 1, zeros( cy.length, 'complex64' ), 1 ); +var y = filledarrayBy( 10, 'complex64', rand ); +var yc = ccopy( y.length, y, 1, zeros( y.length, 'complex64' ), 1 ); // Apply a plane rotation: -csrot( cx.length, cx, 1, cy, 1, 0.8, 0.6 ); +csrot( x.length, x, 1, y, 1, 0.8, 0.6 ); // Print the results: -logEach( '(%s,%s) => (%s,%s)', cxc, cyc, cx, cy ); +logEach( '(%s,%s) => (%s,%s)', xc, yc, x, y ); diff --git a/lib/node_modules/@stdlib/blas/base/csrot/include/stdlib/blas/base/csrot.h b/lib/node_modules/@stdlib/blas/base/csrot/include/stdlib/blas/base/csrot.h index b6b18f4b67d4..d25da06968e2 100644 --- a/lib/node_modules/@stdlib/blas/base/csrot/include/stdlib/blas/base/csrot.h +++ b/lib/node_modules/@stdlib/blas/base/csrot/include/stdlib/blas/base/csrot.h @@ -34,12 +34,12 @@ extern "C" { /** * Applies a plane rotation. */ -void API_SUFFIX(c_csrot)( const CBLAS_INT N, void *CX, const CBLAS_INT strideX, void *CY, const CBLAS_INT strideY, const float c, const float s ); +void API_SUFFIX(c_csrot)( const CBLAS_INT N, void *X, const CBLAS_INT strideX, void *Y, const CBLAS_INT strideY, const float c, const float s ); /** * Applies a plane rotation using alternative indexing semantics. */ -void API_SUFFIX(c_csrot_ndarray)( const CBLAS_INT N, void *CX, const CBLAS_INT strideX, const CBLAS_INT offsetX, void *CY, const CBLAS_INT strideY, const CBLAS_INT offsetY, const float c, const float s ); +void API_SUFFIX(c_csrot_ndarray)( const CBLAS_INT N, void *X, const CBLAS_INT strideX, const CBLAS_INT offsetX, void *Y, const CBLAS_INT strideY, const CBLAS_INT offsetY, const float c, const float s ); #ifdef __cplusplus } diff --git a/lib/node_modules/@stdlib/blas/base/csrot/include/stdlib/blas/base/csrot_cblas.h b/lib/node_modules/@stdlib/blas/base/csrot/include/stdlib/blas/base/csrot_cblas.h index ad8931d6e2dd..04c95419a8cc 100644 --- a/lib/node_modules/@stdlib/blas/base/csrot/include/stdlib/blas/base/csrot_cblas.h +++ b/lib/node_modules/@stdlib/blas/base/csrot/include/stdlib/blas/base/csrot_cblas.h @@ -34,7 +34,7 @@ extern "C" { /** * Applies a plane rotation. */ -void API_SUFFIX(cblas_csrot)( const CBLAS_INT N, void *CX, const CBLAS_INT strideX, void *CY, const CBLAS_INT strideY, const float c, const float s ); +void API_SUFFIX(cblas_csrot)( const CBLAS_INT N, void *X, const CBLAS_INT strideX, void *Y, const CBLAS_INT strideY, const float c, const float s ); #ifdef __cplusplus } diff --git a/lib/node_modules/@stdlib/blas/base/csrot/lib/csrot.js b/lib/node_modules/@stdlib/blas/base/csrot/lib/csrot.js index 1c08183bdf27..6a064a66b18e 100644 --- a/lib/node_modules/@stdlib/blas/base/csrot/lib/csrot.js +++ b/lib/node_modules/@stdlib/blas/base/csrot/lib/csrot.js @@ -30,28 +30,28 @@ var ndarray = require( './ndarray.js' ); * Applies a plane rotation. * * @param {PositiveInteger} N - number of indexed elements -* @param {Complex64Array} cx - first input array -* @param {integer} strideX - `cx` stride length -* @param {Complex64Array} cy - second input array -* @param {integer} strideY - `cy` stride length +* @param {Complex64Array} x - first input array +* @param {integer} strideX - `x` stride length +* @param {Complex64Array} y - second input array +* @param {integer} strideY - `y` stride length * @param {number} c - cosine of the angle of rotation * @param {number} s - sine of the angle of rotation -* @returns {Complex64Array} `cy` +* @returns {Complex64Array} `y` * * @example * var Complex64Array = require( '@stdlib/array/complex64' ); * -* var cx = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); -* var cy = new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ); +* var x = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); +* var y = new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ); * -* csrot( cx.length, cx, 1, cy, 1, 0.8, 0.6 ); -* // cx => [ ~0.8, ~1.6, ~2.4, ~3.2, 4.0, ~4.8, ~5.6, ~6.4 ] -* // cy => [ ~-0.6, ~-1.2, ~-1.8, ~-2.4, -3.0, ~-3.6, ~-4.2, ~-4.8 ] +* csrot( x.length, x, 1, y, 1, 0.8, 0.6 ); +* // x => [ ~0.8, ~1.6, ~2.4, ~3.2, 4.0, ~4.8, ~5.6, ~6.4 ] +* // y => [ ~-0.6, ~-1.2, ~-1.8, ~-2.4, -3.0, ~-3.6, ~-4.2, ~-4.8 ] */ -function csrot( N, cx, strideX, cy, strideY, c, s ) { +function csrot( N, x, strideX, y, strideY, c, s ) { var ix = stride2offset( N, strideX ); var iy = stride2offset( N, strideY ); - return ndarray( N, cx, strideX, ix, cy, strideY, iy, c, s ); + return ndarray( N, x, strideX, ix, y, strideY, iy, c, s ); } diff --git a/lib/node_modules/@stdlib/blas/base/csrot/lib/csrot.native.js b/lib/node_modules/@stdlib/blas/base/csrot/lib/csrot.native.js index 344f10093ffc..59c00df71552 100644 --- a/lib/node_modules/@stdlib/blas/base/csrot/lib/csrot.native.js +++ b/lib/node_modules/@stdlib/blas/base/csrot/lib/csrot.native.js @@ -30,29 +30,29 @@ var addon = require( './../src/addon.node' ); * Applies a plane rotation. * * @param {PositiveInteger} N - number of indexed elements -* @param {Complex64Array} cx - first input array -* @param {integer} strideX - `cx` stride length -* @param {Complex64Array} cy - second input array -* @param {integer} strideY - `cy` stride length +* @param {Complex64Array} x - first input array +* @param {integer} strideX - `x` stride length +* @param {Complex64Array} y - second input array +* @param {integer} strideY - `y` stride length * @param {number} c - cosine of the angle of rotation * @param {number} s - sine of the angle of rotation -* @returns {Complex64Array} `cy` +* @returns {Complex64Array} `y` * * @example * var Complex64Array = require( '@stdlib/array/complex64' ); * -* var cx = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); -* var cy = new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ); +* var x = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); +* var y = new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ); * -* csrot( cx.length, cx, 1, cy, 1, 0.8, 0.6 ); -* // cx => [ ~0.8, ~1.6, ~2.4, ~3.2, 4.0, ~4.8, ~5.6, ~6.4 ] -* // cy => [ ~-0.6, ~-1.2, ~-1.8, ~-2.4, -3.0, ~-3.6, ~-4.2, ~-4.8 ] +* csrot( x.length, x, 1, y, 1, 0.8, 0.6 ); +* // x => [ ~0.8, ~1.6, ~2.4, ~3.2, 4.0, ~4.8, ~5.6, ~6.4 ] +* // y => [ ~-0.6, ~-1.2, ~-1.8, ~-2.4, -3.0, ~-3.6, ~-4.2, ~-4.8 ] */ -function csrot( N, cx, strideX, cy, strideY, c, s ) { - var viewX = reinterpret( cx, 0 ); - var viewY = reinterpret( cy, 0 ); +function csrot( N, x, strideX, y, strideY, c, s ) { + var viewX = reinterpret( x, 0 ); + var viewY = reinterpret( y, 0 ); addon( N, viewX, strideX, viewY, strideY, c, s ); - return cy; + return y; } diff --git a/lib/node_modules/@stdlib/blas/base/csrot/lib/index.js b/lib/node_modules/@stdlib/blas/base/csrot/lib/index.js index 13b56bfe0aa3..6b4f7cd32c2d 100644 --- a/lib/node_modules/@stdlib/blas/base/csrot/lib/index.js +++ b/lib/node_modules/@stdlib/blas/base/csrot/lib/index.js @@ -27,23 +27,23 @@ * var Complex64Array = require( '@stdlib/array/complex64' ); * var csrot = require( '@stdlib/blas/base/csrot' ); * -* var cx = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); -* var cy = new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ); +* var x = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); +* var y = new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ); * -* csrot( cx.length, cx, 1, cy, 1, 0.8, 0.6 ); -* // cx => [ ~0.8, ~1.6, ~2.4, ~3.2, 4.0, ~4.8, ~5.6, ~6.4 ] -* // cy => [ ~-0.6, ~-1.2, ~-1.8, ~-2.4, -3.0, ~-3.6, ~-4.2, ~-4.8 ] +* csrot( x.length, x, 1, y, 1, 0.8, 0.6 ); +* // x => [ ~0.8, ~1.6, ~2.4, ~3.2, 4.0, ~4.8, ~5.6, ~6.4 ] +* // y => [ ~-0.6, ~-1.2, ~-1.8, ~-2.4, -3.0, ~-3.6, ~-4.2, ~-4.8 ] * * @example * var Complex64Array = require( '@stdlib/array/complex64' ); * var csrot = require( '@stdlib/blas/base/csrot' ); * -* var cx = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); -* var cy = new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ); +* var x = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); +* var y = new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ); * -* csrot.ndarray( cx.length, cx, 1, 0, cy, 1, 0, 0.8, 0.6 ); -* // cx => [ ~0.8, ~1.6, ~2.4, ~3.2, 4.0, ~4.8, ~5.6, ~6.4 ] -* // cy => [ ~-0.6, ~-1.2, ~-1.8, ~-2.4, -3.0, ~-3.6, ~-4.2, ~-4.8 ] +* csrot.ndarray( x.length, x, 1, 0, y, 1, 0, 0.8, 0.6 ); +* // x => [ ~0.8, ~1.6, ~2.4, ~3.2, 4.0, ~4.8, ~5.6, ~6.4 ] +* // y => [ ~-0.6, ~-1.2, ~-1.8, ~-2.4, -3.0, ~-3.6, ~-4.2, ~-4.8 ] */ // MODULES // diff --git a/lib/node_modules/@stdlib/blas/base/csrot/lib/ndarray.js b/lib/node_modules/@stdlib/blas/base/csrot/lib/ndarray.js index 00cb06952cd3..a736309ae414 100644 --- a/lib/node_modules/@stdlib/blas/base/csrot/lib/ndarray.js +++ b/lib/node_modules/@stdlib/blas/base/csrot/lib/ndarray.js @@ -30,27 +30,27 @@ var reinterpret = require( '@stdlib/strided/base/reinterpret-complex64' ); * Applies a plane rotation. * * @param {PositiveInteger} N - number of indexed elements -* @param {Complex64Array} cx - first input array -* @param {integer} strideX - `cx` stride length -* @param {NonNegativeInteger} offsetX - starting `cx` index -* @param {Complex64Array} cy - second input array -* @param {integer} strideY - `cy` stride length -* @param {NonNegativeInteger} offsetY - starting `cy` index +* @param {Complex64Array} x - first input array +* @param {integer} strideX - `x` stride length +* @param {NonNegativeInteger} offsetX - starting `x` index +* @param {Complex64Array} y - second input array +* @param {integer} strideY - `y` stride length +* @param {NonNegativeInteger} offsetY - starting `y` index * @param {number} c - cosine of the angle of rotation * @param {number} s - sine of the angle of rotation -* @returns {Complex64Array} `cy` +* @returns {Complex64Array} `y` * * @example * var Complex64Array = require( '@stdlib/array/complex64' ); * -* var cx = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); -* var cy = new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ); +* var x = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); +* var y = new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ); * -* csrot( cx.length, cx, 1, 0, cy, 1, 0, 0.8, 0.6 ); -* // cx => [ ~0.8, ~1.6, ~2.4, ~3.2, 4.0, ~4.8, ~5.6, ~6.4 ] -* // cy => [ ~-0.6, ~-1.2, ~-1.8, ~-2.4, -3.0, ~-3.6, ~-4.2, ~-4.8 ] +* csrot( x.length, x, 1, 0, y, 1, 0, 0.8, 0.6 ); +* // x => [ ~0.8, ~1.6, ~2.4, ~3.2, 4.0, ~4.8, ~5.6, ~6.4 ] +* // y => [ ~-0.6, ~-1.2, ~-1.8, ~-2.4, -3.0, ~-3.6, ~-4.2, ~-4.8 ] */ -function csrot( N, cx, strideX, offsetX, cy, strideY, offsetY, c, s ) { +function csrot( N, x, strideX, offsetX, y, strideY, offsetY, c, s ) { var viewX; var viewY; var tmp; @@ -61,10 +61,10 @@ function csrot( N, cx, strideX, offsetX, cy, strideY, offsetY, c, s ) { var i; if ( N <= 0 ) { - return cy; + return y; } - viewX = reinterpret( cx, 0 ); - viewY = reinterpret( cy, 0 ); + viewX = reinterpret( x, 0 ); + viewY = reinterpret( y, 0 ); c = f32( c ); s = f32( s ); sx = strideX * 2; @@ -83,7 +83,7 @@ function csrot( N, cx, strideX, offsetX, cy, strideY, offsetY, c, s ) { ix += sx; iy += sy; } - return cy; + return y; } diff --git a/lib/node_modules/@stdlib/blas/base/csrot/lib/ndarray.native.js b/lib/node_modules/@stdlib/blas/base/csrot/lib/ndarray.native.js index 343054d236f2..1a8ecaf315d7 100644 --- a/lib/node_modules/@stdlib/blas/base/csrot/lib/ndarray.native.js +++ b/lib/node_modules/@stdlib/blas/base/csrot/lib/ndarray.native.js @@ -30,31 +30,31 @@ var addon = require( './../src/addon.node' ); * Applies a plane rotation. * * @param {PositiveInteger} N - number of indexed elements -* @param {Complex64Array} cx - first input array -* @param {integer} strideX - `cx` stride length -* @param {NonNegativeInteger} offsetX - starting `cx` index -* @param {Complex64Array} cy - second input array -* @param {integer} strideY - `cy` stride length -* @param {NonNegativeInteger} offsetY - starting `cy` index +* @param {Complex64Array} x - first input array +* @param {integer} strideX - `x` stride length +* @param {NonNegativeInteger} offsetX - starting `x` index +* @param {Complex64Array} y - second input array +* @param {integer} strideY - `y` stride length +* @param {NonNegativeInteger} offsetY - starting `y` index * @param {number} c - cosine of the angle of rotation * @param {number} s - sine of the angle of rotation -* @returns {Complex64Array} `cy` +* @returns {Complex64Array} `y` * * @example * var Complex64Array = require( '@stdlib/array/complex64' ); * -* var cx = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); -* var cy = new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ); +* var x = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); +* var y = new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ); * -* csrot( cx.length, cx, 1, 0, cy, 1, 0, 0.8, 0.6 ); -* // cx => [ ~0.8, ~1.6, ~2.4, ~3.2, 4.0, ~4.8, ~5.6, ~6.4 ] -* // cy => [ ~-0.6, ~-1.2, ~-1.8, ~-2.4, -3.0, ~-3.6, ~-4.2, ~-4.8 ] +* csrot( x.length, x, 1, 0, y, 1, 0, 0.8, 0.6 ); +* // x => [ ~0.8, ~1.6, ~2.4, ~3.2, 4.0, ~4.8, ~5.6, ~6.4 ] +* // y => [ ~-0.6, ~-1.2, ~-1.8, ~-2.4, -3.0, ~-3.6, ~-4.2, ~-4.8 ] */ -function csrot( N, cx, strideX, offsetX, cy, strideY, offsetY, c, s ) { - var viewX = reinterpret( cx, 0 ); - var viewY = reinterpret( cy, 0 ); +function csrot( N, x, strideX, offsetX, y, strideY, offsetY, c, s ) { + var viewX = reinterpret( x, 0 ); + var viewY = reinterpret( y, 0 ); addon.ndarray( N, viewX, strideX, offsetX, viewY, strideY, offsetY, c, s ); - return cy; + return y; } diff --git a/lib/node_modules/@stdlib/blas/base/csrot/src/addon.c b/lib/node_modules/@stdlib/blas/base/csrot/src/addon.c index 3e74276095b7..de6d35d70682 100644 --- a/lib/node_modules/@stdlib/blas/base/csrot/src/addon.c +++ b/lib/node_modules/@stdlib/blas/base/csrot/src/addon.c @@ -39,9 +39,9 @@ static napi_value addon( napi_env env, napi_callback_info info ) { STDLIB_NAPI_ARGV_INT64( env, strideY, argv, 4 ); STDLIB_NAPI_ARGV_FLOAT( env, c, argv, 5 ); STDLIB_NAPI_ARGV_FLOAT( env, s, argv, 6 ); - STDLIB_NAPI_ARGV_STRIDED_COMPLEX64ARRAY( env, CX, N, strideX, argv, 1 ); - STDLIB_NAPI_ARGV_STRIDED_COMPLEX64ARRAY( env, CY, N, strideY, argv, 3 ); - API_SUFFIX(c_csrot)( N, (void *)CX, strideX, (void *)CY, strideY, c, s ); + STDLIB_NAPI_ARGV_STRIDED_COMPLEX64ARRAY( env, X, N, strideX, argv, 1 ); + STDLIB_NAPI_ARGV_STRIDED_COMPLEX64ARRAY( env, Y, N, strideY, argv, 3 ); + API_SUFFIX(c_csrot)( N, (void *)X, strideX, (void *)Y, strideY, c, s ); return NULL; } @@ -61,9 +61,9 @@ static napi_value addon_method( napi_env env, napi_callback_info info ) { STDLIB_NAPI_ARGV_INT64( env, offsetY, argv, 6 ); STDLIB_NAPI_ARGV_FLOAT( env, c, argv, 7 ); STDLIB_NAPI_ARGV_FLOAT( env, s, argv, 8 ); - STDLIB_NAPI_ARGV_STRIDED_COMPLEX64ARRAY( env, CX, N, strideX, argv, 1 ); - STDLIB_NAPI_ARGV_STRIDED_COMPLEX64ARRAY( env, CY, N, strideY, argv, 4 ); - API_SUFFIX(c_csrot_ndarray)( N, (void *)CX, strideX, offsetX, (void *)CY, strideY, offsetY, c, s ); + STDLIB_NAPI_ARGV_STRIDED_COMPLEX64ARRAY( env, X, N, strideX, argv, 1 ); + STDLIB_NAPI_ARGV_STRIDED_COMPLEX64ARRAY( env, Y, N, strideY, argv, 4 ); + API_SUFFIX(c_csrot_ndarray)( N, (void *)X, strideX, offsetX, (void *)Y, strideY, offsetY, c, s ); return NULL; } diff --git a/lib/node_modules/@stdlib/blas/base/csrot/src/csrot.c b/lib/node_modules/@stdlib/blas/base/csrot/src/csrot.c index a1ec0c856f94..3d66d91013f5 100644 --- a/lib/node_modules/@stdlib/blas/base/csrot/src/csrot.c +++ b/lib/node_modules/@stdlib/blas/base/csrot/src/csrot.c @@ -24,15 +24,15 @@ * Applies a plane rotation. * * @param N number of indexed elements -* @param CX first input array -* @param strideX CX stride length -* @param CY second input array -* @param strideY CY stride length +* @param X first input array +* @param strideX X stride length +* @param Y second input array +* @param strideY Y stride length * @param c cosine of the angle of rotation * @param s sine of the angle of rotation */ -void API_SUFFIX(c_csrot)( const CBLAS_INT N, void *CX, const CBLAS_INT strideX, void *CY, const CBLAS_INT strideY, const float c, const float s ) { +void API_SUFFIX(c_csrot)( const CBLAS_INT N, void *X, const CBLAS_INT strideX, void *Y, const CBLAS_INT strideY, const float c, const float s ) { CBLAS_INT ox = stdlib_strided_stride2offset( N, strideX ); CBLAS_INT oy = stdlib_strided_stride2offset( N, strideY ); - API_SUFFIX(c_csrot_ndarray)( N, CX, strideX, ox, CY, strideY, oy, c, s ); + API_SUFFIX(c_csrot_ndarray)( N, X, strideX, ox, Y, strideY, oy, c, s ); } diff --git a/lib/node_modules/@stdlib/blas/base/csrot/src/csrot_cblas.c b/lib/node_modules/@stdlib/blas/base/csrot/src/csrot_cblas.c index f5128a068568..bd408685421d 100644 --- a/lib/node_modules/@stdlib/blas/base/csrot/src/csrot_cblas.c +++ b/lib/node_modules/@stdlib/blas/base/csrot/src/csrot_cblas.c @@ -26,33 +26,33 @@ * Applies a plane rotation. * * @param N number of indexed elements -* @param CX first input array -* @param strideX CX stride length -* @param CY second input array -* @param strideY CY stride length +* @param X first input array +* @param strideX X stride length +* @param Y second input array +* @param strideY Y stride length * @param c cosine of the angle of rotation * @param s sine of the angle of rotation */ -void API_SUFFIX(c_csrot)( const CBLAS_INT N, void *CX, const CBLAS_INT strideX, void *CY, const CBLAS_INT strideY, const float c, const float s ) { - API_SUFFIX(cblas_csrot)( N, CX, strideX, CY, strideY, c, s ); +void API_SUFFIX(c_csrot)( const CBLAS_INT N, void *X, const CBLAS_INT strideX, void *Y, const CBLAS_INT strideY, const float c, const float s ) { + API_SUFFIX(cblas_csrot)( N, X, strideX, Y, strideY, c, s ); } /** * Applies a plane rotation using alternative indexing semantics. * * @param N number of indexed elements -* @param CX first input array -* @param strideX CX stride length -* @param offsetX starting index for CX -* @param CY second input array -* @param strideY CY stride length -* @param offsetY starting index for CY +* @param X first input array +* @param strideX X stride length +* @param offsetX starting index for X +* @param Y second input array +* @param strideY Y stride length +* @param offsetY starting index for Y * @param c cosine of the angle of rotation * @param s sine of the angle of rotation */ -void API_SUFFIX(c_csrot_ndarray)( const CBLAS_INT N, void *CX, const CBLAS_INT strideX, const CBLAS_INT offsetX, void *CY, const CBLAS_INT strideY, const CBLAS_INT offsetY, const float c, const float s ) { - stdlib_complex64_t *cx = (stdlib_complex64_t *)CX; - stdlib_complex64_t *cy = (stdlib_complex64_t *)CY; +void API_SUFFIX(c_csrot_ndarray)( const CBLAS_INT N, void *X, const CBLAS_INT strideX, const CBLAS_INT offsetX, void *Y, const CBLAS_INT strideY, const CBLAS_INT offsetY, const float c, const float s ) { + stdlib_complex64_t *cx = (stdlib_complex64_t *)X; + stdlib_complex64_t *cy = (stdlib_complex64_t *)Y; cx += stdlib_strided_min_view_buffer_index( N, strideX, offsetX ); // adjust array pointer cy += stdlib_strided_min_view_buffer_index( N, strideY, offsetY ); // adjust array pointer diff --git a/lib/node_modules/@stdlib/blas/base/csrot/src/csrot_f.c b/lib/node_modules/@stdlib/blas/base/csrot/src/csrot_f.c index baf3e9798e80..d2d9e9ea0078 100644 --- a/lib/node_modules/@stdlib/blas/base/csrot/src/csrot_f.c +++ b/lib/node_modules/@stdlib/blas/base/csrot/src/csrot_f.c @@ -26,35 +26,35 @@ * Applies a plane rotation. * * @param N number of indexed elements -* @param CX first input array -* @param strideX CX stride length -* @param CY second input array -* @param strideY CY stride length +* @param X first input array +* @param strideX X stride length +* @param Y second input array +* @param strideY Y stride length * @param c cosine of the angle of rotation * @param s sine of the angle of rotation */ -void API_SUFFIX(c_csrot)( const CBLAS_INT N, void *CX, const CBLAS_INT strideX, void *CY, const CBLAS_INT strideY, const float c, const float s ) { - csrot( &N, CX, &strideX, CY, &strideY, &c, &s ); +void API_SUFFIX(c_csrot)( const CBLAS_INT N, void *X, const CBLAS_INT strideX, void *Y, const CBLAS_INT strideY, const float c, const float s ) { + csrot( &N, X, &strideX, Y, &strideY, &c, &s ); } /** * Applies a plane rotation using alternative indexing semantics. * * @param N number of indexed elements -* @param CX first input array -* @param strideX CX stride length -* @param offsetX starting index for CX -* @param CY second input array -* @param strideY CY stride length -* @param offsetY starting index for CY +* @param X first input array +* @param strideX X stride length +* @param offsetX starting index for X +* @param Y second input array +* @param strideY Y stride length +* @param offsetY starting index for Y * @param c cosine of the angle of rotation * @param s sine of the angle of rotation */ -void API_SUFFIX(c_csrot_ndarray)( const CBLAS_INT N, void *CX, const CBLAS_INT strideX, const CBLAS_INT offsetX, void *CY, const CBLAS_INT strideY, const CBLAS_INT offsetY, const float c, const float s ) { - stdlib_complex64_t *cx = (stdlib_complex64_t *)CX; - stdlib_complex64_t *cy = (stdlib_complex64_t *)CY; +void API_SUFFIX(c_csrot_ndarray)( const CBLAS_INT N, void *X, const CBLAS_INT strideX, const CBLAS_INT offsetX, void *Y, const CBLAS_INT strideY, const CBLAS_INT offsetY, const float c, const float s ) { + stdlib_complex64_t *x = (stdlib_complex64_t *)X; + stdlib_complex64_t *y = (stdlib_complex64_t *)Y; - cx += stdlib_strided_min_view_buffer_index( N, strideX, offsetX ); - cy += stdlib_strided_min_view_buffer_index( N, strideY, offsetY ); - csrot( &N, (void *)cx, &strideX, (void *)cy, &strideY, &c, &s ); + x += stdlib_strided_min_view_buffer_index( N, strideX, offsetX ); + y += stdlib_strided_min_view_buffer_index( N, strideY, offsetY ); + csrot( &N, (void *)x, &strideX, (void *)y, &strideY, &c, &s ); } diff --git a/lib/node_modules/@stdlib/blas/base/csrot/src/csrot_ndarray.c b/lib/node_modules/@stdlib/blas/base/csrot/src/csrot_ndarray.c index f76a254e0e50..6503a7f4f130 100644 --- a/lib/node_modules/@stdlib/blas/base/csrot/src/csrot_ndarray.c +++ b/lib/node_modules/@stdlib/blas/base/csrot/src/csrot_ndarray.c @@ -23,18 +23,18 @@ * Applies a plane rotation. * * @param N number of indexed elements -* @param CX first input array -* @param strideX CX stride length -* @param offsetX starting index for CX -* @param CY second input array -* @param strideY CY stride length -* @param offsetY starting index for CY +* @param X first input array +* @param strideX X stride length +* @param offsetX starting index for X +* @param Y second input array +* @param strideY Y stride length +* @param offsetY starting index for Y * @param c cosine of the angle of rotation * @param s sine of the angle of rotation */ -void API_SUFFIX(c_csrot_ndarray)( const CBLAS_INT N, void *CX, const CBLAS_INT strideX, const CBLAS_INT offsetX, void *CY, const CBLAS_INT strideY, const CBLAS_INT offsetY, const float c, const float s ) { - float *x = (float *)CX; - float *y = (float *)CY; +void API_SUFFIX(c_csrot_ndarray)( const CBLAS_INT N, void *X, const CBLAS_INT strideX, const CBLAS_INT offsetX, void *Y, const CBLAS_INT strideY, const CBLAS_INT offsetY, const float c, const float s ) { + float *x = (float *)X; + float *y = (float *)Y; CBLAS_INT ix; CBLAS_INT iy; CBLAS_INT sx; diff --git a/lib/node_modules/@stdlib/blas/base/csrot/test/test.csrot.js b/lib/node_modules/@stdlib/blas/base/csrot/test/test.csrot.js index 745ba363bb67..55e4fa983cc7 100644 --- a/lib/node_modules/@stdlib/blas/base/csrot/test/test.csrot.js +++ b/lib/node_modules/@stdlib/blas/base/csrot/test/test.csrot.js @@ -73,13 +73,13 @@ tape( 'the function has an arity of 7', function test( t ) { tape( 'the function applies a plane rotation', function test( t ) { var viewX; var viewY; - var cxe; - var cye; var out; - var cx; - var cy; + var xe; + var ye; + var x; + var y; - cx = new Complex64Array( [ + x = new Complex64Array([ 1.0, // 1 2.0, // 1 3.0, // 2 @@ -88,8 +88,8 @@ tape( 'the function applies a plane rotation', function test( t ) { 6.0, // 3 7.0, // 4 8.0 // 4 - ] ); - cy = new Complex64Array( [ + ]); + y = new Complex64Array([ 0.0, // 1 0.0, // 1 0.0, // 2 @@ -98,12 +98,12 @@ tape( 'the function applies a plane rotation', function test( t ) { 0.0, // 3 0.0, // 4 0.0 // 4 - ] ); + ]); - viewX = new Float32Array( cx.buffer ); - viewY = new Float32Array( cy.buffer ); + viewX = new Float32Array( x.buffer ); + viewY = new Float32Array( y.buffer ); - cxe = new Float32Array( [ + xe = new Float32Array([ 0.8, // 1 1.6, // 1 2.4, // 2 @@ -112,8 +112,8 @@ tape( 'the function applies a plane rotation', function test( t ) { 4.8, // 3 5.6, // 4 6.4 // 4 - ] ); - cye = new Float32Array( [ + ]); + ye = new Float32Array([ -0.6, // 1 -1.2, // 1 -1.8, // 2 @@ -122,25 +122,25 @@ tape( 'the function applies a plane rotation', function test( t ) { -3.6, // 3 -4.2, // 4 -4.8 // 4 - ] ); + ]); - out = csrot( cx.length, cx, 1, cy, 1, 0.8, 0.6 ); - isApprox( t, viewX, cxe, 2.0 ); - isApprox( t, viewY, cye, 2.0 ); - t.strictEqual( out, cy, 'returns expected value' ); + out = csrot( x.length, x, 1, y, 1, 0.8, 0.6 ); + isApprox( t, viewX, xe, 2.0 ); + isApprox( t, viewY, ye, 2.0 ); + t.strictEqual( out, y, 'returns expected value' ); t.end(); }); tape( 'the function supports an `x` stride', function test( t ) { var viewX; var viewY; - var cxe; - var cye; var out; - var cx; - var cy; + var xe; + var ye; + var x; + var y; - cx = new Complex64Array( [ + x = new Complex64Array([ 1.0, // 1 2.0, // 1 3.0, @@ -149,8 +149,8 @@ tape( 'the function supports an `x` stride', function test( t ) { 6.0, // 2 7.0, 8.0 - ] ); - cy = new Complex64Array( [ + ]); + y = new Complex64Array([ 0.0, // 1 0.0, // 1 0.0, // 2 @@ -159,12 +159,12 @@ tape( 'the function supports an `x` stride', function test( t ) { 0.0, 0.0, 0.0 - ] ); + ]); - viewX = new Float32Array( cx.buffer ); - viewY = new Float32Array( cy.buffer ); + viewX = new Float32Array( x.buffer ); + viewY = new Float32Array( y.buffer ); - cxe = new Float32Array( [ + xe = new Float32Array([ 0.8, // 1 1.6, // 1 3.0, @@ -173,8 +173,8 @@ tape( 'the function supports an `x` stride', function test( t ) { 4.8, // 2 7.0, 8.0 - ] ); - cye = new Float32Array( [ + ]); + ye = new Float32Array([ -0.6, // 1 -1.2, // 1 -3.0, // 2 @@ -183,25 +183,25 @@ tape( 'the function supports an `x` stride', function test( t ) { 0.0, 0.0, 0.0 - ] ); + ]); - out = csrot( 2, cx, 2, cy, 1, 0.8, 0.6 ); - isApprox( t, viewX, cxe, 2.0 ); - isApprox( t, viewY, cye, 2.0 ); - t.strictEqual( out, cy, 'returns expected value' ); + out = csrot( 2, x, 2, y, 1, 0.8, 0.6 ); + isApprox( t, viewX, xe, 2.0 ); + isApprox( t, viewY, ye, 2.0 ); + t.strictEqual( out, y, 'returns expected value' ); t.end(); }); tape( 'the function supports a `y` stride', function test( t ) { var viewX; var viewY; - var cxe; - var cye; var out; - var cx; - var cy; + var xe; + var ye; + var x; + var y; - cx = new Complex64Array( [ + x = new Complex64Array([ 1.0, // 1 2.0, // 1 3.0, // 2 @@ -210,8 +210,8 @@ tape( 'the function supports a `y` stride', function test( t ) { 6.0, 7.0, 8.0 - ] ); - cy = new Complex64Array( [ + ]); + y = new Complex64Array([ 0.0, // 1 0.0, // 1 0.0, @@ -220,12 +220,12 @@ tape( 'the function supports a `y` stride', function test( t ) { 0.0, // 2 0.0, 0.0 - ] ); + ]); - viewX = new Float32Array( cx.buffer ); - viewY = new Float32Array( cy.buffer ); + viewX = new Float32Array( x.buffer ); + viewY = new Float32Array( y.buffer ); - cxe = new Float32Array( [ + xe = new Float32Array([ 0.8, // 1 1.6, // 1 2.4, // 2 @@ -234,8 +234,8 @@ tape( 'the function supports a `y` stride', function test( t ) { 6.0, 7.0, 8.0 - ] ); - cye = new Float32Array( [ + ]); + ye = new Float32Array([ -0.6, // 1 -1.2, // 1 0.0, @@ -244,53 +244,53 @@ tape( 'the function supports a `y` stride', function test( t ) { -2.4, // 2 0.0, 0.0 - ] ); + ]); - out = csrot( 2, cx, 1, cy, 2, 0.8, 0.6 ); - isApprox( t, viewX, cxe, 2.0 ); - isApprox( t, viewY, cye, 2.0 ); - t.strictEqual( out, cy, 'returns expected value' ); + out = csrot( 2, x, 1, y, 2, 0.8, 0.6 ); + isApprox( t, viewX, xe, 2.0 ); + isApprox( t, viewY, ye, 2.0 ); + t.strictEqual( out, y, 'returns expected value' ); t.end(); }); tape( 'the function returns a reference to the destination array', function test( t ) { var out; - var cx; - var cy; + var x; + var y; - cx = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); - cy = new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ); + x = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); + y = new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - out = csrot( cx.length, cx, 1, cy, 1, 0.8, 0.6 ); + out = csrot( x.length, x, 1, y, 1, 0.8, 0.6 ); - t.strictEqual( out, cy, 'returns expected value' ); + t.strictEqual( out, y, 'returns expected value' ); t.end(); }); tape( 'if provided an `N` parameter less than or equal to `0`, the function returns both vectors unchanged', function test( t ) { var viewX; var viewY; - var cxe; - var cye; - var cx; - var cy; + var xe; + var ye; + var x; + var y; - cx = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); - cy = new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ); + x = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); + y = new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - viewX = new Float32Array( cx.buffer ); - viewY = new Float32Array( cy.buffer ); + viewX = new Float32Array( x.buffer ); + viewY = new Float32Array( y.buffer ); - cxe = new Float32Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); - cye = new Float32Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ); + xe = new Float32Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); + ye = new Float32Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - csrot( -1, cx, 1, cy, 1, 0.8, 0.6 ); - t.deepEqual( viewX, cxe, 'returns expected value' ); - t.deepEqual( viewY, cye, 'returns expected value' ); + csrot( -1, x, 1, y, 1, 0.8, 0.6 ); + t.deepEqual( viewX, xe, 'returns expected value' ); + t.deepEqual( viewY, ye, 'returns expected value' ); - csrot( 0, cx, 1, cy, 1, 0.8, 0.6 ); - t.deepEqual( viewX, cxe, 'returns expected value' ); - t.deepEqual( viewY, cye, 'returns expected value' ); + csrot( 0, x, 1, y, 1, 0.8, 0.6 ); + t.deepEqual( viewX, xe, 'returns expected value' ); + t.deepEqual( viewY, ye, 'returns expected value' ); t.end(); }); @@ -298,13 +298,13 @@ tape( 'if provided an `N` parameter less than or equal to `0`, the function retu tape( 'the function supports negative strides', function test( t ) { var viewX; var viewY; - var cxe; - var cye; var out; - var cx; - var cy; + var xe; + var ye; + var x; + var y; - cx = new Complex64Array( [ + x = new Complex64Array([ 1.0, // 2 2.0, // 2 3.0, // 1 @@ -313,8 +313,8 @@ tape( 'the function supports negative strides', function test( t ) { 6.0, 7.0, 8.0 - ] ); - cy = new Complex64Array( [ + ]); + y = new Complex64Array([ 0.0, // 2 0.0, // 2 0.0, @@ -323,12 +323,12 @@ tape( 'the function supports negative strides', function test( t ) { 0.0, // 1 0.0, 0.0 - ] ); + ]); - viewX = new Float32Array( cx.buffer ); - viewY = new Float32Array( cy.buffer ); + viewX = new Float32Array( x.buffer ); + viewY = new Float32Array( y.buffer ); - cxe = new Float32Array( [ + xe = new Float32Array([ 0.8, // 2 1.6, // 2 2.4, // 1 @@ -337,8 +337,8 @@ tape( 'the function supports negative strides', function test( t ) { 6.0, 7.0, 8.0 - ] ); - cye = new Float32Array( [ + ]); + ye = new Float32Array([ -0.6, // 2 -1.2, // 2 0.0, @@ -347,25 +347,25 @@ tape( 'the function supports negative strides', function test( t ) { -2.4, // 1 0.0, 0.0 - ] ); + ]); - out = csrot( 2, cx, -1, cy, -2, 0.8, 0.6 ); - isApprox( t, viewX, cxe, 2.0 ); - isApprox( t, viewY, cye, 2.0 ); - t.strictEqual( out, cy, 'returns expected value' ); + out = csrot( 2, x, -1, y, -2, 0.8, 0.6 ); + isApprox( t, viewX, xe, 2.0 ); + isApprox( t, viewY, ye, 2.0 ); + t.strictEqual( out, y, 'returns expected value' ); t.end(); }); tape( 'the function supports complex access patterns', function test( t ) { var viewX; var viewY; - var cxe; - var cye; var out; - var cx; - var cy; + var xe; + var ye; + var x; + var y; - cx = new Complex64Array( [ + x = new Complex64Array([ 1.0, // 1 2.0, // 1 3.0, @@ -374,8 +374,8 @@ tape( 'the function supports complex access patterns', function test( t ) { 6.0, // 2 7.0, 8.0 - ] ); - cy = new Complex64Array( [ + ]); + y = new Complex64Array([ 0.0, // 2 0.0, // 2 0.0, // 1 @@ -384,12 +384,12 @@ tape( 'the function supports complex access patterns', function test( t ) { 0.0, 0.0, 0.0 - ] ); + ]); - viewX = new Float32Array( cx.buffer ); - viewY = new Float32Array( cy.buffer ); + viewX = new Float32Array( x.buffer ); + viewY = new Float32Array( y.buffer ); - cxe = new Float32Array( [ + xe = new Float32Array([ 0.8, // 1 1.6, // 1 3.0, @@ -398,8 +398,8 @@ tape( 'the function supports complex access patterns', function test( t ) { 4.8, // 2 7.0, 8.0 - ] ); - cye = new Float32Array( [ + ]); + ye = new Float32Array([ -3.0, // 2 -3.6, // 2 -0.6, // 1 @@ -408,28 +408,28 @@ tape( 'the function supports complex access patterns', function test( t ) { 0.0, 0.0, 0.0 - ] ); + ]); - out = csrot( 2, cx, 2, cy, -1, 0.8, 0.6 ); - isApprox( t, viewX, cxe, 2.0 ); - isApprox( t, viewY, cye, 2.0 ); - t.strictEqual( out, cy, 'returns expected value' ); + out = csrot( 2, x, 2, y, -1, 0.8, 0.6 ); + isApprox( t, viewX, xe, 2.0 ); + isApprox( t, viewY, ye, 2.0 ); + t.strictEqual( out, y, 'returns expected value' ); t.end(); }); tape( 'the function supports view offsets', function test( t ) { var viewX; var viewY; - var cx0; - var cy0; - var cx1; - var cy1; - var cxe; - var cye; var out; + var x0; + var y0; + var x1; + var y1; + var xe; + var ye; // Initial arrays... - cx0 = new Complex64Array([ + x0 = new Complex64Array([ 1.0, 2.0, 3.0, // 2 @@ -439,7 +439,7 @@ tape( 'the function supports view offsets', function test( t ) { 7.0, // 1 8.0 // 1 ]); - cy0 = new Complex64Array([ + y0 = new Complex64Array([ 0.0, 0.0, 0.0, @@ -451,13 +451,13 @@ tape( 'the function supports view offsets', function test( t ) { ]); // Create offset views... - cx1 = new Complex64Array( cx0.buffer, cx0.BYTES_PER_ELEMENT*1 ); // begin at the 2nd element - cy1 = new Complex64Array( cy0.buffer, cy0.BYTES_PER_ELEMENT*2 ); // begin at the 3rd element + x1 = new Complex64Array( x0.buffer, x0.BYTES_PER_ELEMENT*1 ); // begin at the 2nd element + y1 = new Complex64Array( y0.buffer, y0.BYTES_PER_ELEMENT*2 ); // begin at the 3rd element - viewX = new Float32Array( cx0.buffer ); - viewY = new Float32Array( cy0.buffer ); + viewX = new Float32Array( x0.buffer ); + viewY = new Float32Array( y0.buffer ); - cxe = new Float32Array( [ + xe = new Float32Array([ 1.0, 2.0, 2.4, // 2 @@ -466,8 +466,8 @@ tape( 'the function supports view offsets', function test( t ) { 6.0, 5.6, // 1 6.4 // 1 - ] ); - cye = new Float32Array( [ + ]); + ye = new Float32Array([ 0.0, 0.0, 0.0, @@ -476,11 +476,11 @@ tape( 'the function supports view offsets', function test( t ) { -4.8, // 1 -1.8, // 2 -2.4 // 2 - ] ); + ]); - out = csrot( 2, cx1, -2, cy1, 1, 0.8, 0.6 ); - isApprox( t, viewX, cxe, 2.0 ); - isApprox( t, viewY, cye, 2.0 ); - t.strictEqual( out, cy1, 'returns expected value' ); + out = csrot( 2, x1, -2, y1, 1, 0.8, 0.6 ); + isApprox( t, viewX, xe, 2.0 ); + isApprox( t, viewY, ye, 2.0 ); + t.strictEqual( out, y1, 'returns expected value' ); t.end(); }); diff --git a/lib/node_modules/@stdlib/blas/base/csrot/test/test.csrot.native.js b/lib/node_modules/@stdlib/blas/base/csrot/test/test.csrot.native.js index 04590973af36..9de68f54e8fb 100644 --- a/lib/node_modules/@stdlib/blas/base/csrot/test/test.csrot.native.js +++ b/lib/node_modules/@stdlib/blas/base/csrot/test/test.csrot.native.js @@ -82,13 +82,13 @@ tape( 'the function has an arity of 7', opts, function test( t ) { tape( 'the function applies a plane rotation', opts, function test( t ) { var viewX; var viewY; - var cxe; - var cye; var out; - var cx; - var cy; + var xe; + var ye; + var x; + var y; - cx = new Complex64Array( [ + x = new Complex64Array([ 1.0, // 1 2.0, // 1 3.0, // 2 @@ -97,8 +97,8 @@ tape( 'the function applies a plane rotation', opts, function test( t ) { 6.0, // 3 7.0, // 4 8.0 // 4 - ] ); - cy = new Complex64Array( [ + ]); + y = new Complex64Array([ 0.0, // 1 0.0, // 1 0.0, // 2 @@ -107,12 +107,12 @@ tape( 'the function applies a plane rotation', opts, function test( t ) { 0.0, // 3 0.0, // 4 0.0 // 4 - ] ); + ]); - viewX = new Float32Array( cx.buffer ); - viewY = new Float32Array( cy.buffer ); + viewX = new Float32Array( x.buffer ); + viewY = new Float32Array( y.buffer ); - cxe = new Float32Array( [ + xe = new Float32Array([ 0.8, // 1 1.6, // 1 2.4, // 2 @@ -121,8 +121,8 @@ tape( 'the function applies a plane rotation', opts, function test( t ) { 4.8, // 3 5.6, // 4 6.4 // 4 - ] ); - cye = new Float32Array( [ + ]); + ye = new Float32Array([ -0.6, // 1 -1.2, // 1 -1.8, // 2 @@ -131,25 +131,25 @@ tape( 'the function applies a plane rotation', opts, function test( t ) { -3.6, // 3 -4.2, // 4 -4.8 // 4 - ] ); + ]); - out = csrot( cx.length, cx, 1, cy, 1, 0.8, 0.6 ); - isApprox( t, viewX, cxe, 2.0 ); - isApprox( t, viewY, cye, 2.0 ); - t.strictEqual( out, cy, 'returns expected value' ); + out = csrot( x.length, x, 1, y, 1, 0.8, 0.6 ); + isApprox( t, viewX, xe, 2.0 ); + isApprox( t, viewY, ye, 2.0 ); + t.strictEqual( out, y, 'returns expected value' ); t.end(); }); tape( 'the function supports an `x` stride', opts, function test( t ) { var viewX; var viewY; - var cxe; - var cye; var out; - var cx; - var cy; + var xe; + var ye; + var x; + var y; - cx = new Complex64Array( [ + x = new Complex64Array([ 1.0, // 1 2.0, // 1 3.0, @@ -158,8 +158,8 @@ tape( 'the function supports an `x` stride', opts, function test( t ) { 6.0, // 2 7.0, 8.0 - ] ); - cy = new Complex64Array( [ + ]); + y = new Complex64Array([ 0.0, // 1 0.0, // 1 0.0, // 2 @@ -168,12 +168,12 @@ tape( 'the function supports an `x` stride', opts, function test( t ) { 0.0, 0.0, 0.0 - ] ); + ]); - viewX = new Float32Array( cx.buffer ); - viewY = new Float32Array( cy.buffer ); + viewX = new Float32Array( x.buffer ); + viewY = new Float32Array( y.buffer ); - cxe = new Float32Array( [ + xe = new Float32Array([ 0.8, // 1 1.6, // 1 3.0, @@ -182,8 +182,8 @@ tape( 'the function supports an `x` stride', opts, function test( t ) { 4.8, // 2 7.0, 8.0 - ] ); - cye = new Float32Array( [ + ]); + ye = new Float32Array([ -0.6, // 1 -1.2, // 1 -3.0, // 2 @@ -192,25 +192,25 @@ tape( 'the function supports an `x` stride', opts, function test( t ) { 0.0, 0.0, 0.0 - ] ); + ]); - out = csrot( 2, cx, 2, cy, 1, 0.8, 0.6 ); - isApprox( t, viewX, cxe, 2.0 ); - isApprox( t, viewY, cye, 2.0 ); - t.strictEqual( out, cy, 'returns expected value' ); + out = csrot( 2, x, 2, y, 1, 0.8, 0.6 ); + isApprox( t, viewX, xe, 2.0 ); + isApprox( t, viewY, ye, 2.0 ); + t.strictEqual( out, y, 'returns expected value' ); t.end(); }); tape( 'the function supports a `y` stride', opts, function test( t ) { var viewX; var viewY; - var cxe; - var cye; var out; - var cx; - var cy; + var xe; + var ye; + var x; + var y; - cx = new Complex64Array( [ + x = new Complex64Array([ 1.0, // 1 2.0, // 1 3.0, // 2 @@ -219,8 +219,8 @@ tape( 'the function supports a `y` stride', opts, function test( t ) { 6.0, 7.0, 8.0 - ] ); - cy = new Complex64Array( [ + ]); + y = new Complex64Array([ 0.0, // 1 0.0, // 1 0.0, @@ -229,12 +229,12 @@ tape( 'the function supports a `y` stride', opts, function test( t ) { 0.0, // 2 0.0, 0.0 - ] ); + ]); - viewX = new Float32Array( cx.buffer ); - viewY = new Float32Array( cy.buffer ); + viewX = new Float32Array( x.buffer ); + viewY = new Float32Array( y.buffer ); - cxe = new Float32Array( [ + xe = new Float32Array([ 0.8, // 1 1.6, // 1 2.4, // 2 @@ -243,8 +243,8 @@ tape( 'the function supports a `y` stride', opts, function test( t ) { 6.0, 7.0, 8.0 - ] ); - cye = new Float32Array( [ + ]); + ye = new Float32Array([ -0.6, // 1 -1.2, // 1 0.0, @@ -253,53 +253,53 @@ tape( 'the function supports a `y` stride', opts, function test( t ) { -2.4, // 2 0.0, 0.0 - ] ); + ]); - out = csrot( 2, cx, 1, cy, 2, 0.8, 0.6 ); - isApprox( t, viewX, cxe, 2.0 ); - isApprox( t, viewY, cye, 2.0 ); - t.strictEqual( out, cy, 'returns expected value' ); + out = csrot( 2, x, 1, y, 2, 0.8, 0.6 ); + isApprox( t, viewX, xe, 2.0 ); + isApprox( t, viewY, ye, 2.0 ); + t.strictEqual( out, y, 'returns expected value' ); t.end(); }); tape( 'the function returns a reference to the destination array', opts, function test( t ) { var out; - var cx; - var cy; + var x; + var y; - cx = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); - cy = new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ); + x = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); + y = new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - out = csrot( cx.length, cx, 1, cy, 1, 0.8, 0.6 ); + out = csrot( x.length, x, 1, y, 1, 0.8, 0.6 ); - t.strictEqual( out, cy, 'returns expected value' ); + t.strictEqual( out, y, 'returns expected value' ); t.end(); }); tape( 'if provided an `N` parameter less than or equal to `0`, the function returns both vectors unchanged', opts, function test( t ) { var viewX; var viewY; - var cxe; - var cye; - var cx; - var cy; + var xe; + var ye; + var x; + var y; - cx = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); - cy = new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ); + x = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); + y = new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - viewX = new Float32Array( cx.buffer ); - viewY = new Float32Array( cy.buffer ); + viewX = new Float32Array( x.buffer ); + viewY = new Float32Array( y.buffer ); - cxe = new Float32Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); - cye = new Float32Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ); + xe = new Float32Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); + ye = new Float32Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - csrot( -1, cx, 1, cy, 1, 0.8, 0.6 ); - t.deepEqual( viewX, cxe, 'returns expected value' ); - t.deepEqual( viewY, cye, 'returns expected value' ); + csrot( -1, x, 1, y, 1, 0.8, 0.6 ); + t.deepEqual( viewX, xe, 'returns expected value' ); + t.deepEqual( viewY, ye, 'returns expected value' ); - csrot( 0, cx, 1, cy, 1, 0.8, 0.6 ); - t.deepEqual( viewX, cxe, 'returns expected value' ); - t.deepEqual( viewY, cye, 'returns expected value' ); + csrot( 0, x, 1, y, 1, 0.8, 0.6 ); + t.deepEqual( viewX, xe, 'returns expected value' ); + t.deepEqual( viewY, ye, 'returns expected value' ); t.end(); }); @@ -307,13 +307,13 @@ tape( 'if provided an `N` parameter less than or equal to `0`, the function retu tape( 'the function supports negative strides', opts, function test( t ) { var viewX; var viewY; - var cxe; - var cye; var out; - var cx; - var cy; + var xe; + var ye; + var x; + var y; - cx = new Complex64Array( [ + x = new Complex64Array([ 1.0, // 2 2.0, // 2 3.0, // 1 @@ -322,8 +322,8 @@ tape( 'the function supports negative strides', opts, function test( t ) { 6.0, 7.0, 8.0 - ] ); - cy = new Complex64Array( [ + ]); + y = new Complex64Array([ 0.0, // 2 0.0, // 2 0.0, @@ -332,12 +332,12 @@ tape( 'the function supports negative strides', opts, function test( t ) { 0.0, // 1 0.0, 0.0 - ] ); + ]); - viewX = new Float32Array( cx.buffer ); - viewY = new Float32Array( cy.buffer ); + viewX = new Float32Array( x.buffer ); + viewY = new Float32Array( y.buffer ); - cxe = new Float32Array( [ + xe = new Float32Array([ 0.8, // 2 1.6, // 2 2.4, // 1 @@ -346,8 +346,8 @@ tape( 'the function supports negative strides', opts, function test( t ) { 6.0, 7.0, 8.0 - ] ); - cye = new Float32Array( [ + ]); + ye = new Float32Array([ -0.6, // 2 -1.2, // 2 0.0, @@ -356,25 +356,25 @@ tape( 'the function supports negative strides', opts, function test( t ) { -2.4, // 1 0.0, 0.0 - ] ); + ]); - out = csrot( 2, cx, -1, cy, -2, 0.8, 0.6 ); - isApprox( t, viewX, cxe, 2.0 ); - isApprox( t, viewY, cye, 2.0 ); - t.strictEqual( out, cy, 'returns expected value' ); + out = csrot( 2, x, -1, y, -2, 0.8, 0.6 ); + isApprox( t, viewX, xe, 2.0 ); + isApprox( t, viewY, ye, 2.0 ); + t.strictEqual( out, y, 'returns expected value' ); t.end(); }); tape( 'the function supports complex access patterns', opts, function test( t ) { var viewX; var viewY; - var cxe; - var cye; var out; - var cx; - var cy; + var xe; + var ye; + var x; + var y; - cx = new Complex64Array( [ + x = new Complex64Array([ 1.0, // 1 2.0, // 1 3.0, @@ -383,8 +383,8 @@ tape( 'the function supports complex access patterns', opts, function test( t ) 6.0, // 2 7.0, 8.0 - ] ); - cy = new Complex64Array( [ + ]); + y = new Complex64Array([ 0.0, // 2 0.0, // 2 0.0, // 1 @@ -393,12 +393,12 @@ tape( 'the function supports complex access patterns', opts, function test( t ) 0.0, 0.0, 0.0 - ] ); + ]); - viewX = new Float32Array( cx.buffer ); - viewY = new Float32Array( cy.buffer ); + viewX = new Float32Array( x.buffer ); + viewY = new Float32Array( y.buffer ); - cxe = new Float32Array( [ + xe = new Float32Array([ 0.8, // 1 1.6, // 1 3.0, @@ -407,8 +407,8 @@ tape( 'the function supports complex access patterns', opts, function test( t ) 4.8, // 2 7.0, 8.0 - ] ); - cye = new Float32Array( [ + ]); + ye = new Float32Array([ -3.0, // 2 -3.6, // 2 -0.6, // 1 @@ -417,28 +417,28 @@ tape( 'the function supports complex access patterns', opts, function test( t ) 0.0, 0.0, 0.0 - ] ); + ]); - out = csrot( 2, cx, 2, cy, -1, 0.8, 0.6 ); - isApprox( t, viewX, cxe, 2.0 ); - isApprox( t, viewY, cye, 2.0 ); - t.strictEqual( out, cy, 'returns expected value' ); + out = csrot( 2, x, 2, y, -1, 0.8, 0.6 ); + isApprox( t, viewX, xe, 2.0 ); + isApprox( t, viewY, ye, 2.0 ); + t.strictEqual( out, y, 'returns expected value' ); t.end(); }); tape( 'the function supports view offsets', opts, function test( t ) { var viewX; var viewY; - var cx0; - var cy0; - var cx1; - var cy1; - var cxe; - var cye; var out; + var x0; + var y0; + var x1; + var y1; + var xe; + var ye; // Initial arrays... - cx0 = new Complex64Array([ + x0 = new Complex64Array([ 1.0, 2.0, 3.0, // 2 @@ -448,7 +448,7 @@ tape( 'the function supports view offsets', opts, function test( t ) { 7.0, // 1 8.0 // 1 ]); - cy0 = new Complex64Array([ + y0 = new Complex64Array([ 0.0, 0.0, 0.0, @@ -460,13 +460,13 @@ tape( 'the function supports view offsets', opts, function test( t ) { ]); // Create offset views... - cx1 = new Complex64Array( cx0.buffer, cx0.BYTES_PER_ELEMENT*1 ); // begin at the 2nd element - cy1 = new Complex64Array( cy0.buffer, cy0.BYTES_PER_ELEMENT*2 ); // begin at the 3rd element + x1 = new Complex64Array( x0.buffer, x0.BYTES_PER_ELEMENT*1 ); // begin at the 2nd element + y1 = new Complex64Array( y0.buffer, y0.BYTES_PER_ELEMENT*2 ); // begin at the 3rd element - viewX = new Float32Array( cx0.buffer ); - viewY = new Float32Array( cy0.buffer ); + viewX = new Float32Array( x0.buffer ); + viewY = new Float32Array( y0.buffer ); - cxe = new Float32Array( [ + xe = new Float32Array([ 1.0, 2.0, 2.4, // 2 @@ -475,8 +475,8 @@ tape( 'the function supports view offsets', opts, function test( t ) { 6.0, 5.6, // 1 6.4 // 1 - ] ); - cye = new Float32Array( [ + ]); + ye = new Float32Array([ 0.0, 0.0, 0.0, @@ -485,11 +485,11 @@ tape( 'the function supports view offsets', opts, function test( t ) { -4.8, // 1 -1.8, // 2 -2.4 // 2 - ] ); + ]); - out = csrot( 2, cx1, -2, cy1, 1, 0.8, 0.6 ); - isApprox( t, viewX, cxe, 2.0 ); - isApprox( t, viewY, cye, 2.0 ); - t.strictEqual( out, cy1, 'returns expected value' ); + out = csrot( 2, x1, -2, y1, 1, 0.8, 0.6 ); + isApprox( t, viewX, xe, 2.0 ); + isApprox( t, viewY, ye, 2.0 ); + t.strictEqual( out, y1, 'returns expected value' ); t.end(); }); diff --git a/lib/node_modules/@stdlib/blas/base/csrot/test/test.ndarray.js b/lib/node_modules/@stdlib/blas/base/csrot/test/test.ndarray.js index 0d9db71b4727..df1dc65d210d 100644 --- a/lib/node_modules/@stdlib/blas/base/csrot/test/test.ndarray.js +++ b/lib/node_modules/@stdlib/blas/base/csrot/test/test.ndarray.js @@ -73,13 +73,13 @@ tape( 'the function has an arity of 9', function test( t ) { tape( 'the function applies a plane rotation', function test( t ) { var viewX; var viewY; - var cxe; - var cye; var out; - var cx; - var cy; + var xe; + var ye; + var x; + var y; - cx = new Complex64Array( [ + x = new Complex64Array([ 1.0, // 1 2.0, // 1 3.0, // 2 @@ -88,8 +88,8 @@ tape( 'the function applies a plane rotation', function test( t ) { 6.0, // 3 7.0, // 4 8.0 // 4 - ] ); - cy = new Complex64Array( [ + ]); + y = new Complex64Array([ 0.0, // 1 0.0, // 1 0.0, // 2 @@ -98,12 +98,12 @@ tape( 'the function applies a plane rotation', function test( t ) { 0.0, // 3 0.0, // 4 0.0 // 4 - ] ); + ]); - viewX = new Float32Array( cx.buffer ); - viewY = new Float32Array( cy.buffer ); + viewX = new Float32Array( x.buffer ); + viewY = new Float32Array( y.buffer ); - cxe = new Float32Array( [ + xe = new Float32Array([ 0.8, // 1 1.6, // 1 2.4, // 2 @@ -112,8 +112,8 @@ tape( 'the function applies a plane rotation', function test( t ) { 4.8, // 3 5.6, // 4 6.4 // 4 - ] ); - cye = new Float32Array( [ + ]); + ye = new Float32Array([ -0.6, // 1 -1.2, // 1 -1.8, // 2 @@ -122,25 +122,25 @@ tape( 'the function applies a plane rotation', function test( t ) { -3.6, // 3 -4.2, // 4 -4.8 // 4 - ] ); + ]); - out = csrot( cx.length, cx, 1, 0, cy, 1, 0, 0.8, 0.6 ); - isApprox( t, viewX, cxe, 2.0 ); - isApprox( t, viewY, cye, 2.0 ); - t.strictEqual( out, cy, 'returns expected value' ); + out = csrot( x.length, x, 1, 0, y, 1, 0, 0.8, 0.6 ); + isApprox( t, viewX, xe, 2.0 ); + isApprox( t, viewY, ye, 2.0 ); + t.strictEqual( out, y, 'returns expected value' ); t.end(); }); tape( 'the function supports an `x` stride', function test( t ) { var viewX; var viewY; - var cxe; - var cye; var out; - var cx; - var cy; + var xe; + var ye; + var x; + var y; - cx = new Complex64Array( [ + x = new Complex64Array([ 1.0, // 1 2.0, // 1 3.0, @@ -149,8 +149,8 @@ tape( 'the function supports an `x` stride', function test( t ) { 6.0, // 2 7.0, 8.0 - ] ); - cy = new Complex64Array( [ + ]); + y = new Complex64Array([ 0.0, // 1 0.0, // 1 0.0, // 2 @@ -159,12 +159,12 @@ tape( 'the function supports an `x` stride', function test( t ) { 0.0, 0.0, 0.0 - ] ); + ]); - viewX = new Float32Array( cx.buffer ); - viewY = new Float32Array( cy.buffer ); + viewX = new Float32Array( x.buffer ); + viewY = new Float32Array( y.buffer ); - cxe = new Float32Array( [ + xe = new Float32Array([ 0.8, // 1 1.6, // 1 3.0, @@ -173,8 +173,8 @@ tape( 'the function supports an `x` stride', function test( t ) { 4.8, // 2 7.0, 8.0 - ] ); - cye = new Float32Array( [ + ]); + ye = new Float32Array([ -0.6, // 1 -1.2, // 1 -3.0, // 2 @@ -183,25 +183,25 @@ tape( 'the function supports an `x` stride', function test( t ) { 0.0, 0.0, 0.0 - ] ); + ]); - out = csrot( 2, cx, 2, 0, cy, 1, 0, 0.8, 0.6 ); - isApprox( t, viewX, cxe, 2.0 ); - isApprox( t, viewY, cye, 2.0 ); - t.strictEqual( out, cy, 'returns expected value' ); + out = csrot( 2, x, 2, 0, y, 1, 0, 0.8, 0.6 ); + isApprox( t, viewX, xe, 2.0 ); + isApprox( t, viewY, ye, 2.0 ); + t.strictEqual( out, y, 'returns expected value' ); t.end(); }); tape( 'the function supports an `x` offset', function test( t ) { var viewX; var viewY; - var cxe; - var cye; var out; - var cx; - var cy; + var xe; + var ye; + var x; + var y; - cx = new Complex64Array( [ + x = new Complex64Array([ 1.0, 2.0, 3.0, // 1 @@ -210,8 +210,8 @@ tape( 'the function supports an `x` offset', function test( t ) { 6.0, // 2 7.0, // 3 8.0 // 3 - ] ); - cy = new Complex64Array( [ + ]); + y = new Complex64Array([ 0.0, // 1 0.0, // 1 0.0, // 2 @@ -220,12 +220,12 @@ tape( 'the function supports an `x` offset', function test( t ) { 0.0, // 3 0.0, 0.0 - ] ); + ]); - viewX = new Float32Array( cx.buffer ); - viewY = new Float32Array( cy.buffer ); + viewX = new Float32Array( x.buffer ); + viewY = new Float32Array( y.buffer ); - cxe = new Float32Array( [ + xe = new Float32Array([ 1.0, 2.0, 2.4, // 1 @@ -234,8 +234,8 @@ tape( 'the function supports an `x` offset', function test( t ) { 4.8, // 2 5.6, // 3 6.4 // 3 - ] ); - cye = new Float32Array( [ + ]); + ye = new Float32Array([ -1.8, // 1 -2.4, // 1 -3.0, // 2 @@ -244,25 +244,25 @@ tape( 'the function supports an `x` offset', function test( t ) { -4.8, // 3 0.0, 0.0 - ] ); + ]); - out = csrot( 3, cx, 1, 1, cy, 1, 0, 0.8, 0.6 ); - isApprox( t, viewX, cxe, 2.0 ); - isApprox( t, viewY, cye, 2.0 ); - t.strictEqual( out, cy, 'returns expected value' ); + out = csrot( 3, x, 1, 1, y, 1, 0, 0.8, 0.6 ); + isApprox( t, viewX, xe, 2.0 ); + isApprox( t, viewY, ye, 2.0 ); + t.strictEqual( out, y, 'returns expected value' ); t.end(); }); tape( 'the function supports a `y` stride', function test( t ) { var viewX; var viewY; - var cxe; - var cye; var out; - var cx; - var cy; + var xe; + var ye; + var x; + var y; - cx = new Complex64Array( [ + x = new Complex64Array([ 1.0, // 1 2.0, // 1 3.0, // 2 @@ -271,8 +271,8 @@ tape( 'the function supports a `y` stride', function test( t ) { 6.0, 7.0, 8.0 - ] ); - cy = new Complex64Array( [ + ]); + y = new Complex64Array([ 0.0, // 1 0.0, // 1 0.0, @@ -281,12 +281,12 @@ tape( 'the function supports a `y` stride', function test( t ) { 0.0, // 2 0.0, 0.0 - ] ); + ]); - viewX = new Float32Array( cx.buffer ); - viewY = new Float32Array( cy.buffer ); + viewX = new Float32Array( x.buffer ); + viewY = new Float32Array( y.buffer ); - cxe = new Float32Array( [ + xe = new Float32Array([ 0.8, // 1 1.6, // 1 2.4, // 2 @@ -295,8 +295,8 @@ tape( 'the function supports a `y` stride', function test( t ) { 6.0, 7.0, 8.0 - ] ); - cye = new Float32Array( [ + ]); + ye = new Float32Array([ -0.6, // 1 -1.2, // 1 0.0, @@ -305,25 +305,25 @@ tape( 'the function supports a `y` stride', function test( t ) { -2.4, // 2 0.0, 0.0 - ] ); + ]); - out = csrot( 2, cx, 1, 0, cy, 2, 0, 0.8, 0.6 ); - isApprox( t, viewX, cxe, 2.0 ); - isApprox( t, viewY, cye, 2.0 ); - t.strictEqual( out, cy, 'returns expected value' ); + out = csrot( 2, x, 1, 0, y, 2, 0, 0.8, 0.6 ); + isApprox( t, viewX, xe, 2.0 ); + isApprox( t, viewY, ye, 2.0 ); + t.strictEqual( out, y, 'returns expected value' ); t.end(); }); tape( 'the function supports a `y` offset', function test( t ) { var viewX; var viewY; - var cxe; - var cye; var out; - var cx; - var cy; + var xe; + var ye; + var x; + var y; - cx = new Complex64Array( [ + x = new Complex64Array([ 1.0, // 1 2.0, // 1 3.0, @@ -332,8 +332,8 @@ tape( 'the function supports a `y` offset', function test( t ) { 6.0, // 2 7.0, 8.0 - ] ); - cy = new Complex64Array( [ + ]); + y = new Complex64Array([ 0.0, // 2 0.0, // 2 0.0, // 1 @@ -342,12 +342,12 @@ tape( 'the function supports a `y` offset', function test( t ) { 0.0, 0.0, 0.0 - ] ); + ]); - viewX = new Float32Array( cx.buffer ); - viewY = new Float32Array( cy.buffer ); + viewX = new Float32Array( x.buffer ); + viewY = new Float32Array( y.buffer ); - cxe = new Float32Array( [ + xe = new Float32Array([ 0.8, // 1 1.6, // 1 3.0, @@ -356,8 +356,8 @@ tape( 'the function supports a `y` offset', function test( t ) { 4.8, // 2 7.0, 8.0 - ] ); - cye = new Float32Array( [ + ]); + ye = new Float32Array([ -3.0, // 2 -3.6, // 2 -0.6, // 1 @@ -366,53 +366,53 @@ tape( 'the function supports a `y` offset', function test( t ) { 0.0, 0.0, 0.0 - ] ); + ]); - out = csrot( 2, cx, 2, 0, cy, -1, 1, 0.8, 0.6 ); - isApprox( t, viewX, cxe, 2.0 ); - isApprox( t, viewY, cye, 2.0 ); - t.strictEqual( out, cy, 'returns expected value' ); + out = csrot( 2, x, 2, 0, y, -1, 1, 0.8, 0.6 ); + isApprox( t, viewX, xe, 2.0 ); + isApprox( t, viewY, ye, 2.0 ); + t.strictEqual( out, y, 'returns expected value' ); t.end(); }); tape( 'the function returns a reference to the destination array', function test( t ) { var out; - var cx; - var cy; + var x; + var y; - cx = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); - cy = new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ); + x = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); + y = new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - out = csrot( cx.length, cx, 1, 0, cy, 1, 0, 0.8, 0.6 ); + out = csrot( x.length, x, 1, 0, y, 1, 0, 0.8, 0.6 ); - t.strictEqual( out, cy, 'returns expected value' ); + t.strictEqual( out, y, 'returns expected value' ); t.end(); }); tape( 'if provided an `N` parameter less than or equal to `0`, the function returns both vectors unchanged', function test( t ) { var viewX; var viewY; - var cxe; - var cye; - var cx; - var cy; + var xe; + var ye; + var x; + var y; - cx = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); - cy = new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ); + x = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); + y = new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - viewX = new Float32Array( cx.buffer ); - viewY = new Float32Array( cy.buffer ); + viewX = new Float32Array( x.buffer ); + viewY = new Float32Array( y.buffer ); - cxe = new Float32Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); - cye = new Float32Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ); + xe = new Float32Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); + ye = new Float32Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - csrot( -1, cx, 1, 0, cy, 1, 0, 0.8, 0.6 ); - t.deepEqual( viewX, cxe, 'returns expected value' ); - t.deepEqual( viewY, cye, 'returns expected value' ); + csrot( -1, x, 1, 0, y, 1, 0, 0.8, 0.6 ); + t.deepEqual( viewX, xe, 'returns expected value' ); + t.deepEqual( viewY, ye, 'returns expected value' ); - csrot( 0, cx, 1, 0, cy, 1, 0, 0.8, 0.6 ); - t.deepEqual( viewX, cxe, 'returns expected value' ); - t.deepEqual( viewY, cye, 'returns expected value' ); + csrot( 0, x, 1, 0, y, 1, 0, 0.8, 0.6 ); + t.deepEqual( viewX, xe, 'returns expected value' ); + t.deepEqual( viewY, ye, 'returns expected value' ); t.end(); }); @@ -420,13 +420,13 @@ tape( 'if provided an `N` parameter less than or equal to `0`, the function retu tape( 'the function supports negative strides', function test( t ) { var viewX; var viewY; - var cxe; - var cye; var out; - var cx; - var cy; + var xe; + var ye; + var x; + var y; - cx = new Complex64Array( [ + x = new Complex64Array([ 1.0, // 2 2.0, // 2 3.0, // 1 @@ -435,8 +435,8 @@ tape( 'the function supports negative strides', function test( t ) { 6.0, 7.0, 8.0 - ] ); - cy = new Complex64Array( [ + ]); + y = new Complex64Array([ 0.0, // 2 0.0, // 2 0.0, @@ -445,12 +445,12 @@ tape( 'the function supports negative strides', function test( t ) { 0.0, // 1 0.0, 0.0 - ] ); + ]); - viewX = new Float32Array( cx.buffer ); - viewY = new Float32Array( cy.buffer ); + viewX = new Float32Array( x.buffer ); + viewY = new Float32Array( y.buffer ); - cxe = new Float32Array( [ + xe = new Float32Array([ 0.8, // 2 1.6, // 2 2.4, // 1 @@ -459,8 +459,8 @@ tape( 'the function supports negative strides', function test( t ) { 6.0, 7.0, 8.0 - ] ); - cye = new Float32Array( [ + ]); + ye = new Float32Array([ -0.6, // 2 -1.2, // 2 0.0, @@ -469,25 +469,25 @@ tape( 'the function supports negative strides', function test( t ) { -2.4, // 1 0.0, 0.0 - ] ); + ]); - out = csrot( 2, cx, -1, 1, cy, -2, 2, 0.8, 0.6 ); - isApprox( t, viewX, cxe, 2.0 ); - isApprox( t, viewY, cye, 2.0 ); - t.strictEqual( out, cy, 'returns expected value' ); + out = csrot( 2, x, -1, 1, y, -2, 2, 0.8, 0.6 ); + isApprox( t, viewX, xe, 2.0 ); + isApprox( t, viewY, ye, 2.0 ); + t.strictEqual( out, y, 'returns expected value' ); t.end(); }); tape( 'the function supports complex access patterns', function test( t ) { var viewX; var viewY; - var cxe; - var cye; var out; - var cx; - var cy; + var xe; + var ye; + var x; + var y; - cx = new Complex64Array( [ + x = new Complex64Array([ 1.0, // 1 2.0, // 1 3.0, @@ -496,8 +496,8 @@ tape( 'the function supports complex access patterns', function test( t ) { 6.0, // 2 7.0, 8.0 - ] ); - cy = new Complex64Array( [ + ]); + y = new Complex64Array([ 0.0, // 1 0.0, // 1 0.0, // 2 @@ -506,12 +506,12 @@ tape( 'the function supports complex access patterns', function test( t ) { 0.0, 0.0, 0.0 - ] ); + ]); - viewX = new Float32Array( cx.buffer ); - viewY = new Float32Array( cy.buffer ); + viewX = new Float32Array( x.buffer ); + viewY = new Float32Array( y.buffer ); - cxe = new Float32Array( [ + xe = new Float32Array([ 1.0, 2.0, 2.4, // 1 @@ -520,8 +520,8 @@ tape( 'the function supports complex access patterns', function test( t ) { 6.0, 5.6, // 2 6.4 // 2 - ] ); - cye = new Float32Array( [ + ]); + ye = new Float32Array([ 0.0, 0.0, 0.0, @@ -530,11 +530,11 @@ tape( 'the function supports complex access patterns', function test( t ) { -2.4, // 1 -4.2, // 2 -4.8 // 2 - ] ); + ]); - out = csrot( 2, cx, 2, 1, cy, 1, 2, 0.8, 0.6 ); - isApprox( t, viewX, cxe, 2.0 ); - isApprox( t, viewY, cye, 2.0 ); - t.strictEqual( out, cy, 'returns expected value' ); + out = csrot( 2, x, 2, 1, y, 1, 2, 0.8, 0.6 ); + isApprox( t, viewX, xe, 2.0 ); + isApprox( t, viewY, ye, 2.0 ); + t.strictEqual( out, y, 'returns expected value' ); t.end(); }); diff --git a/lib/node_modules/@stdlib/blas/base/csrot/test/test.ndarray.native.js b/lib/node_modules/@stdlib/blas/base/csrot/test/test.ndarray.native.js index 4f1ef061e22c..8393e6bf5354 100644 --- a/lib/node_modules/@stdlib/blas/base/csrot/test/test.ndarray.native.js +++ b/lib/node_modules/@stdlib/blas/base/csrot/test/test.ndarray.native.js @@ -82,13 +82,13 @@ tape( 'the function has an arity of 9', opts, function test( t ) { tape( 'the function applies a plane rotation', opts, function test( t ) { var viewX; var viewY; - var cxe; - var cye; var out; - var cx; - var cy; + var xe; + var ye; + var x; + var y; - cx = new Complex64Array( [ + x = new Complex64Array([ 1.0, // 1 2.0, // 1 3.0, // 2 @@ -97,8 +97,8 @@ tape( 'the function applies a plane rotation', opts, function test( t ) { 6.0, // 3 7.0, // 4 8.0 // 4 - ] ); - cy = new Complex64Array( [ + ]); + y = new Complex64Array([ 0.0, // 1 0.0, // 1 0.0, // 2 @@ -107,12 +107,12 @@ tape( 'the function applies a plane rotation', opts, function test( t ) { 0.0, // 3 0.0, // 4 0.0 // 4 - ] ); + ]); - viewX = new Float32Array( cx.buffer ); - viewY = new Float32Array( cy.buffer ); + viewX = new Float32Array( x.buffer ); + viewY = new Float32Array( y.buffer ); - cxe = new Float32Array( [ + xe = new Float32Array([ 0.8, // 1 1.6, // 1 2.4, // 2 @@ -121,8 +121,8 @@ tape( 'the function applies a plane rotation', opts, function test( t ) { 4.8, // 3 5.6, // 4 6.4 // 4 - ] ); - cye = new Float32Array( [ + ]); + ye = new Float32Array([ -0.6, // 1 -1.2, // 1 -1.8, // 2 @@ -131,25 +131,25 @@ tape( 'the function applies a plane rotation', opts, function test( t ) { -3.6, // 3 -4.2, // 4 -4.8 // 4 - ] ); + ]); - out = csrot( cx.length, cx, 1, 0, cy, 1, 0, 0.8, 0.6 ); - isApprox( t, viewX, cxe, 2.0 ); - isApprox( t, viewY, cye, 2.0 ); - t.strictEqual( out, cy, 'returns expected value' ); + out = csrot( x.length, x, 1, 0, y, 1, 0, 0.8, 0.6 ); + isApprox( t, viewX, xe, 2.0 ); + isApprox( t, viewY, ye, 2.0 ); + t.strictEqual( out, y, 'returns expected value' ); t.end(); }); tape( 'the function supports an `x` stride', opts, function test( t ) { var viewX; var viewY; - var cxe; - var cye; var out; - var cx; - var cy; + var xe; + var ye; + var x; + var y; - cx = new Complex64Array( [ + x = new Complex64Array([ 1.0, // 1 2.0, // 1 3.0, @@ -158,8 +158,8 @@ tape( 'the function supports an `x` stride', opts, function test( t ) { 6.0, // 2 7.0, 8.0 - ] ); - cy = new Complex64Array( [ + ]); + y = new Complex64Array([ 0.0, // 1 0.0, // 1 0.0, // 2 @@ -168,12 +168,12 @@ tape( 'the function supports an `x` stride', opts, function test( t ) { 0.0, 0.0, 0.0 - ] ); + ]); - viewX = new Float32Array( cx.buffer ); - viewY = new Float32Array( cy.buffer ); + viewX = new Float32Array( x.buffer ); + viewY = new Float32Array( y.buffer ); - cxe = new Float32Array( [ + xe = new Float32Array([ 0.8, // 1 1.6, // 1 3.0, @@ -182,8 +182,8 @@ tape( 'the function supports an `x` stride', opts, function test( t ) { 4.8, // 2 7.0, 8.0 - ] ); - cye = new Float32Array( [ + ]); + ye = new Float32Array([ -0.6, // 1 -1.2, // 1 -3.0, // 2 @@ -192,25 +192,25 @@ tape( 'the function supports an `x` stride', opts, function test( t ) { 0.0, 0.0, 0.0 - ] ); + ]); - out = csrot( 2, cx, 2, 0, cy, 1, 0, 0.8, 0.6 ); - isApprox( t, viewX, cxe, 2.0 ); - isApprox( t, viewY, cye, 2.0 ); - t.strictEqual( out, cy, 'returns expected value' ); + out = csrot( 2, x, 2, 0, y, 1, 0, 0.8, 0.6 ); + isApprox( t, viewX, xe, 2.0 ); + isApprox( t, viewY, ye, 2.0 ); + t.strictEqual( out, y, 'returns expected value' ); t.end(); }); tape( 'the function supports an `x` offset', opts, function test( t ) { var viewX; var viewY; - var cxe; - var cye; var out; - var cx; - var cy; + var xe; + var ye; + var x; + var y; - cx = new Complex64Array( [ + x = new Complex64Array([ 1.0, 2.0, 3.0, // 1 @@ -219,8 +219,8 @@ tape( 'the function supports an `x` offset', opts, function test( t ) { 6.0, // 2 7.0, // 3 8.0 // 3 - ] ); - cy = new Complex64Array( [ + ]); + y = new Complex64Array([ 0.0, // 1 0.0, // 1 0.0, // 2 @@ -229,12 +229,12 @@ tape( 'the function supports an `x` offset', opts, function test( t ) { 0.0, // 3 0.0, 0.0 - ] ); + ]); - viewX = new Float32Array( cx.buffer ); - viewY = new Float32Array( cy.buffer ); + viewX = new Float32Array( x.buffer ); + viewY = new Float32Array( y.buffer ); - cxe = new Float32Array( [ + xe = new Float32Array([ 1.0, 2.0, 2.4, // 1 @@ -243,8 +243,8 @@ tape( 'the function supports an `x` offset', opts, function test( t ) { 4.8, // 2 5.6, // 3 6.4 // 3 - ] ); - cye = new Float32Array( [ + ]); + ye = new Float32Array([ -1.8, // 1 -2.4, // 1 -3.0, // 2 @@ -253,25 +253,25 @@ tape( 'the function supports an `x` offset', opts, function test( t ) { -4.8, // 3 0.0, 0.0 - ] ); + ]); - out = csrot( 3, cx, 1, 1, cy, 1, 0, 0.8, 0.6 ); - isApprox( t, viewX, cxe, 2.0 ); - isApprox( t, viewY, cye, 2.0 ); - t.strictEqual( out, cy, 'returns expected value' ); + out = csrot( 3, x, 1, 1, y, 1, 0, 0.8, 0.6 ); + isApprox( t, viewX, xe, 2.0 ); + isApprox( t, viewY, ye, 2.0 ); + t.strictEqual( out, y, 'returns expected value' ); t.end(); }); tape( 'the function supports a `y` stride', opts, function test( t ) { var viewX; var viewY; - var cxe; - var cye; var out; - var cx; - var cy; + var xe; + var ye; + var x; + var y; - cx = new Complex64Array( [ + x = new Complex64Array([ 1.0, // 1 2.0, // 1 3.0, // 2 @@ -280,8 +280,8 @@ tape( 'the function supports a `y` stride', opts, function test( t ) { 6.0, 7.0, 8.0 - ] ); - cy = new Complex64Array( [ + ]); + y = new Complex64Array([ 0.0, // 1 0.0, // 1 0.0, @@ -290,12 +290,12 @@ tape( 'the function supports a `y` stride', opts, function test( t ) { 0.0, // 2 0.0, 0.0 - ] ); + ]); - viewX = new Float32Array( cx.buffer ); - viewY = new Float32Array( cy.buffer ); + viewX = new Float32Array( x.buffer ); + viewY = new Float32Array( y.buffer ); - cxe = new Float32Array( [ + xe = new Float32Array([ 0.8, // 1 1.6, // 1 2.4, // 2 @@ -304,8 +304,8 @@ tape( 'the function supports a `y` stride', opts, function test( t ) { 6.0, 7.0, 8.0 - ] ); - cye = new Float32Array( [ + ]); + ye = new Float32Array([ -0.6, // 1 -1.2, // 1 0.0, @@ -314,25 +314,25 @@ tape( 'the function supports a `y` stride', opts, function test( t ) { -2.4, // 2 0.0, 0.0 - ] ); + ]); - out = csrot( 2, cx, 1, 0, cy, 2, 0, 0.8, 0.6 ); - isApprox( t, viewX, cxe, 2.0 ); - isApprox( t, viewY, cye, 2.0 ); - t.strictEqual( out, cy, 'returns expected value' ); + out = csrot( 2, x, 1, 0, y, 2, 0, 0.8, 0.6 ); + isApprox( t, viewX, xe, 2.0 ); + isApprox( t, viewY, ye, 2.0 ); + t.strictEqual( out, y, 'returns expected value' ); t.end(); }); tape( 'the function supports a `y` offset', opts, function test( t ) { var viewX; var viewY; - var cxe; - var cye; var out; - var cx; - var cy; + var xe; + var ye; + var x; + var y; - cx = new Complex64Array( [ + x = new Complex64Array([ 1.0, // 1 2.0, // 1 3.0, @@ -341,8 +341,8 @@ tape( 'the function supports a `y` offset', opts, function test( t ) { 6.0, // 2 7.0, 8.0 - ] ); - cy = new Complex64Array( [ + ]); + y = new Complex64Array([ 0.0, // 2 0.0, // 2 0.0, // 1 @@ -351,12 +351,12 @@ tape( 'the function supports a `y` offset', opts, function test( t ) { 0.0, 0.0, 0.0 - ] ); + ]); - viewX = new Float32Array( cx.buffer ); - viewY = new Float32Array( cy.buffer ); + viewX = new Float32Array( x.buffer ); + viewY = new Float32Array( y.buffer ); - cxe = new Float32Array( [ + xe = new Float32Array([ 0.8, // 1 1.6, // 1 3.0, @@ -365,8 +365,8 @@ tape( 'the function supports a `y` offset', opts, function test( t ) { 4.8, // 2 7.0, 8.0 - ] ); - cye = new Float32Array( [ + ]); + ye = new Float32Array([ -3.0, // 2 -3.6, // 2 -0.6, // 1 @@ -375,53 +375,53 @@ tape( 'the function supports a `y` offset', opts, function test( t ) { 0.0, 0.0, 0.0 - ] ); + ]); - out = csrot( 2, cx, 2, 0, cy, -1, 1, 0.8, 0.6 ); - isApprox( t, viewX, cxe, 2.0 ); - isApprox( t, viewY, cye, 2.0 ); - t.strictEqual( out, cy, 'returns expected value' ); + out = csrot( 2, x, 2, 0, y, -1, 1, 0.8, 0.6 ); + isApprox( t, viewX, xe, 2.0 ); + isApprox( t, viewY, ye, 2.0 ); + t.strictEqual( out, y, 'returns expected value' ); t.end(); }); tape( 'the function returns a reference to the destination array', opts, function test( t ) { var out; - var cx; - var cy; + var x; + var y; - cx = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); - cy = new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ); + x = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); + y = new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - out = csrot( cx.length, cx, 1, 0, cy, 1, 0, 0.8, 0.6 ); + out = csrot( x.length, x, 1, 0, y, 1, 0, 0.8, 0.6 ); - t.strictEqual( out, cy, 'returns expected value' ); + t.strictEqual( out, y, 'returns expected value' ); t.end(); }); tape( 'if provided an `N` parameter less than or equal to `0`, the function returns both vectors unchanged', opts, function test( t ) { var viewX; var viewY; - var cxe; - var cye; - var cx; - var cy; + var xe; + var ye; + var x; + var y; - cx = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); - cy = new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ); + x = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); + y = new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - viewX = new Float32Array( cx.buffer ); - viewY = new Float32Array( cy.buffer ); + viewX = new Float32Array( x.buffer ); + viewY = new Float32Array( y.buffer ); - cxe = new Float32Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); - cye = new Float32Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ); + xe = new Float32Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); + ye = new Float32Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - csrot( -1, cx, 1, 0, cy, 1, 0, 0.8, 0.6 ); - t.deepEqual( viewX, cxe, 'returns expected value' ); - t.deepEqual( viewY, cye, 'returns expected value' ); + csrot( -1, x, 1, 0, y, 1, 0, 0.8, 0.6 ); + t.deepEqual( viewX, xe, 'returns expected value' ); + t.deepEqual( viewY, ye, 'returns expected value' ); - csrot( 0, cx, 1, 0, cy, 1, 0, 0.8, 0.6 ); - t.deepEqual( viewX, cxe, 'returns expected value' ); - t.deepEqual( viewY, cye, 'returns expected value' ); + csrot( 0, x, 1, 0, y, 1, 0, 0.8, 0.6 ); + t.deepEqual( viewX, xe, 'returns expected value' ); + t.deepEqual( viewY, ye, 'returns expected value' ); t.end(); }); @@ -429,13 +429,13 @@ tape( 'if provided an `N` parameter less than or equal to `0`, the function retu tape( 'the function supports negative strides', opts, function test( t ) { var viewX; var viewY; - var cxe; - var cye; var out; - var cx; - var cy; + var xe; + var ye; + var x; + var y; - cx = new Complex64Array( [ + x = new Complex64Array([ 1.0, // 2 2.0, // 2 3.0, // 1 @@ -444,8 +444,8 @@ tape( 'the function supports negative strides', opts, function test( t ) { 6.0, 7.0, 8.0 - ] ); - cy = new Complex64Array( [ + ]); + y = new Complex64Array([ 0.0, // 2 0.0, // 2 0.0, @@ -454,12 +454,12 @@ tape( 'the function supports negative strides', opts, function test( t ) { 0.0, // 1 0.0, 0.0 - ] ); + ]); - viewX = new Float32Array( cx.buffer ); - viewY = new Float32Array( cy.buffer ); + viewX = new Float32Array( x.buffer ); + viewY = new Float32Array( y.buffer ); - cxe = new Float32Array( [ + xe = new Float32Array([ 0.8, // 2 1.6, // 2 2.4, // 1 @@ -468,8 +468,8 @@ tape( 'the function supports negative strides', opts, function test( t ) { 6.0, 7.0, 8.0 - ] ); - cye = new Float32Array( [ + ]); + ye = new Float32Array([ -0.6, // 2 -1.2, // 2 0.0, @@ -478,25 +478,25 @@ tape( 'the function supports negative strides', opts, function test( t ) { -2.4, // 1 0.0, 0.0 - ] ); + ]); - out = csrot( 2, cx, -1, 1, cy, -2, 2, 0.8, 0.6 ); - isApprox( t, viewX, cxe, 2.0 ); - isApprox( t, viewY, cye, 2.0 ); - t.strictEqual( out, cy, 'returns expected value' ); + out = csrot( 2, x, -1, 1, y, -2, 2, 0.8, 0.6 ); + isApprox( t, viewX, xe, 2.0 ); + isApprox( t, viewY, ye, 2.0 ); + t.strictEqual( out, y, 'returns expected value' ); t.end(); }); tape( 'the function supports complex access patterns', opts, function test( t ) { var viewX; var viewY; - var cxe; - var cye; var out; - var cx; - var cy; + var xe; + var ye; + var x; + var y; - cx = new Complex64Array( [ + x = new Complex64Array([ 1.0, // 1 2.0, // 1 3.0, @@ -505,8 +505,8 @@ tape( 'the function supports complex access patterns', opts, function test( t ) 6.0, // 2 7.0, 8.0 - ] ); - cy = new Complex64Array( [ + ]); + y = new Complex64Array([ 0.0, // 1 0.0, // 1 0.0, // 2 @@ -515,12 +515,12 @@ tape( 'the function supports complex access patterns', opts, function test( t ) 0.0, 0.0, 0.0 - ] ); + ]); - viewX = new Float32Array( cx.buffer ); - viewY = new Float32Array( cy.buffer ); + viewX = new Float32Array( x.buffer ); + viewY = new Float32Array( y.buffer ); - cxe = new Float32Array( [ + xe = new Float32Array([ 1.0, 2.0, 2.4, // 1 @@ -529,8 +529,8 @@ tape( 'the function supports complex access patterns', opts, function test( t ) 6.0, 5.6, // 2 6.4 // 2 - ] ); - cye = new Float32Array( [ + ]); + ye = new Float32Array([ 0.0, 0.0, 0.0, @@ -539,11 +539,11 @@ tape( 'the function supports complex access patterns', opts, function test( t ) -2.4, // 1 -4.2, // 2 -4.8 // 2 - ] ); + ]); - out = csrot( 2, cx, 2, 1, cy, 1, 2, 0.8, 0.6 ); - isApprox( t, viewX, cxe, 2.0 ); - isApprox( t, viewY, cye, 2.0 ); - t.strictEqual( out, cy, 'returns expected value' ); + out = csrot( 2, x, 2, 1, y, 1, 2, 0.8, 0.6 ); + isApprox( t, viewX, xe, 2.0 ); + isApprox( t, viewY, ye, 2.0 ); + t.strictEqual( out, y, 'returns expected value' ); t.end(); }); From fc92d90ca9d9155bd44d5a5d7a64e602f5841ea3 Mon Sep 17 00:00:00 2001 From: Shabareesh Shetty <139731143+ShabiShett07@users.noreply.github.com> Date: Sat, 26 Apr 2025 16:26:38 +0530 Subject: [PATCH 2/3] chore: update variable name Signed-off-by: Shabareesh Shetty <139731143+ShabiShett07@users.noreply.github.com> --- .../blas/base/csrot/benchmark/fortran/benchmark.length.f | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/node_modules/@stdlib/blas/base/csrot/benchmark/fortran/benchmark.length.f b/lib/node_modules/@stdlib/blas/base/csrot/benchmark/fortran/benchmark.length.f index c4937c810ffb..1c666174cf30 100644 --- a/lib/node_modules/@stdlib/blas/base/csrot/benchmark/fortran/benchmark.length.f +++ b/lib/node_modules/@stdlib/blas/base/csrot/benchmark/fortran/benchmark.length.f @@ -117,8 +117,8 @@ double precision function benchmark( iterations, len ) ! .. ! External functions: interface - subroutine csrot( N, cx, strideX, cy, strideY, c, s ) - complex :: cx(*), cy(*) + subroutine csrot( N, x, strideX, y, strideY, c, s ) + complex :: x(*), y(*) integer :: strideX, strideY, N real :: c, s end subroutine csrot @@ -208,4 +208,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 From b19cb14ce184a44c98c3cc04d7677cb7e9e73579 Mon Sep 17 00:00:00 2001 From: Shabareesh Shetty <139731143+ShabiShett07@users.noreply.github.com> Date: Sat, 26 Apr 2025 16:28:07 +0530 Subject: [PATCH 3/3] chore: update variable name Signed-off-by: Shabareesh Shetty <139731143+ShabiShett07@users.noreply.github.com> --- .../@stdlib/blas/base/csrot/src/csrot.f | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/lib/node_modules/@stdlib/blas/base/csrot/src/csrot.f b/lib/node_modules/@stdlib/blas/base/csrot/src/csrot.f index 5999d8d39198..17a0f0f24da9 100644 --- a/lib/node_modules/@stdlib/blas/base/csrot/src/csrot.f +++ b/lib/node_modules/@stdlib/blas/base/csrot/src/csrot.f @@ -42,14 +42,14 @@ ! > * 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 {Array} cx - first input array -! @param {integer} strideX - `cx` stride length -! @param {Array} cy - second input array -! @param {integer} strideY - `cy` stride length +! @param {Array} x - first input array +! @param {integer} strideX - `x` stride length +! @param {Array} y - second input array +! @param {integer} strideY - `y` stride length ! @param {real} c - cosine of the angle of rotation ! @param {real} s - sine of the angle of rotation !< -subroutine csrot( N, cx, strideX, cy, strideY, c, s ) +subroutine csrot( N, x, strideX, y, strideY, c, s ) implicit none ! .. ! Scalar arguments: @@ -57,7 +57,7 @@ subroutine csrot( N, cx, strideX, cy, strideY, c, s ) real :: c, s ! .. ! Array arguments: - complex :: cx(*), cy(*) + complex :: x(*), y(*) ! .. ! Local scalars: integer :: ix, iy, i @@ -69,9 +69,9 @@ subroutine csrot( N, cx, strideX, cy, strideY, c, s ) ! .. if ( strideX == 1 .AND. strideY == 1 ) then do i = 1, N - ctmp = ( c*cx( i ) ) + ( s*cy( i ) ) - cy( i ) = ( c*cy( i ) ) - ( s*cx( i ) ) - cx( i ) = ctmp + ctmp = ( c*x( i ) ) + ( s*y( i ) ) + y( i ) = ( c*y( i ) ) - ( s*x( i ) ) + x( i ) = ctmp end do else if ( strideX < 0 ) then @@ -85,12 +85,12 @@ subroutine csrot( N, cx, strideX, cy, strideY, c, s ) iy = 1 end if do i = 1, N - ctmp = ( c*cx( ix ) ) + ( s*cy( iy ) ) - cy( iy ) = ( c*cy( iy ) ) - ( s*cx( ix ) ) - cx( ix ) = ctmp + ctmp = ( c*x( ix ) ) + ( s*y( iy ) ) + y( iy ) = ( c*y( iy ) ) - ( s*x( ix ) ) + x( ix ) = ctmp ix = ix + strideX iy = iy + strideY end do end if return -end subroutine csrot \ No newline at end of file +end subroutine csrot