Skip to content

Commit 97fc069

Browse files
committed
chore: add appropriate variable names
--- 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: 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 c551d6c commit 97fc069

File tree

12 files changed

+294
-294
lines changed

12 files changed

+294
-294
lines changed

lib/node_modules/@stdlib/blas/base/csscal/README.md

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -30,35 +30,35 @@ limitations under the License.
3030
var csscal = require( '@stdlib/blas/base/csscal' );
3131
```
3232

33-
#### csscal( N, sa, cx, strideZX )
33+
#### csscal( N, alpha, x, strideX )
3434

3535
Scales a single-precision complex floating-point vector by a single-precision floating-point constant.
3636

3737
```javascript
3838
var Complex64Array = require( '@stdlib/array/complex64' );
3939

40-
var cx = new Complex64Array( [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ] );
40+
var x = new Complex64Array( [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ] );
4141

42-
csscal( 3, 2.0, cx, 1 );
43-
// cx => <Complex64Array>[ 2.0, 2.0, 2.0, 2.0, 2.0, 2.0 ]
42+
csscal( 3, 2.0, x, 1 );
43+
// x => <Complex64Array>[ 2.0, 2.0, 2.0, 2.0, 2.0, 2.0 ]
4444
```
4545

4646
The function has the following parameters:
4747

4848
- **N**: number of indexed elements.
49-
- **sa**: scalar constant.
50-
- **cx**: input [`Complex64Array`][@stdlib/array/complex64].
51-
- **strideZX**: stride length for `cx`.
49+
- **alpha**: scalar constant.
50+
- **x**: input [`Complex64Array`][@stdlib/array/complex64].
51+
- **strideX**: stride length for `x`.
5252

53-
The `N` and stride parameters determine which elements in `cx` are scaled by `sa`. For example, to scale every other element in `cx` by `sa`,
53+
The `N` and stride parameters determine which elements in `x` are scaled by `alpha`. For example, to scale every other element in `x` by `alpha`,
5454

5555
```javascript
5656
var Complex64Array = require( '@stdlib/array/complex64' );
5757

58-
var cx = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
58+
var x = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
5959

60-
csscal( 2, 2.0, cx, 2 );
61-
// cx => <Complex64Array>[ 2.0, 4.0, 3.0, 4.0, 10.0, 12.0, 7.0, 8.0 ]
60+
csscal( 2, 2.0, x, 2 );
61+
// x => <Complex64Array>[ 2.0, 4.0, 3.0, 4.0, 10.0, 12.0, 7.0, 8.0 ]
6262
```
6363

6464
Note that indexing is relative to the first index. To introduce an offset, use [`typed array`][mdn-typed-array] views.
@@ -69,42 +69,42 @@ Note that indexing is relative to the first index. To introduce an offset, use [
6969
var Complex64Array = require( '@stdlib/array/complex64' );
7070

7171
// Initial array:
72-
var cx0 = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
72+
var x0 = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
7373

7474
// Create an offset view:
75-
var cx1 = new Complex64Array( cx0.buffer, cx0.BYTES_PER_ELEMENT*1 ); // start at 2nd element
75+
var x1 = new Complex64Array( x0.buffer, x0.BYTES_PER_ELEMENT*1 ); // start at 2nd element
7676

77-
// Scale every element in `cx1`:
78-
csscal( 3, 2.0, cx1, 1 );
79-
// cx0 => <Complex64Array>[ 1.0, 2.0, 6.0, 8.0, 10.0, 12.0, 14.0, 16.0 ]
77+
// Scale every element in `x1`:
78+
csscal( 3, 2.0, x1, 1 );
79+
// x0 => <Complex64Array>[ 1.0, 2.0, 6.0, 8.0, 10.0, 12.0, 14.0, 16.0 ]
8080
```
8181

82-
#### csscal.ndarray( N, sa, cx, strideZX, offsetZX )
82+
#### csscal.ndarray( N, alpha, x, strideX, offsetX )
8383

8484
Scales a single-precision complex floating-point vector by a single-precision floating-point constant using alternative indexing semantics.
8585

8686
```javascript
8787
var Complex64Array = require( '@stdlib/array/complex64' );
8888

89-
var cx = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
89+
var x = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
9090

91-
csscal.ndarray( 3, 2.0, cx, 1, 0 );
92-
// cx => <Complex64Array>[ 2.0, 4.0, 6.0, 8.0, 10.0, 12.0 ]
91+
csscal.ndarray( 3, 2.0, x, 1, 0 );
92+
// x => <Complex64Array>[ 2.0, 4.0, 6.0, 8.0, 10.0, 12.0 ]
9393
```
9494

9595
The function has the following additional parameters:
9696

97-
- **offsetZX**: starting index for `cx`.
97+
- **offsetX**: starting index for `x`.
9898

9999
While [`typed array`][mdn-typed-array] views mandate a view offset based on the underlying buffer, the offset parameter supports indexing semantics based on a starting index. For example, to scale every other element in the input strided array starting from the second element,
100100

101101
```javascript
102102
var Complex64Array = require( '@stdlib/array/complex64' );
103103

104-
var cx = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
104+
var x = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
105105

106-
csscal.ndarray( 2, 2.0, cx, 2, 1 );
107-
// cx => <Complex64Array>[ 1.0, 2.0, 6.0, 8.0, 5.0, 6.0, 14.0, 16.0 ]
106+
csscal.ndarray( 2, 2.0, x, 2, 1 );
107+
// x => <Complex64Array>[ 1.0, 2.0, 6.0, 8.0, 5.0, 6.0, 14.0, 16.0 ]
108108
```
109109

110110
</section>
@@ -115,7 +115,7 @@ csscal.ndarray( 2, 2.0, cx, 2, 1 );
115115

116116
## Notes
117117

118-
- If `N <= 0`, both functions return `cx` unchanged.
118+
- If `N <= 0`, both functions return `x` unchanged.
119119
- `csscal()` corresponds to the [BLAS][blas] level 1 function [`csscal`][csscal].
120120

121121
</section>
@@ -138,11 +138,11 @@ function rand() {
138138
return new Complex64( discreteUniform( 0, 10 ), discreteUniform( -5, 5 ) );
139139
}
140140

141-
var cx = filledarrayBy( 10, 'complex64', rand );
142-
console.log( cx.toString() );
141+
var x = filledarrayBy( 10, 'complex64', rand );
142+
console.log( x.toString() );
143143

144-
csscal( cx.length, 2.0, cx, 1 );
145-
console.log( cx.toString() );
144+
csscal( x.length, 2.0, x, 1 );
145+
console.log( x.toString() );
146146
```
147147

148148
</section>

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ var options = {
4646
* @returns {Function} benchmark function
4747
*/
4848
function createBenchmark( len ) {
49-
var cxbuf;
50-
var cx;
49+
var xbuf;
50+
var x;
5151

52-
cxbuf = uniform( len*2, -100.0, 100.0, options );
53-
cx = new Complex64Array( cxbuf.buffer );
52+
xbuf = uniform( len*2, -100.0, 100.0, options );
53+
x = new Complex64Array( xbuf.buffer );
5454

5555
return benchmark;
5656

@@ -65,13 +65,13 @@ function createBenchmark( len ) {
6565

6666
b.tic();
6767
for ( i = 0; i < b.iterations; i++ ) {
68-
csscal( cx.length, 2.0, cx, 1 );
69-
if ( isnanf( cxbuf[ i%(len*2) ] ) ) {
68+
csscal( x.length, 2.0, x, 1 );
69+
if ( isnanf( xbuf[ i%(len*2) ] ) ) {
7070
b.fail( 'should not return NaN' );
7171
}
7272
}
7373
b.toc();
74-
if ( isnanf( cxbuf[ i%(len*2) ] ) ) {
74+
if ( isnanf( xbuf[ i%(len*2) ] ) ) {
7575
b.fail( 'should not return NaN' );
7676
}
7777
b.pass( 'benchmark finished' );

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ var options = {
4646
* @returns {Function} benchmark function
4747
*/
4848
function createBenchmark( len ) {
49-
var cxbuf;
50-
var cx;
49+
var xbuf;
50+
var x;
5151

52-
cxbuf = uniform( len*2, -100.0, 100.0, options );
53-
cx = new Complex64Array( cxbuf.buffer );
52+
xbuf = uniform( len*2, -100.0, 100.0, options );
53+
x = new Complex64Array( xbuf.buffer );
5454

5555
return benchmark;
5656

@@ -65,13 +65,13 @@ function createBenchmark( len ) {
6565

6666
b.tic();
6767
for ( i = 0; i < b.iterations; i++ ) {
68-
csscal( cx.length, 2.0, cx, 1, 0 );
69-
if ( isnanf( cxbuf[ i%(len*2) ] ) ) {
68+
csscal( x.length, 2.0, x, 1, 0 );
69+
if ( isnanf( xbuf[ i%(len*2) ] ) ) {
7070
b.fail( 'should not return NaN' );
7171
}
7272
}
7373
b.toc();
74-
if ( isnanf( cxbuf[ i%(len*2) ] ) ) {
74+
if ( isnanf( xbuf[ i%(len*2) ] ) ) {
7575
b.fail( 'should not return NaN' );
7676
}
7777
b.pass( 'benchmark finished' );

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

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,46 @@
11

2-
{{alias}}( N, sa, cx, strideCX )
2+
{{alias}}( N, alpha, x, strideX )
33
Scales a single-precision complex floating-point vector by a single-
44
precision floating-point constant.
55

6-
The `N` and stride parameters determine which elements in `cx` are scaled by
7-
`sa`.
6+
The `N` and stride parameters determine which elements in `x` are scaled by
7+
`alpha`.
88

99
Indexing is relative to the first index. To introduce an offset, use typed
1010
array views.
1111

12-
If `N` is less than or equal to `0`, the function returns `cx` unchanged.
12+
If `N` is less than or equal to `0`, the function returns `x` unchanged.
1313

1414

1515
Parameters
1616
----------
1717
N: integer
1818
Number of indexed elements.
1919

20-
sa: single
20+
alpha: single
2121
Scalar constant.
2222

23-
cx: Complex64Array
23+
x: Complex64Array
2424
Input array.
2525

26-
strideCX: integer
27-
Stride length for `cx`.
26+
strideX: integer
27+
Stride length for `x`.
2828

2929
Returns
3030
-------
31-
cx: Complex64Array
31+
x: Complex64Array
3232
Input array.
3333

3434
Examples
3535
--------
3636
// Standard usage:
37-
> var cx = new {{alias:@stdlib/array/complex64}}( [ 1.0, 2.0, 3.0, 4.0 ] );
38-
> {{alias}}( 2, 2.0, cx, 1 )
37+
> var x = new {{alias:@stdlib/array/complex64}}( [ 1.0, 2.0, 3.0, 4.0 ] );
38+
> {{alias}}( 2, 2.0, x, 1 )
3939
<Complex64Array>[ 2.0, 4.0, 6.0, 8.0 ]
4040

4141
// N and stride parameters:
42-
> cx = new {{alias:@stdlib/array/complex64}}( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
43-
> {{alias}}( 2, 2.0, cx, 2 )
42+
> x = new {{alias:@stdlib/array/complex64}}( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
43+
> {{alias}}( 2, 2.0, x, 2 )
4444
<Complex64Array>[ 2.0, 4.0, 3.0, 4.0, 10.0, 12.0 ]
4545

4646
// Using typed array views:
@@ -52,7 +52,7 @@
5252
<Complex64Array>[ 1.0, 2.0, 6.0, 8.0, 10.0, 12.0 ]
5353

5454

55-
{{alias}}.ndarray( N, sa, cx, strideCX, offsetCX )
55+
{{alias}}.ndarray( N, alpha, x, strideX, offsetX )
5656
Scales a single-precision complex floating-point vector by a single-
5757
precision floating-point constant using alternative indexing semantics.
5858

@@ -65,33 +65,33 @@
6565
N: integer
6666
Number of indexed elements.
6767

68-
sa: number
68+
alpha: number
6969
Scalar constant.
7070

71-
cx: Complex64Array
71+
x: Complex64Array
7272
Input array.
7373

74-
strideCX: integer
75-
Stride length for `cx`.
74+
strideX: integer
75+
Stride length for `x`.
7676

77-
offsetCX: integer
78-
Starting index for `cx`.
77+
offsetX: integer
78+
Starting index for `x`.
7979

8080
Returns
8181
-------
82-
cx: Complex64Array
82+
x: Complex64Array
8383
Input array.
8484

8585
Examples
8686
--------
8787
// Standard usage:
88-
> var cx = new {{alias:@stdlib/array/complex64}}( [ 1.0, 2.0, 3.0, 4.0 ] );
89-
> {{alias}}.ndarray( 2, 2.0, cx, 1, 0 )
88+
> var x = new {{alias:@stdlib/array/complex64}}( [ 1.0, 2.0, 3.0, 4.0 ] );
89+
> {{alias}}.ndarray( 2, 2.0, x, 1, 0 )
9090
<Complex64Array>[ 2.0, 4.0, 6.0, 8.0 ]
9191

9292
// Advanced indexing:
93-
> cx = new {{alias:@stdlib/array/complex64}}( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
94-
> {{alias}}.ndarray( 2, 2.0, cx, 1, 2 )
93+
> x = new {{alias:@stdlib/array/complex64}}( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
94+
> {{alias}}.ndarray( 2, 2.0, x, 1, 2 )
9595
<Complex64Array>[ 1.0, 2.0, 3.0, 4.0, 10.0, 12.0, 14.0, 16.0 ]
9696

9797
See Also

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

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -30,66 +30,66 @@ interface Routine {
3030
* Scales a single-precision complex floating-point vector by a single-precision floating-point constant.
3131
*
3232
* @param N - number of indexed elements
33-
* @param sa - scalar constant
34-
* @param cx - input array
35-
* @param strideCX - `cx` stride length
33+
* @param alpha - scalar constant
34+
* @param x - input array
35+
* @param strideX - `x` stride length
3636
* @returns input array
3737
*
3838
* @example
3939
* var Complex64Array = require( '@stdlib/array/complex64' );
4040
*
41-
* var cx = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
41+
* var x = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
4242
*
43-
* csscal( 3, 2.0, cx, 1 );
44-
* // cx => <Complex64Array>[ 2.0, 4.0, 6.0, 8.0, 10.0, 12.0 ]
43+
* csscal( 3, 2.0, x, 1 );
44+
* // x => <Complex64Array>[ 2.0, 4.0, 6.0, 8.0, 10.0, 12.0 ]
4545
*/
46-
( N: number, sa: number, cx: Complex64Array, strideCX: number ): Complex64Array;
46+
( N: number, alpha: number, x: Complex64Array, strideX: number ): Complex64Array;
4747

4848
/**
4949
* Scales a single-precision complex floating-point vector by a single-precision floating-point constant.
5050
*
5151
* @param N - number of indexed elements
52-
* @param sa - scalar constant
53-
* @param cx - input array
54-
* @param strideCX - `cx` stride length
55-
* @param offsetCX - starting index for `cx`
52+
* @param alpha - scalar constant
53+
* @param x - input array
54+
* @param strideX - `x` stride length
55+
* @param offsetX - starting index for `x`
5656
* @returns input array
5757
*
5858
* @example
5959
* var Complex64Array = require( '@stdlib/array/complex64' );
6060
*
61-
* var cx = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
61+
* var x = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
6262
*
63-
* csscal.ndarray( 3, 2.0, cx, 1, 0 );
64-
* // cx => <Complex64Array>[ 2.0, 4.0, 6.0, 8.0, 10.0, 12.0 ]
63+
* csscal.ndarray( 3, 2.0, x, 1, 0 );
64+
* // x => <Complex64Array>[ 2.0, 4.0, 6.0, 8.0, 10.0, 12.0 ]
6565
*/
66-
ndarray( N: number, sa: number, cx: Complex64Array, strideCX: number, offsetCX: number ): Complex64Array;
66+
ndarray( N: number, alpha: number, x: Complex64Array, strideX: number, offsetX: number ): Complex64Array;
6767
}
6868

6969
/**
7070
* Scales a single-precision complex floating-point vector by a single-precision floating-point constant.
7171
*
7272
* @param N - number of indexed elements
73-
* @param sa - scalar constant
74-
* @param cx - input array
75-
* @param strideCX - `cx` stride length
73+
* @param alpha - scalar constant
74+
* @param x - input array
75+
* @param strideX - `x` stride length
7676
* @returns input array
7777
*
7878
* @example
7979
* var Complex64Array = require( '@stdlib/array/complex64' );
8080
*
81-
* var cx = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
81+
* var x = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
8282
*
83-
* csscal( 3, 2.0, cx, 1 );
84-
* // cx => <Complex64Array>[ 2.0, 4.0, 6.0, 8.0, 10.0, 12.0 ]
83+
* csscal( 3, 2.0, x, 1 );
84+
* // x => <Complex64Array>[ 2.0, 4.0, 6.0, 8.0, 10.0, 12.0 ]
8585
*
8686
* @example
8787
* var Complex64Array = require( '@stdlib/array/complex64' );
8888
*
89-
* var cx = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
89+
* var x = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
9090
*
91-
* csscal.ndarray( 2, 2.0, cx, 1, 1 );
92-
* // cx => <Complex64Array>[ 1.0, 2.0, 6.0, 8.0, 10.0, 12.0 ]
91+
* csscal.ndarray( 2, 2.0, x, 1, 1 );
92+
* // x => <Complex64Array>[ 1.0, 2.0, 6.0, 8.0, 10.0, 12.0 ]
9393
*/
9494
declare var csscal: Routine;
9595

0 commit comments

Comments
 (0)