Skip to content

Commit b1ffa9b

Browse files
committed
docs: add readme
1 parent 5c783d7 commit b1ffa9b

File tree

1 file changed

+232
-0
lines changed
  • lib/node_modules/@stdlib/lapack/base/iladlr

1 file changed

+232
-0
lines changed
Lines changed: 232 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,232 @@
1+
<!--
2+
3+
@license Apache-2.0
4+
5+
Copyright (c) 2024 The Stdlib Authors.
6+
7+
Licensed under the Apache License, Version 2.0 (the "License");
8+
you may not use this file except in compliance with the License.
9+
You may obtain a copy of the License at
10+
11+
http://www.apache.org/licenses/LICENSE-2.0
12+
13+
Unless required by applicable law or agreed to in writing, software
14+
distributed under the License is distributed on an "AS IS" BASIS,
15+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
See the License for the specific language governing permissions and
17+
limitations under the License.
18+
19+
-->
20+
21+
# iladlr
22+
23+
> Return last non-zero row of matrix `A`.
24+
25+
<section class="usage">
26+
27+
## Usage
28+
29+
```javascript
30+
var iladlr = require( '@stdlib/lapack/base/iladlr' );
31+
```
32+
33+
#### iladlr( order, M, N, A, LDA )
34+
35+
Returns last non-zero row of matrix `A`.
36+
37+
```javascript
38+
var Float64Array = require( '@stdlib/array/float64' );
39+
40+
var out;
41+
var A = new Float64Array( [ 1.0, 2.0, 3.0, 4.0 ] );
42+
43+
out = iladlr( 'row-major', 2, 2, A, 2 );
44+
// returns 1
45+
```
46+
47+
The function has the following parameters:
48+
49+
- **order**: storage layout.
50+
- **M**: number of rows in `A`.
51+
- **N**: number of columns in `A`.
52+
- **A**: input [`Float64Array`][mdn-float64array].
53+
- **LDA**: stride of the first dimension of `A` (a.k.a., leading dimension of the matrix `A`).
54+
55+
Note that indexing is relative to the first index. To introduce an offset, use [`typed array`][mdn-typed-array] views.
56+
57+
<!-- eslint-disable stdlib/capitalized-comments -->
58+
59+
```javascript
60+
var Float64Array = require( '@stdlib/array/float64' );
61+
62+
// Initial an array.
63+
var A0 = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );
64+
65+
// Create offset view.
66+
var A1 = new Float64Array( A0.buffer, A0.BYTES_PER_ELEMENT*1 ); // start at 2nd element
67+
68+
var out = iladlr( 'row-major', 2, 2, A1, 2 );
69+
// out => 1
70+
```
71+
72+
#### iladlr.ndarray( M, N, A, strideA1, strideA2, offsetA )
73+
74+
Returns last non-zero row of matrix `A` using alternative indexing semantics.
75+
76+
```javascript
77+
var Float64Array = require( '@stdlib/array/float64' );
78+
79+
var out;
80+
var A = new Float64Array( [ 1.0, 2.0, 3.0, 4.0 ] );
81+
82+
out = iladlr.ndarray( 2, 2, A, 2, 1, 0 );
83+
// returns 1
84+
```
85+
86+
The function has the following parameters:
87+
88+
- **M**: number of rows in `A`.
89+
- **N**: number of columns in `A`.
90+
- **A**: input [`Float64Array`][mdn-float64array].
91+
- **sa1**: stride of the first dimension of `A`.
92+
- **sa2**: stride of the second dimension of `A`.
93+
- **oa**: starting index for `A`.
94+
95+
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,
96+
97+
```javascript
98+
var Float64Array = require( '@stdlib/array/float64' );
99+
100+
var out;
101+
var A = new Float64Array( [ 4.0, 3.0, 2.0, 4.0 ] );
102+
103+
out = iladlr.ndarray( 2, 2, A, -2, -1, 3 );
104+
// returns 1
105+
```
106+
107+
</section>
108+
109+
<!-- /.usage -->
110+
111+
<section class="notes">
112+
113+
## Notes
114+
115+
- `iladlr()` corresponds to the [LAPACK][lapack] routine [`iladlr`][lapack-iladlr].
116+
117+
</section>
118+
119+
<!-- /.notes -->
120+
121+
<section class="examples">
122+
123+
## Examples
124+
125+
<!-- eslint no-undef: "error" -->
126+
127+
```javascript
128+
var Float64Array = require( '@stdlib/array/float64' );
129+
var iladlr = require( '@stdlib/lapack/base/iladlr' );
130+
131+
var A = new Float64Array( [ 1.0, 2.0, 3.0, 4.0 ] );
132+
var out = iladlr( 'row-major', 2, 2, A, 2 );
133+
console.log( out );
134+
```
135+
136+
</section>
137+
138+
<!-- /.examples -->
139+
140+
<!-- C interface documentation. -->
141+
142+
* * *
143+
144+
<section class="c">
145+
146+
## C APIs
147+
148+
<!-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. -->
149+
150+
<section class="intro">
151+
152+
</section>
153+
154+
<!-- /.intro -->
155+
156+
<!-- C usage documentation. -->
157+
158+
<section class="usage">
159+
160+
### Usage
161+
162+
```c
163+
TODO
164+
```
165+
166+
#### TODO
167+
168+
TODO.
169+
170+
```c
171+
TODO
172+
```
173+
174+
TODO
175+
176+
```c
177+
TODO
178+
```
179+
180+
</section>
181+
182+
<!-- /.usage -->
183+
184+
<!-- C API usage notes. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
185+
186+
<section class="notes">
187+
188+
</section>
189+
190+
<!-- /.notes -->
191+
192+
<!-- C API usage examples. -->
193+
194+
<section class="examples">
195+
196+
### Examples
197+
198+
```c
199+
TODO
200+
```
201+
202+
</section>
203+
204+
<!-- /.examples -->
205+
206+
</section>
207+
208+
<!-- /.c -->
209+
210+
<!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. -->
211+
212+
<section class="related">
213+
214+
</section>
215+
216+
<!-- /.related -->
217+
218+
<!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
219+
220+
<section class="links">
221+
222+
[lapack]: https://www.netlib.org/lapack/explore-html/
223+
224+
[lapack-iladlr]: https://netlib.org/lapack/explore-html//da/d60/group__ilalr_gadb53a9bd5cc7a6e3bbca7bf4eca32208.html#gadb53a9bd5cc7a6e3bbca7bf4eca32208
225+
226+
[mdn-float64array]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float64Array
227+
228+
[mdn-typed-array]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray
229+
230+
</section>
231+
232+
<!-- /.links -->

0 commit comments

Comments
 (0)