Skip to content

Commit fd286df

Browse files
committed
chore: clean-up
--- 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: na - 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: na - 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 ---
1 parent 6e918fb commit fd286df

File tree

11 files changed

+49
-44
lines changed

11 files changed

+49
-44
lines changed

lib/node_modules/@stdlib/blas/base/zrot/benchmark/benchmark.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ function createBenchmark( len ) {
5454

5555
zx = new Complex128Array( uniform( len*2, -100.0, 100.0, options ) );
5656
zy = new Complex128Array( uniform( len*2, -100.0, 100.0, options ) );
57-
s = new Complex128( 0.6, 0 );
57+
s = new Complex128( 0.6, 0.0 );
5858

5959
return benchmark;
6060

@@ -69,6 +69,7 @@ function createBenchmark( len ) {
6969
var i;
7070

7171
viewX = reinterpret( zx, 0 );
72+
7273
b.tic();
7374
for ( i = 0; i < b.iterations; i++ ) {
7475
zrot( zx.length, zx, 1, zy, 1, 0.8, s );

lib/node_modules/@stdlib/blas/base/zrot/benchmark/benchmark.ndarray.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ function createBenchmark( len ) {
5454

5555
zx = new Complex128Array( uniform( len*2, -100.0, 100.0, options ) );
5656
zy = new Complex128Array( uniform( len*2, -100.0, 100.0, options ) );
57-
s = new Complex128( 0.6, 0 );
57+
s = new Complex128( 0.6, 0.0 );
5858

5959
return benchmark;
6060

@@ -69,6 +69,7 @@ function createBenchmark( len ) {
6969
var i;
7070

7171
viewX = reinterpret( zx, 0 );
72+
7273
b.tic();
7374
for ( i = 0; i < b.iterations; i++ ) {
7475
zrot( zx.length, zx, 1, 0, zy, 1, 0, 0.8, s );

lib/node_modules/@stdlib/blas/base/zrot/docs/repl.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
{{alias}}( N, zx, strideX, zy, strideY, c, s )
3-
Applies a plane rotation.
3+
Applies a plane rotation with real cosine and complex sine.
44

55
The `N` and stride parameters determine how values in the strided arrays are
66
accessed at runtime.
@@ -92,7 +92,8 @@
9292

9393

9494
{{alias}}.ndarray( N, zx, strideX, offsetX, zy, strideY, offsetY, c, s )
95-
Applies a plane rotation using alternative indexing semantics.
95+
Applies a plane rotation with real cosine and complex sine using alternative
96+
indexing semantics.
9697

9798
While typed array views mandate a view offset based on the underlying
9899
buffer, the offset parameters support indexing semantics based on starting

lib/node_modules/@stdlib/blas/base/zrot/docs/types/index.d.ts

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import { Complex128 } from '@stdlib/types/complex';
2828
*/
2929
interface Routine {
3030
/**
31-
* Applies a plane rotation.
31+
* Applies a plane rotation with real cosine and complex sine.
3232
*
3333
* @param N - number of indexed elements
3434
* @param zx - first input array
@@ -55,24 +55,24 @@ interface Routine {
5555
* // returns <Complex128>
5656
*
5757
* var re = real( z );
58-
* // returns -1.1
58+
* // returns ~-1.1
5959
*
6060
* var im = imag( z );
61-
* // returns -0.2
61+
* // returns ~-0.2
6262
*
6363
* z = zx.get( 0 );
6464
* // returns <Complex128>
6565
*
6666
* re = real( z );
67-
* // returns 0.8
67+
* // returns ~0.8
6868
*
6969
* im = imag( z );
70-
* // returns 1.6
70+
* // returns ~1.6
7171
*/
7272
( N: number, zx: Complex128Array, strideX: number, zy: Complex128Array, strideY: number, c: number, s: Complex128 ): Complex128Array;
7373

7474
/**
75-
* Applies a plane rotation using alternative indexing semantics.
75+
* Applies a plane rotation with real cosine and complex sine using alternative indexing semantics.
7676
*
7777
* @param N - number of indexed elements
7878
* @param zx - first input array
@@ -101,25 +101,25 @@ interface Routine {
101101
* // returns <Complex128>
102102
*
103103
* var re = real( z );
104-
* // returns -1.1
104+
* // returns ~-1.1
105105
*
106106
* var im = imag( z );
107-
* // returns -0.2
107+
* // returns ~-0.2
108108
*
109109
* z = zx.get( 0 );
110110
* // returns <Complex128>
111111
*
112112
* re = real( z );
113-
* // returns 0.8
113+
* // returns ~0.8
114114
*
115115
* im = imag( z );
116-
* // returns 1.6
116+
* // returns ~1.6
117117
*/
118118
ndarray( N: number, zx: Complex128Array, strideX: number, offsetX: number, zy: Complex128Array, strideY: number, offsetY: number, c: number, s: Complex128 ): Complex128Array;
119119
}
120120

121121
/**
122-
* Applies a plane rotation.
122+
* Applies a plane rotation with real cosine and complex sine.
123123
*
124124
* @param N - number of indexed elements
125125
* @param zx - first input array
@@ -146,19 +146,19 @@ interface Routine {
146146
* // returns <Complex128>
147147
*
148148
* var re = real( z );
149-
* // returns -1.1
149+
* // returns ~-1.1
150150
*
151151
* var im = imag( z );
152-
* // returns -0.2
152+
* // returns ~-0.2
153153
*
154154
* z = zx.get( 0 );
155155
* // returns <Complex128>
156156
*
157157
* re = real( z );
158-
* // returns 0.8
158+
* // returns ~0.8
159159
*
160160
* im = imag( z );
161-
* // returns 1.6
161+
* // returns ~1.6
162162
*
163163
* @example
164164
* var Complex128Array = require( '@stdlib/array/complex128' );
@@ -176,19 +176,19 @@ interface Routine {
176176
* // returns <Complex128>
177177
*
178178
* var re = real( z );
179-
* // returns -1.1
179+
* // returns ~-1.1
180180
*
181181
* var im = imag( z );
182-
* // returns -0.2
182+
* // returns ~-0.2
183183
*
184184
* z = zx.get( 0 );
185185
* // returns <Complex128>
186186
*
187187
* re = real( z );
188-
* // returns 0.8
188+
* // returns ~0.8
189189
*
190190
* im = imag( z );
191-
* // returns 1.6
191+
* // returns ~1.6
192192
*/
193193
declare var zrot: Routine;
194194

lib/node_modules/@stdlib/blas/base/zrot/docs/types/test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ import zrot = require( './index' );
129129
zrot( zx.length, zx, 1, zy, 1, ( zx: number ): number => zx, s ); // $ExpectError
130130
}
131131

132-
// The compiler throws an error if the function is provided a seventh argument which is not a Complex128...
132+
// The compiler throws an error if the function is provided a seventh argument which is not a complex number...
133133
{
134134
const zx = new Complex128Array( 10 );
135135
const zy = new Complex128Array( 10 );
@@ -298,7 +298,7 @@ import zrot = require( './index' );
298298
zrot.ndarray( zx.length, zx, 1, 0, zy, 1, 0, ( zx: number ): number => zx, s ); // $ExpectError
299299
}
300300

301-
// The compiler throws an error if the `ndarray` method is provided a ninth argument which is not a number...
301+
// The compiler throws an error if the `ndarray` method is provided a ninth argument which is not a complex number...
302302
{
303303
const zx = new Complex128Array( 10 );
304304
const zy = new Complex128Array( 10 );

lib/node_modules/@stdlib/blas/base/zrot/examples/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ var Complex128 = require( '@stdlib/complex/float64/ctor' );
2424
var zcopy = require( '@stdlib/blas/base/zcopy' );
2525
var zeros = require( '@stdlib/array/zeros' );
2626
var logEach = require( '@stdlib/console/log-each' );
27-
var zdrot = require( './../lib' );
27+
var zrot = require( './../lib' );
2828

2929
function rand() {
3030
return new Complex128( discreteUniform( 0, 10 ), discreteUniform( -5, 5 ) );
@@ -40,7 +40,7 @@ var zyc = zcopy( zy.length, zy, 1, zeros( zy.length, 'complex128' ), 1 );
4040
var s = new Complex128( 0.0, 0.75 );
4141

4242
// Apply a plane rotation:
43-
zdrot( zx.length, zx, 1, zy, 1, 1.25, s );
43+
zrot( zx.length, zx, 1, zy, 1, 1.25, s );
4444

4545
// Print the results:
4646
logEach( '(%s,%s) => (%s,%s)', zxc, zyc, zx, zy );

lib/node_modules/@stdlib/blas/base/zrot/lib/main.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@
2121
// MODULES //
2222

2323
var setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );
24-
var zdrot = require( './zrot.js' );
24+
var zrot = require( './zrot.js' );
2525
var ndarray = require( './ndarray.js' );
2626

2727

2828
// MAIN //
2929

30-
setReadOnly( zdrot, 'ndarray', ndarray );
30+
setReadOnly( zrot, 'ndarray', ndarray );
3131

3232

3333
// EXPORTS //
3434

35-
module.exports = zdrot;
35+
module.exports = zrot;

lib/node_modules/@stdlib/blas/base/zrot/lib/ndarray.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
// MODULES //
2222

2323
var reinterpret = require( '@stdlib/strided/base/reinterpret-complex128' );
24+
var real = require( '@stdlib/complex/float64/real' );
25+
var imag = require( '@stdlib/complex/float64/imag' );
2426

2527

2628
// MAIN //
@@ -96,8 +98,8 @@ function zrot( N, zx, strideX, offsetX, zy, strideY, offsetY, c, s ) {
9698
sx = strideX * 2;
9799
sy = strideY * 2;
98100

99-
sr = s.re;
100-
si = s.im;
101+
sr = real( s );
102+
si = imag( s );
101103

102104
for ( i = 0; i < N; i++ ) {
103105
yr = viewY[ iy ];

lib/node_modules/@stdlib/blas/base/zrot/lib/zrot.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ var ndarray = require( './ndarray.js' );
4848
* var zy = new Complex128Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );
4949
* var s = new Complex128( 0.3, 0.4 );
5050
*
51-
* zdrot( zx.length, zx, 1, zy, 1, 0.8, s );
51+
* zrot( zx.length, zx, 1, zy, 1, 0.8, s );
5252
*
5353
* var z = zy.get( 0 );
5454
* // returns <Complex128>
@@ -68,7 +68,7 @@ var ndarray = require( './ndarray.js' );
6868
* im = imag( z );
6969
* // returns ~1.6
7070
*/
71-
function zdrot( N, zx, strideX, zy, strideY, c, s ) {
71+
function zrot( N, zx, strideX, zy, strideY, c, s ) {
7272
var ix = stride2offset( N, strideX );
7373
var iy = stride2offset( N, strideY );
7474
return ndarray( N, zx, strideX, ix, zy, strideY, iy, c, s );
@@ -77,4 +77,4 @@ function zdrot( N, zx, strideX, zy, strideY, c, s ) {
7777

7878
// EXPORTS //
7979

80-
module.exports = zdrot;
80+
module.exports = zrot;

lib/node_modules/@stdlib/blas/base/zrot/test/test.ndarray.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ tape( 'the function applies a plane rotation', function test( t ) {
8484
var cy;
8585
var s;
8686

87-
s = new Complex128( 0.6, 0 );
87+
s = new Complex128( 0.6, 0.0 );
8888

8989
cx = new Complex128Array([
9090
1.0, // 1
@@ -148,7 +148,7 @@ tape( 'the function supports an `x` stride', function test( t ) {
148148
var cy;
149149
var s;
150150

151-
s = new Complex128( 0, 0.6 );
151+
s = new Complex128( 0.0, 0.6 );
152152
cx = new Complex128Array([
153153
1.0, // 1
154154
2.0, // 1
@@ -187,7 +187,7 @@ tape( 'the function supports an `x` stride', function test( t ) {
187187
-1.2, // 1
188188
0.6, // 1
189189
-3.6, // 2
190-
3.0, // 2
190+
3.0, // 2
191191
0.0,
192192
0.0,
193193
0.0,
@@ -390,7 +390,7 @@ tape( 'the function supports a `y` offset', function test( t ) {
390390
t.end();
391391
});
392392

393-
tape( 'the function returns a reference to the destination array', function test( t ) {
393+
tape( 'the function returns a reference to the second array', function test( t ) {
394394
var out;
395395
var cx;
396396
var cy;

0 commit comments

Comments
 (0)