Skip to content

Commit 7b52be7

Browse files
committed
chore: cleaning 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: passed - task: lint_package_json status: na - task: lint_repl_help status: passed - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: passed - task: lint_javascript_benchmarks status: na - 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 076d95a commit 7b52be7

File tree

6 files changed

+62
-34
lines changed

6 files changed

+62
-34
lines changed

lib/node_modules/@stdlib/lapack/base/iladlc/README.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ limitations under the License.
2020

2121
# iladlc
2222

23-
> Find the index of the last non-zero column in a matrix `A`
23+
> Find the index of the last non-zero column in a matrix `A`.
2424
2525
<section class="usage">
2626

@@ -65,19 +65,19 @@ Note that indexing is relative to the first index. To introduce an offset, use [
6565
```javascript
6666
var Float64Array = require( '@stdlib/array/float64' );
6767

68-
// Initial arrays...
68+
// Initial array:
6969
var A0 = new Float64Array( [ 9999.0, 1.0, 2.0, 0.0, 3.0, 4.0, 0.0 ] );
7070

71-
// Create offset views...
71+
// Create an offset view:
7272
var A1 = new Float64Array( A0.buffer, A0.BYTES_PER_ELEMENT*1 ); // start at 2nd element
7373

7474
var out = iladlc( 'row-major', 2, 3, A1, 3 );
7575
// returns 1
7676
```
7777

78-
#### iladlc.ndarray( uplo, M, N, A, sa1, sa2, oa, B, sb1, sb2, ob )
78+
#### iladlc.ndarray( M, N, A, strideA1, strideA2, offsetA )
7979

80-
Finds the index of the last non-zero column in a matrix `A` using alternative indexing semantics.
80+
Returns the index of the last non-zero column in a matrix `A` using alternative indexing semantics.
8181

8282
```javascript
8383
var Float64Array = require( '@stdlib/array/float64' );
@@ -100,11 +100,11 @@ The function has the following parameters:
100100
- **M**: number of rows in `A`.
101101
- **N**: number of columns in `A`.
102102
- **A**: input [`Float64Array`][mdn-float64array].
103-
- **sa1**: stride of the first dimension of `A`.
104-
- **sa2**: stride of the second dimension of `A`.
105-
- **oa**: starting index for `A`.
103+
- **strideA1**: stride of the first dimension of `A`.
104+
- **strideA2**: stride of the second dimension of `A`.
105+
- **offsetA**: starting index for `A`.
106106

107-
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,
107+
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,
108108

109109
```javascript
110110
var Float64Array = require( '@stdlib/array/float64' );
@@ -130,6 +130,7 @@ var out = iladlc.ndarray( 2, 3, A, 3, 1, 1 );
130130

131131
## Notes
132132

133+
- This routine is commonly used throughout LAPACK to shrink work domains (e.g., before bulge-chasing, deflation, or when trimming Householder panels), thus ensuring that higher-level routines operate only on numerically relevant sub-matrices.
133134
- `iladlc()` corresponds to the [LAPACK][lapack] routine [`iladlc`][lapack-iladlc].
134135

135136
</section>

lib/node_modules/@stdlib/lapack/base/iladlc/docs/repl.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525

2626
Returns
2727
-------
28-
iladlr: integer
29-
Zero based index of the last non-zero column.
28+
out: integer
29+
Zero-based index of the last non-zero column.
3030

3131
Examples
3232
--------
@@ -35,7 +35,7 @@
3535
1
3636

3737

38-
{{alias}}.ndarray( M, N, A, sa1, sa2, oa )
38+
{{alias}}.ndarray( M, N, A, strideA1, strideA2, offsetA )
3939
Returns the index of the last non-zero column in a matrix `A` using
4040
alternative indexing semantics.
4141

@@ -57,19 +57,19 @@
5757
A: Float64Array
5858
Input matrix `A`.
5959

60-
sa1: integer
60+
strideA1: integer
6161
Stride of the first dimension of `A`.
6262

63-
sa2: integer
63+
strideA2: integer
6464
Stride of the second dimension of `A`.
6565

66-
oa: integer
66+
offsetA: integer
6767
Starting index for `A`.
6868

6969
Returns
7070
-------
71-
iladlr: integer
72-
Zero based index of the last non-zero column.
71+
out: integer
72+
Zero-based index of the last non-zero column.
7373

7474
Examples
7575
--------

lib/node_modules/@stdlib/lapack/base/iladlc/docs/types/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ interface Routine {
5151
( order: Layout, M: number, N: number, A: Float64Array, LDA: number ): number;
5252

5353
/**
54-
* Finds the index of the last non-zero column in a matrix `A` using alternative indexing semantics.
54+
* Returns the index of the last non-zero column in a matrix `A` using alternative indexing semantics.
5555
*
5656
* ## Notes
5757
*

lib/node_modules/@stdlib/lapack/base/iladlc/docs/types/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ import iladlc = require( './index' );
199199
iladlc.ndarray( 2, 2, A, 2, 1, ( x: number ): number => x ); // $ExpectError
200200
}
201201

202-
// The compiler throws an error if the `ndarray` method is provided an unsupported number of arguments (6-argument version)...
202+
// The compiler throws an error if the `ndarray` method is provided an unsupported number of arguments...
203203
{
204204
const A = new Float64Array( 4 );
205205

lib/node_modules/@stdlib/lapack/base/iladlc/test/test.iladlc.js

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ tape( 'the function throws an error if provided a first argument which is not a
8484
}
8585
});
8686

87-
tape( 'the function throws an error if provided a fourth argument which is not a valid `LDA` value (row-major)', function test( t ) {
87+
tape( 'the function throws an error if provided a fifth argument which is not a valid `LDA` value (row-major)', function test( t ) {
8888
var values;
8989
var data;
9090
var A;
@@ -111,7 +111,34 @@ tape( 'the function throws an error if provided a fourth argument which is not a
111111
}
112112
});
113113

114-
tape( 'the function returns an invalid index (-1) when M is zero', function test( t ) {
114+
tape( 'the function throws an error if provided a fifth argument which is not a valid `LDA` value (column-major)', function test( t ) {
115+
var values;
116+
var data;
117+
var A;
118+
var i;
119+
120+
data = COLUMN_MAJOR_DATA;
121+
122+
values = [
123+
0,
124+
1
125+
];
126+
127+
A = new Float64Array( data.A );
128+
129+
for ( i = 0; i < values.length; i++ ) {
130+
t.throws( badValue( values[ i ] ), RangeError, 'throws an error when provided ' + values[ i ] );
131+
}
132+
t.end();
133+
134+
function badValue( value ) {
135+
return function badValue() {
136+
iladlc( data.order, data.M, data.N, A, value );
137+
};
138+
}
139+
});
140+
141+
tape( 'the function returns an invalid index (-1) when M is less than or equal to zero', function test( t ) {
115142
var data;
116143
var out;
117144
var A;
@@ -125,7 +152,7 @@ tape( 'the function returns an invalid index (-1) when M is zero', function test
125152
t.end();
126153
});
127154

128-
tape( 'the function returns an invalid index (-1) when N is zero', function test( t ) {
155+
tape( 'the function returns an invalid index (-1) when N is less than or equal to zero', function test( t ) {
129156
var data;
130157
var out;
131158
var A;
@@ -139,7 +166,7 @@ tape( 'the function returns an invalid index (-1) when N is zero', function test
139166
t.end();
140167
});
141168

142-
tape( 'the function returns the expected zero based index of the last non-zero column of a matrix (row-major)', function test( t ) {
169+
tape( 'the function returns the expected zero-based index of the last non-zero column of a matrix (row-major)', function test( t ) {
143170
var data;
144171
var out;
145172
var A;
@@ -153,7 +180,7 @@ tape( 'the function returns the expected zero based index of the last non-zero c
153180
t.end();
154181
});
155182

156-
tape( 'the function returns the expected zero based index of the last non-zero column of a matrix (column-major)', function test( t ) {
183+
tape( 'the function returns the expected zero-based index of the last non-zero column of a matrix (column-major)', function test( t ) {
157184
var data;
158185
var out;
159186
var A;

lib/node_modules/@stdlib/lapack/base/iladlc/test/test.ndarray.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ tape( 'the function has an arity of 6', function test( t ) {
6868
t.end();
6969
});
7070

71-
tape( 'the function returns the expected zero based index of the last non-zero column of a matrix (row-major)', function test( t ) {
71+
tape( 'the function returns the expected zero-based index of the last non-zero column of a matrix (row-major)', function test( t ) {
7272
var data;
7373
var out;
7474
var A;
@@ -82,7 +82,7 @@ tape( 'the function returns the expected zero based index of the last non-zero c
8282
t.end();
8383
});
8484

85-
tape( 'the function returns the expected zero based index of the last non-zero column of a matrix (column-major)', function test( t ) {
85+
tape( 'the function returns the expected zero-based index of the last non-zero column of a matrix (column-major)', function test( t ) {
8686
var data;
8787
var out;
8888
var A;
@@ -124,7 +124,7 @@ tape( 'the function returns an invalid index (-1) when all elements in a matrix
124124
t.end();
125125
});
126126

127-
tape( 'the function returns the expected zero based index of the last non-zero column of a matrix (row-major) (offsets)', function test( t ) {
127+
tape( 'the function returns the expected zero-based index of the last non-zero column of a matrix (row-major) (offsets)', function test( t ) {
128128
var data;
129129
var out;
130130
var A;
@@ -138,7 +138,7 @@ tape( 'the function returns the expected zero based index of the last non-zero c
138138
t.end();
139139
});
140140

141-
tape( 'the function returns the expected zero based index of the last non-zero column of a matrix (column-major) (offsets)', function test( t ) {
141+
tape( 'the function returns the expected zero-based index of the last non-zero column of a matrix (column-major) (offsets)', function test( t ) {
142142
var data;
143143
var out;
144144
var A;
@@ -180,7 +180,7 @@ tape( 'the function returns an invalid index (-1) when all elements in a matrix
180180
t.end();
181181
});
182182

183-
tape( 'the function returns the expected zero based index of the last non-zero column of a matrix (row-major) (mixed strides)', function test( t ) {
183+
tape( 'the function returns the expected zero-based index of the last non-zero column of a matrix (row-major) (mixed strides)', function test( t ) {
184184
var data;
185185
var out;
186186
var A;
@@ -194,7 +194,7 @@ tape( 'the function returns the expected zero based index of the last non-zero c
194194
t.end();
195195
});
196196

197-
tape( 'the function returns the expected zero based index of the last non-zero column of a matrix (column-major) (mixed strides)', function test( t ) {
197+
tape( 'the function returns the expected zero-based index of the last non-zero column of a matrix (column-major) (mixed strides)', function test( t ) {
198198
var data;
199199
var out;
200200
var A;
@@ -236,7 +236,7 @@ tape( 'the function returns an invalid index (-1) when all elements in a matrix
236236
t.end();
237237
});
238238

239-
tape( 'the function returns the expected zero based index of the last non-zero column of a matrix (row-major) (negative strides)', function test( t ) {
239+
tape( 'the function returns the expected zero-based index of the last non-zero column of a matrix (row-major) (negative strides)', function test( t ) {
240240
var data;
241241
var out;
242242
var A;
@@ -250,7 +250,7 @@ tape( 'the function returns the expected zero based index of the last non-zero c
250250
t.end();
251251
});
252252

253-
tape( 'the function returns the expected zero based index of the last non-zero column of a matrix (column-major) (negative strides)', function test( t ) {
253+
tape( 'the function returns the expected zero-based index of the last non-zero column of a matrix (column-major) (negative strides)', function test( t ) {
254254
var data;
255255
var out;
256256
var A;
@@ -292,7 +292,7 @@ tape( 'the function returns an invalid index (-1) when all elements in a matrix
292292
t.end();
293293
});
294294

295-
tape( 'the function returns the expected zero based index of the last non-zero column of a matrix (row-major) (large strides)', function test( t ) {
295+
tape( 'the function returns the expected zero-based index of the last non-zero column of a matrix (row-major) (large strides)', function test( t ) {
296296
var data;
297297
var out;
298298
var A;
@@ -306,7 +306,7 @@ tape( 'the function returns the expected zero based index of the last non-zero c
306306
t.end();
307307
});
308308

309-
tape( 'the function returns the expected zero based index of the last non-zero column of a matrix (column-major) (large strides)', function test( t ) {
309+
tape( 'the function returns the expected zero-based index of the last non-zero column of a matrix (column-major) (large strides)', function test( t ) {
310310
var data;
311311
var out;
312312
var A;

0 commit comments

Comments
 (0)