Skip to content

Commit a6b105b

Browse files
committed
chore: update implementation
--- 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 229f39c commit a6b105b

File tree

12 files changed

+229
-229
lines changed

12 files changed

+229
-229
lines changed

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

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

33-
#### icamax( N, cx, strideX )
33+
#### icamax( N, x, strideX )
3434

3535
Finds the index of the first element having maximum |Re(.)| + |Im(.)|.
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 icx = icamax( cx.length, cx, 1 );
42+
var y = icamax( x.length, x, 1 );
4343
// returns 1
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

52-
The `N` and `strideX` parameters determine which elements in `cx` are accessed at runtime. For example, to traverse every other value,
52+
The `N` and `strideX` parameters determine which elements in `x` are accessed at runtime. For example, to traverse 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 icx = icamax( 2, cx, 2 );
59+
var y = icamax( 2, x, 2 );
6060
// returns 1
6161
```
6262

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

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

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

7474
// Find index of element having the maximum absolute value:
75-
var icx = icamax( 2, cx1, 1 );
75+
var y = icamax( 2, x1, 1 );
7676
// returns 1
7777
```
7878

79-
#### icamax.ndarray( N, cx, strideX, offset )
79+
#### icamax.ndarray( N, x, strideX, offset )
8080

8181
Finds the index of the first element having maximum |Re(.)| + |Im(.)| using alternative indexing semantics.
8282

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

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

88-
var icx = icamax.ndarray( cx.length, cx, 1, 0 );
88+
var y = icamax.ndarray( x.length, x, 1, 0 );
8989
// returns 1
9090
```
9191

@@ -98,9 +98,9 @@ While [`typed array`][mdn-typed-array] views mandate a view offset based on the
9898
```javascript
9999
var Complex64Array = require( '@stdlib/array/complex64' );
100100

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

103-
var icx = icamax.ndarray( 3, cx, 1, 1 );
103+
var y = icamax.ndarray( 3, x, 1, 1 );
104104
// returns 2
105105
```
106106

@@ -136,11 +136,11 @@ function rand() {
136136
}
137137

138138
// Generate random input arrays:
139-
var cx = filledarrayBy( 10, 'complex64', rand );
140-
console.log( cx.toString() );
139+
var x = filledarrayBy( 10, 'complex64', rand );
140+
console.log( x.toString() );
141141

142-
var icx = icamax( cx.length, cx, 1 );
143-
console.log( icx );
142+
var y = icamax( x.length, x, 1 );
143+
console.log( y );
144144
```
145145

146146
</section>

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ var options = {
4646
* @returns {Function} benchmark function
4747
*/
4848
function createBenchmark( len ) {
49-
var cx = new Complex64Array( uniform( len*2, -100.0, 100.0, options ) );
49+
var x = new Complex64Array( uniform( len*2, -100.0, 100.0, options ) );
5050

5151
return benchmark;
5252

@@ -57,18 +57,18 @@ function createBenchmark( len ) {
5757
* @param {Benchmark} b - benchmark instance
5858
*/
5959
function benchmark( b ) {
60-
var idx;
60+
var y;
6161
var i;
6262

6363
b.tic();
6464
for ( i = 0; i < b.iterations; i++ ) {
65-
idx = icamax( cx.length, cx, 1 );
66-
if ( isnan( idx ) ) {
65+
y = icamax( x.length, x, 1 );
66+
if ( isnan( y ) ) {
6767
b.fail( 'should not return NaN' );
6868
}
6969
}
7070
b.toc();
71-
if ( isnan( idx ) ) {
71+
if ( isnan( y ) ) {
7272
b.fail( 'should not return NaN' );
7373
}
7474
b.pass( 'benchmark finished' );

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ var options = {
4646
* @returns {Function} benchmark function
4747
*/
4848
function createBenchmark( len ) {
49-
var cx = new Complex64Array( uniform( len*2, -100.0, 100.0, options ) );
49+
var x = new Complex64Array( uniform( len*2, -100.0, 100.0, options ) );
5050

5151
return benchmark;
5252

@@ -57,18 +57,18 @@ function createBenchmark( len ) {
5757
* @param {Benchmark} b - benchmark instance
5858
*/
5959
function benchmark( b ) {
60-
var idx;
60+
var y;
6161
var i;
6262

6363
b.tic();
6464
for ( i = 0; i < b.iterations; i++ ) {
65-
idx = icamax( cx.length, cx, 1, 0 );
66-
if ( isnan( idx ) ) {
65+
y = icamax( x.length, x, 1, 0 );
66+
if ( isnan( y ) ) {
6767
b.fail( 'should not return NaN' );
6868
}
6969
}
7070
b.toc();
71-
if ( isnan( idx ) ) {
71+
if ( isnan( y ) ) {
7272
b.fail( 'should not return NaN' );
7373
}
7474
b.pass( 'benchmark finished' );

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

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

2-
{{alias}}( N, cx, stride )
2+
{{alias}}( N, x, stride )
33
Finds the index of the first element having maximum |Re(.)| + |Im(.)|.
44

5-
The `N` and `stride` parameters determine which elements in `cx` are
5+
The `N` and `stride` parameters determine which elements in `x` are
66
accessed at runtime.
77

88
Indexing is relative to the first index. To introduce an offset, use typed
@@ -15,37 +15,37 @@
1515
N: integer
1616
Number of indexed elements.
1717

18-
cx: Complex64Array
18+
x: Complex64Array
1919
Input array.
2020

2121
stride: integer
22-
Index increment for `cx`.
22+
Index increment for `x`.
2323

2424
Returns
2525
-------
26-
idx: integer
26+
y: integer
2727
Index value.
2828

2929
Examples
3030
--------
3131
// Standard Usage:
32-
> var cx = new {{alias:@stdlib/array/complex64}}( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0 ] );
33-
> var idx = {{alias}}( cx.length, cx, 1 )
32+
> var x = new {{alias:@stdlib/array/complex64}}( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0 ] );
33+
> var y = {{alias}}( x.length, x, 1 )
3434
1
3535

3636
// Using `N` and `stride` parameters:
37-
> cx = new {{alias:@stdlib/array/complex64}}( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0 ] );
38-
> idx = {{alias}}( 2, cx, 2 )
37+
> x = new {{alias:@stdlib/array/complex64}}( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0 ] );
38+
> y = {{alias}}( 2, x, 2 )
3939
1
4040

4141
// Using view offsets:
4242
> var cx0 = new {{alias:@stdlib/array/complex64}}( [ 1.0, -2.0, 3.0, -4.0, 5.0, -6.0 ] );
43-
> var cx1 = new {{alias:@stdlib/array/complex64}}( cx0.buffer, cx0.BYTES_PER_ELEMENT*1 );
44-
> idx = {{alias}}( 2, cx1, 1 )
43+
> var x1 = new {{alias:@stdlib/array/complex64}}( cx0.buffer, cx0.BYTES_PER_ELEMENT*1 );
44+
> y = {{alias}}( 2, x1, 1 )
4545
1
4646

4747

48-
{{alias}}.ndarray( N, cx, stride, offsetX )
48+
{{alias}}.ndarray( N, x, stride, offsetX )
4949
Finds the index of the first element having the maximum absolute value using
5050
alternative indexing semantics.
5151

@@ -58,30 +58,30 @@
5858
N: integer
5959
Number of indexed elements.
6060

61-
cx: Complex64Array
61+
x: Complex64Array
6262
Input array.
6363

6464
stride: integer
65-
Index increment for `cx`.
65+
Index increment for `x`.
6666

6767
offsetX: integer
68-
Starting index of `cx`.
68+
Starting index of `x`.
6969

7070
Returns
7171
-------
72-
idx: integer
72+
y: integer
7373
Index value.
7474

7575
Examples
7676
--------
7777
// Standard Usage:
78-
> var cx = new {{alias:@stdlib/array/complex64}}( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0 ] );
79-
> var idx = {{alias}}.ndarray( cx.length, cx, 1, 0 )
78+
> var x = new {{alias:@stdlib/array/complex64}}( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0 ] );
79+
> var y = {{alias}}.ndarray( x.length, x, 1, 0 )
8080
1
8181

8282
// Using an index offset:
83-
> cx = new {{alias:@stdlib/array/complex64}}( [ 1.0, -2.0, 3.0, -4.0, 5.0, -6.0 ] );
84-
> idx = {{alias}}.ndarray( 2, cx, 1, 1 )
83+
> x = new {{alias:@stdlib/array/complex64}}( [ 1.0, -2.0, 3.0, -4.0, 5.0, -6.0 ] );
84+
> y = {{alias}}.ndarray( 2, x, 1, 1 )
8585
1
8686

8787
See Also

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

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -30,62 +30,62 @@ interface Routine {
3030
* Finds the index of the first element having maximum |Re(.)| + |Im(.)|.
3131
*
3232
* @param N - number of indexed elements
33-
* @param cx - input array
34-
* @param stride - stride length for `cx`
33+
* @param x - input array
34+
* @param stride - stride length for `x`
3535
* @returns index value
3636
*
3737
* @example
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 idx = icamax( cx.length, cx, 1 );
42+
* var y = icamax( x.length, x, 1 );
4343
* // returns 1
4444
*/
45-
( N: number, cx: Complex64Array, stride: number ): number;
45+
( N: number, x: Complex64Array, stride: number ): number;
4646

4747
/**
4848
* Finds the index of the first element having maximum |Re(.)| + |Im(.)| using alternative indexing semantics.
4949
*
5050
* @param N - number of indexed elements
51-
* @param cx - input array
52-
* @param stride - stride length for `cx`
53-
* @param offset - starting index for `cx`
51+
* @param x - input array
52+
* @param stride - stride length for `x`
53+
* @param offset - starting index for `x`
5454
* @returns index value
5555
*
5656
* @example
5757
* var Complex64Array = require( '@stdlib/array/complex64' );
5858
*
59-
* var cx = new Complex64Array( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ] );
59+
* var x = new Complex64Array( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ] );
6060
*
61-
* var idx = icamax.ndarray( cx.length, cx, 1, 0 );
61+
* var y = icamax.ndarray( x.length, x, 1, 0 );
6262
* // returns 1
6363
*/
64-
ndarray( N: number, cx: Complex64Array, stride: number, offset: number ): number;
64+
ndarray( N: number, x: Complex64Array, stride: number, offset: number ): number;
6565
}
6666

6767
/**
6868
* Finds the index of the first element having maximum |Re(.)| + |Im(.)|
6969
*
7070
* @param N - number of indexed elements
71-
* @param cx - input array
72-
* @param stride - stride length for `cx`
71+
* @param x - input array
72+
* @param stride - stride length for `x`
7373
* @returns index value
7474
*
7575
* @example
7676
* var Complex64Array = require( '@stdlib/array/complex64' );
7777
*
78-
* var cx = new Complex64Array( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ] );
78+
* var x = new Complex64Array( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ] );
7979
*
80-
* var idx = icamax( cx.length, cx, 1 );
80+
* var y = icamax( x.length, x, 1 );
8181
* // returns 1
8282
*
8383
* @example
8484
* var Complex64Array = require( '@stdlib/array/complex64' );
8585
*
86-
* var cx = new Complex64Array( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ] );
86+
* var x = new Complex64Array( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ] );
8787
*
88-
* var idx = icamax.ndarray( cx.length, cx, 1, 0 );
88+
* var y = icamax.ndarray( x.length, x, 1, 0 );
8989
* // returns 1
9090
*/
9191
declare var icamax: Routine;

0 commit comments

Comments
 (0)