Skip to content

Commit f26444e

Browse files
committed
chore: change variable naming
--- 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 160d9f0 commit f26444e

File tree

17 files changed

+283
-283
lines changed

17 files changed

+283
-283
lines changed

lib/node_modules/@stdlib/blas/base/wasm/scasum/README.md

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

33-
#### scasum.main( N, cx, stride )
33+
#### scasum.main( N, x, strideX )
3434

3535
Computes the sum of the absolute values of the real and imaginary components of a single-precision complex floating-point vector.
3636

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

40-
var cx = new Complex64Array( [ 2.0, 1.0, 3.0, 5.0, 4.0, 0.0, 1.0, 3.0 ] );
40+
var x = new Complex64Array( [ 2.0, 1.0, 3.0, 5.0, 4.0, 0.0, 1.0, 3.0 ] );
4141

42-
var sum = scasum.main( cx.length, cx, 1 );
42+
var sum = scasum.main( x.length, x, 1 );
4343
// returns 19.0
4444
```
4545

4646
The function has the following parameters:
4747

4848
- **N**: number of indexed elements.
49-
- **cx**: input [`Complex64Array`][@stdlib/array/complex64].
50-
- **strideX**: index increment for `cx`.
49+
- **x**: input [`Complex64Array`][@stdlib/array/complex64].
50+
- **strideX**: index increment for `x`.
5151

5252
The `N` and stride parameters determine which elements in the input strided array are accessed at runtime. For example, to compute the sum of every other value,
5353

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

57-
var cx = new Complex64Array( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ] );
57+
var x = new Complex64Array( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ] );
5858

59-
var sum = scasum.main( 2, cx, 2 );
59+
var sum = scasum.main( 2, x, 2 );
6060
// returns 7.0
6161
```
6262

@@ -68,44 +68,44 @@ Note that indexing is relative to the first index. To introduce an offset, use [
6868
var Complex64Array = require( '@stdlib/array/complex64' );
6969

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

7373
// Create a typed array view:
74-
var cx1 = new Complex64Array( cx0.buffer, cx0.BYTES_PER_ELEMENT*1 ); // start at 2nd element
74+
var x1 = new Complex64Array( x0.buffer, x0.BYTES_PER_ELEMENT*1 ); // start at 2nd element
7575

76-
var sum = scasum.main( 2, cx1, 2 );
76+
var sum = scasum.main( 2, x1, 2 );
7777
// returns 22.0
7878
```
7979

80-
#### scasum.ndarray( N, cx, strideX, offsetX )
80+
#### scasum.ndarray( N, x, strideX, offsetX )
8181

8282
Computes the sum of the absolute values of the real and imaginary components of a single-precision complex floating-point vector using alternative indexing semantics.
8383

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

87-
var cx = new Complex64Array( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ] );
87+
var x = new Complex64Array( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ] );
8888

89-
var sum = scasum.ndarray( cx.length, cx, 1, 0 );
89+
var sum = scasum.ndarray( x.length, x, 1, 0 );
9090
// returns 19.0
9191
```
9292

9393
The function has the following additional parameters:
9494

95-
- **offsetX**: starting index for `cx`.
95+
- **offsetX**: starting index for `x`.
9696

9797
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 compute the sum of last three elements,
9898

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

102-
var cx = new Complex64Array( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ] );
102+
var x = new Complex64Array( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ] );
103103

104-
var sum = scasum.ndarray( 2, cx, 1, cx.length-2 );
104+
var sum = scasum.ndarray( 2, x, 1, x.length-2 );
105105
// returns 8.0
106106

107107
// Using a negative stride to sum from the last element:
108-
sum = scasum.ndarray( 4, cx, -1, cx.length-1 );
108+
sum = scasum.ndarray( 4, x, -1, x.length-1 );
109109
// returns 19.0
110110
```
111111

@@ -180,7 +180,7 @@ The function has the following parameters:
180180

181181
- **N**: number of indexed elements.
182182
- **xp**: input [`Complex64Array`][@stdlib/array/complex64] pointer (i.e., byte offset).
183-
- **sx**: index increment for `cx`.
183+
- **sx**: index increment for `x`.
184184

185185
#### scasum.Module.prototype.ndarray( N, xp, sx, ox )
186186

@@ -224,7 +224,7 @@ var sum = mod.ndarray( N, xptr, 1, 0 );
224224

225225
The function has the following additional parameters:
226226

227-
- **ox**: starting index for `cx`.
227+
- **ox**: starting index for `x`.
228228

229229
</section>
230230

@@ -262,10 +262,10 @@ function rand() {
262262
return new Complex64( discreteUniform( 0, 10 ), discreteUniform( -5, 5 ) );
263263
}
264264

265-
var cx = filledarrayBy( 10, 'complex64', rand );
266-
console.log( cx.toString() );
265+
var x = filledarrayBy( 10, 'complex64', rand );
266+
console.log( x.toString() );
267267

268-
var out = scasum.ndarray( cx.length, cx, 1, 0 );
268+
var out = scasum.ndarray( x.length, x, 1, 0 );
269269
console.log( out );
270270
```
271271

lib/node_modules/@stdlib/blas/base/wasm/scasum/benchmark/benchmark.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ var options = {
5050
* @returns {Function} benchmark function
5151
*/
5252
function createBenchmark( len ) {
53-
var cx = new Complex64Array( uniform( len*2, -10.0, 10.0, options ) );
53+
var x = new Complex64Array( uniform( len*2, -10.0, 10.0, options ) );
5454
return benchmark;
5555

5656
/**
@@ -65,7 +65,7 @@ function createBenchmark( len ) {
6565

6666
b.tic();
6767
for ( i = 0; i < b.iterations; i++ ) {
68-
sum = scasum.main( cx.length, cx, 1 );
68+
sum = scasum.main( x.length, x, 1 );
6969
if ( isnanf( sum ) ) {
7070
b.fail( 'should not return NaN' );
7171
}

lib/node_modules/@stdlib/blas/base/wasm/scasum/benchmark/benchmark.module.main.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ function createBenchmark( len ) {
6666
var mem;
6767
var sum;
6868
var nb;
69-
var cx;
69+
var x;
7070
var N;
7171
var i;
7272

@@ -88,10 +88,10 @@ function createBenchmark( len ) {
8888
// Define a pointer (i.e., byte offset) for storing the input vector:
8989
xptr = 0;
9090

91-
cx = new Complex64Array( uniform( N, -10.0, 10.0, options ) );
91+
x = new Complex64Array( uniform( N, -10.0, 10.0, options ) );
9292

9393
// Write random values to module memory:
94-
mod.write( xptr, cx );
94+
mod.write( xptr, x );
9595

9696
b.tic();
9797
for ( i = 0; i < b.iterations; i++ ) {

lib/node_modules/@stdlib/blas/base/wasm/scasum/benchmark/benchmark.module.ndarray.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ function createBenchmark( len ) {
6666
var mem;
6767
var sum;
6868
var nb;
69-
var cx;
69+
var x;
7070
var N;
7171
var i;
7272

@@ -88,10 +88,10 @@ function createBenchmark( len ) {
8888
// Define a pointer (i.e., byte offset) for storing the input vector:
8989
xptr = 0;
9090

91-
cx = new Complex64Array( uniform( N, -10.0, 10.0, options ) );
91+
x = new Complex64Array( uniform( N, -10.0, 10.0, options ) );
9292

9393
// Write random values to module memory:
94-
mod.write( xptr, cx );
94+
mod.write( xptr, x );
9595

9696
b.tic();
9797
for ( i = 0; i < b.iterations; i++ ) {

lib/node_modules/@stdlib/blas/base/wasm/scasum/benchmark/benchmark.ndarray.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ var options = {
5050
* @returns {Function} benchmark function
5151
*/
5252
function createBenchmark( len ) {
53-
var cx = new Complex64Array( uniform( len*2, -10.0, 10.0, options ) );
53+
var x = new Complex64Array( uniform( len*2, -10.0, 10.0, options ) );
5454
return benchmark;
5555

5656
/**
@@ -65,7 +65,7 @@ function createBenchmark( len ) {
6565

6666
b.tic();
6767
for ( i = 0; i < b.iterations; i++ ) {
68-
sum = scasum.ndarray( cx.length, cx, 1, 0 );
68+
sum = scasum.ndarray( x.length, x, 1, 0 );
6969
if ( isnanf( sum ) ) {
7070
b.fail( 'should not return NaN' );
7171
}

lib/node_modules/@stdlib/blas/base/wasm/scasum/docs/repl.txt

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

2-
{{alias}}.main( N, cx, strideX )
2+
{{alias}}.main( N, x, strideX )
33
Computes the sum of the absolute values of the real and imaginary
44
components of a single-precision complex floating-point vector.
55

@@ -16,11 +16,11 @@
1616
N: integer
1717
Number of indexed elements.
1818

19-
cx: Complex64Array
19+
x: Complex64Array
2020
Input array.
2121

2222
strideX: integer
23-
Index increment for `cx`.
23+
Index increment for `x`.
2424

2525
Returns
2626
-------
@@ -30,22 +30,22 @@
3030
Examples
3131
--------
3232
// Standard usage:
33-
> var cx = new {{alias:@stdlib/array/complex64}}( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0 ] );
34-
> var s = {{alias}}.main( cx.length, cx, 1 )
33+
> var x = new {{alias:@stdlib/array/complex64}}( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0 ] );
34+
> var s = {{alias}}.main( x.length, x, 1 )
3535
15.0
3636

3737
// Using `N` and stride parameters:
38-
> s = {{alias}}.main( 2, cx, 2 )
38+
> s = {{alias}}.main( 2, x, 2 )
3939
7.0
4040

4141
// Use view offset; e.g., starting at 2nd element:
42-
> var cx0 = new {{alias:@stdlib/array/complex64}}([1.0,-2.0,3.0,-4.0,5.0,-6.0,7.0,-8.0 ]);
43-
> var cx1 = new {{alias:@stdlib/array/complex64}}( cx0.buffer, cx0.BYTES_PER_ELEMENT*1 );
44-
> s = {{alias}}.main( 2, cx1, 2 )
42+
> var x0 = new {{alias:@stdlib/array/complex64}}([1.0,-2.0,3.0,-4.0,5.0,-6.0,7.0,-8.0 ]);
43+
> var x1 = new {{alias:@stdlib/array/complex64}}( x0.buffer, x0.BYTES_PER_ELEMENT*1 );
44+
> s = {{alias}}.main( 2, x1, 2 )
4545
22.0
4646

4747

48-
{{alias}}.ndarray( N, cx, strideX, offsetX )
48+
{{alias}}.ndarray( N, x, strideX, offsetX )
4949
Computes the sum of the absolute values of the real and imaginary
5050
components of a single-precision complex floating-point vector
5151
using alternative indexing semantics.
@@ -59,14 +59,14 @@
5959
N: integer
6060
Number of indexed elements.
6161

62-
cx: Complex64Array
62+
x: Complex64Array
6363
Input array.
6464

6565
strideX: integer
66-
Index increment for `cx`.
66+
Index increment for `x`.
6767

6868
offsetX: integer
69-
Starting index for `cx`.
69+
Starting index for `x`.
7070

7171
Returns
7272
-------
@@ -76,13 +76,13 @@
7676
Examples
7777
--------
7878
// Standard usage:
79-
> var cx = new {{alias:@stdlib/array/complex64}}( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0 ] );
80-
> var s = {{alias}}.ndarray( cx.length, cx, 1, 0 )
79+
> var x = new {{alias:@stdlib/array/complex64}}( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0 ] );
80+
> var s = {{alias}}.ndarray( x.length, x, 1, 0 )
8181
15.0
8282

8383
// Using offset parameter:
84-
> cx = new {{alias:@stdlib/array/complex64}}( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0 ] );
85-
> s = {{alias}}.ndarray( 3, cx, -1, cx.length-1 )
84+
> x = new {{alias:@stdlib/array/complex64}}( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0 ] );
85+
> s = {{alias}}.ndarray( 3, x, -1, x.length-1 )
8686
15.0
8787

8888

@@ -430,7 +430,7 @@
430430
Input array pointer (i.e., byte offset).
431431

432432
sx: integer
433-
Index increment for `cx`.
433+
Index increment for `x`.
434434

435435
Returns
436436
-------
@@ -468,10 +468,10 @@
468468
Input array pointer (i.e., byte offset).
469469

470470
sx: integer
471-
Index increment for `cx`.
471+
Index increment for `x`.
472472

473473
ox: integer
474-
Starting index for `cx`.
474+
Starting index for `x`.
475475

476476
Returns
477477
-------

0 commit comments

Comments
 (0)