Skip to content

Commit dae5fee

Browse files
Merge branch 'stdlib-js:develop' into refactor-variancetk
2 parents b2dfc4e + 654827d commit dae5fee

File tree

405 files changed

+14066
-2856
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

405 files changed

+14066
-2856
lines changed

.mailmap

+3-2
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,9 @@ Ori Miles <[email protected]> orimiles5
141141
Philipp Burckhardt <[email protected]> <[email protected]>
142142
Philipp Burckhardt <[email protected]> Planeshifter
143143

144-
145-
Pranav Goswami <[email protected]> Pranav
144+
145+
146+
Pranav Goswami <[email protected]> Pranav
146147

147148
Pranjal Jha <[email protected]> PraneGIT
148149

CONTRIBUTORS

+6
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,10 @@ Aksshay Balasubramanian <[email protected]>
1717
Aleksandr <[email protected]>
1818
Ali Salesi <[email protected]>
1919
Aman Bhansali <[email protected]>
20+
AmanBhadkariya <[email protected]>
2021
Amit Jimiwal <[email protected]>
2122
Anshu Kumar <[email protected]>
23+
Anshu Kumar <[email protected]>
2224
Anudeep Sanapala <[email protected]>
2325
Athan Reines <[email protected]>
2426
@@ -33,6 +35,7 @@ Daniel Yu <[email protected]>
3335
Debashis Maharana <[email protected]>
3436
Desh Deepak Kant <[email protected]>
3537
38+
Dhanyabad behera <[email protected]>
3639
Dhruv Arvind Singh <[email protected]>
3740
Dhruvil Mehta <[email protected]>
3841
Divyansh Seth <[email protected]>
@@ -47,12 +50,14 @@ Gautam sharma <[email protected]>
4750
Golden Kumar <[email protected]>
4851
Gunj Joshi <[email protected]>
4952
Gururaj Gurram <[email protected]>
53+
Haroon Rasheed <[email protected]>
5054
5155
5256
Harshita Kalani <[email protected]>
5357
Hemant M Mehta <[email protected]>
5458
Hridyanshu <[email protected]>
5559
Jaimin Godhani <[email protected]>
60+
Jaison D Souza <[email protected]>
5661
Jalaj Kumar <[email protected]>
5762
James Gelok <[email protected]>
5863
Jaysukh Makvana <[email protected]>
@@ -66,6 +71,7 @@ Justin Dennison <[email protected]>
6671
Justyn Shelby <[email protected]>
6772
Karan Anand <[email protected]>
6873
Karthik Prakash <[email protected]>
74+
Kaushikgtm <[email protected]>
6975
Kohantika Nath <[email protected]>
7076
Krishnam Agarwal <[email protected]>
7177
Krishnendu Das <[email protected]>

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

+36
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ import scopy = require( '@stdlib/blas/base/scopy' );
4141
import sdot = require( '@stdlib/blas/base/sdot' );
4242
import snrm2 = require( '@stdlib/blas/base/snrm2' );
4343
import srot = require( '@stdlib/blas/base/srot' );
44+
import srotm = require( '@stdlib/blas/base/srotm' );
4445
import sscal = require( '@stdlib/blas/base/sscal' );
4546
import zcopy = require( '@stdlib/blas/base/zcopy' );
4647
import zdrot = require( '@stdlib/blas/base/zdrot' );
@@ -677,6 +678,41 @@ interface Namespace {
677678
*/
678679
srot: typeof srot;
679680

681+
/**
682+
* Applies a modified Givens plane rotation.
683+
*
684+
* @param N - number of indexed elements
685+
* @param x - first input array
686+
* @param strideX - `x` stride length
687+
* @param y - second input array
688+
* @param strideY - `y` stride length
689+
* @param param - parameters for the modified Givens transformation
690+
* @returns `y`
691+
*
692+
* @example
693+
* var Float32Array = require( '@stdlib/array/float32' );
694+
*
695+
* var x = new Float32Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );
696+
* var y = new Float32Array( [ 6.0, 7.0, 8.0, 9.0, 10.0 ] );
697+
* var param = new Float32Array( [ 0.0, 0.0, 2.0, -3.0, 0.0 ] );
698+
*
699+
* ns.srotm( 2, x, 2, y, 1, param );
700+
* // x => <Float32Array>[ ~-17.0, 2.0, ~-18.0, 4.0, 5.0 ]
701+
* // y => <Float32Array>[ ~8.0, ~13.0, 8.0, 9.0, 10.0 ]
702+
*
703+
* @example
704+
* var Float32Array = require( '@stdlib/array/float32' );
705+
*
706+
* var x = new Float32Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );
707+
* var y = new Float32Array( [ 6.0, 7.0, 8.0, 9.0, 10.0 ] );
708+
* var param = new Float32Array( [ 0.0, 0.0, 2.0, -3.0, 0.0 ] );
709+
*
710+
* ns.srotm.ndarray( 2, x, 1, 0, y, 2, 1, param );
711+
* // x => <Float32Array>[ ~-20.0, ~-25.0, 3.0, 4.0, 5.0 ]
712+
* // y => <Float32Array>[ 6.0, ~9.0, 8.0, ~13.0, 10.0 ]
713+
*/
714+
srotm: typeof srotm;
715+
680716
/**
681717
* Multiplies a single-precision floating-point vector `x` by a constant `alpha`.
682718
*

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

+10-100
Original file line numberDiff line numberDiff line change
@@ -36,31 +36,13 @@ Applies a plane rotation.
3636

3737
```javascript
3838
var Complex128Array = require( '@stdlib/array/complex128' );
39-
var real = require( '@stdlib/complex/float64/real' );
40-
var imag = require( '@stdlib/complex/float64/imag' );
4139

4240
var zx = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
4341
var zy = new Complex128Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );
4442

4543
zdrot.main( zx.length, zx, 1, zy, 1, 0.8, 0.6 );
46-
47-
var z = zy.get( 0 );
48-
// returns <Complex128>
49-
50-
var re = real( z );
51-
// returns ~-0.6
52-
53-
var im = imag( z );
54-
// returns ~-1.2
55-
56-
z = zx.get( 0 );
57-
// returns <Complex128>
58-
59-
re = real( z );
60-
// returns ~0.8
61-
62-
im = imag( z );
63-
// returns ~1.6
44+
// zx => <Complex128Array>[ ~0.8, ~1.6, ~2.4, ~3.2, 4.0, ~4.8, ~5.6, ~6.4 ]
45+
// zy => <Complex128Array>[ ~-0.6, ~-1.2, ~-1.8, ~-2.4, -3.0, ~-3.6, ~-4.2, ~-4.8 ]
6446
```
6547

6648
The function has the following parameters:
@@ -77,31 +59,13 @@ The `N` and stride parameters determine how values in the strided arrays are acc
7759

7860
```javascript
7961
var Complex128Array = require( '@stdlib/array/complex128' );
80-
var real = require( '@stdlib/complex/float64/real' );
81-
var imag = require( '@stdlib/complex/float64/imag' );
8262

8363
var zx = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
8464
var zy = new Complex128Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );
8565

8666
zdrot.main( 2, zx, 2, zy, 2, 0.8, 0.6 );
87-
88-
var z = zy.get( 0 );
89-
// returns <Complex128>
90-
91-
var re = real( z );
92-
// returns ~-0.6
93-
94-
var im = imag( z );
95-
// returns ~-1.2
96-
97-
z = zx.get( 0 );
98-
// returns <Complex128>
99-
100-
re = real( z );
101-
// returns ~0.8
102-
103-
im = imag( z );
104-
// returns ~1.6
67+
// zx => <Complex128Array>[ ~0.8, ~1.6, 3.0, 4.0, 4.0, ~4.8, 7.0, 8.0 ]
68+
// zy => <Complex128Array>[ ~-0.6, ~-1.2, 0.0, 0.0, -3.0, ~-3.6, 0.0, 0.0 ]
10569
```
10670

10771
Note that indexing is relative to the first index. To introduce an offset, use [`typed array`][mdn-typed-array] views.
@@ -110,8 +74,6 @@ Note that indexing is relative to the first index. To introduce an offset, use [
11074

11175
```javascript
11276
var Complex128Array = require( '@stdlib/array/complex128' );
113-
var real = require( '@stdlib/complex/float64/real' );
114-
var imag = require( '@stdlib/complex/float64/imag' );
11577

11678
// Initial arrays...
11779
var zx0 = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
@@ -122,24 +84,8 @@ var zx1 = new Complex128Array( zx0.buffer, zx0.BYTES_PER_ELEMENT*1 ); // start a
12284
var zy1 = new Complex128Array( zy0.buffer, zy0.BYTES_PER_ELEMENT*2 ); // start at 3rd element
12385

12486
zdrot.main( 2, zx1, -2, zy1, 1, 0.8, 0.6 );
125-
126-
var z = zy0.get( 2 );
127-
// returns <Complex128>
128-
129-
var re = real( z );
130-
// returns ~-4.2
131-
132-
var im = imag( z );
133-
// returns ~-4.8
134-
135-
z = zx0.get( 3 );
136-
// returns <Complex128>
137-
138-
re = real( z );
139-
// returns ~5.6
140-
141-
im = imag( z );
142-
// returns ~6.4
87+
// zx0 => <Complex128Array>[ 1.0, 2.0, ~2.4, ~3.2, 5.0, 6.0, ~5.6, ~6.4 ]
88+
// zy0 => <Complex128Array>[ 0.0, 0.0, 0.0, 0.0, ~-4.2, ~-4.8, ~-1.8, ~-2.4 ]
14389
```
14490

14591
#### zdrot.ndarray( N, zx, strideX, offsetX, zy, strideY, offsetY, c, s )
@@ -148,31 +94,13 @@ Applies a plane rotation using alternative indexing semantics.
14894

14995
```javascript
15096
var Complex128Array = require( '@stdlib/array/complex128' );
151-
var real = require( '@stdlib/complex/float64/real' );
152-
var imag = require( '@stdlib/complex/float64/imag' );
15397

15498
var zx = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
15599
var zy = new Complex128Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );
156100

157101
zdrot.ndarray( zx.length, zx, 1, 0, zy, 1, 0, 0.8, 0.6 );
158-
159-
var z = zy.get( 0 );
160-
// returns <Complex128>
161-
162-
var re = real( z );
163-
// returns ~-0.6
164-
165-
var im = imag( z );
166-
// returns ~-1.2
167-
168-
z = zx.get( 0 );
169-
// returns <Complex128>
170-
171-
re = real( z );
172-
// returns ~0.8
173-
174-
im = imag( z );
175-
// returns ~1.6
102+
// zx => <Complex128Array>[ ~0.8, ~1.6, ~2.4, ~3.2, 4.0, ~4.8 ]
103+
// zy => <Complex128Array>[ ~-0.6, ~-1.2, ~-1.8, ~-2.4, -3.0, ~-3.6 ]
176104
```
177105

178106
The function has the following additional parameters:
@@ -184,31 +112,13 @@ While [`typed array`][mdn-typed-array] views mandate a view offset based on the
184112

185113
```javascript
186114
var Complex128Array = require( '@stdlib/array/complex128' );
187-
var real = require( '@stdlib/complex/float64/real' );
188-
var imag = require( '@stdlib/complex/float64/imag' );
189115

190116
var zx = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
191117
var zy = new Complex128Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );
192118

193119
zdrot.ndarray( 2, zx, 2, 1, zy, 2, 1, 0.8, 0.6 );
194-
195-
var z = zy.get( 3 );
196-
// returns <Complex128>
197-
198-
var re = real( z );
199-
// returns ~-4.2
200-
201-
var im = imag( z );
202-
// returns ~-4.8
203-
204-
z = zx.get( 1 );
205-
// returns <Complex128>
206-
207-
re = real( z );
208-
// returns ~2.4
209-
210-
im = imag( z );
211-
// returns ~3.2
120+
// zx => <Complex128Array>[ 1.0, 2.0, ~2.4, ~3.2, 5.0, 6.0, ~5.6, ~6.4 ]
121+
// zy => <Complex128Array>[ 0.0, 0.0, ~-1.8, ~-2.4, 0.0, 0.0, ~-4.2, ~-4.8 ]
212122
```
213123

214124
* * *

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

+20-50
Original file line numberDiff line numberDiff line change
@@ -44,48 +44,30 @@
4444
> var zx = new {{alias:@stdlib/array/complex128}}( [ 1.0, 2.0, 3.0, 4.0 ] );
4545
> var zy = new {{alias:@stdlib/array/complex128}}( [ 0.0, 0.0, 0.0, 0.0 ] );
4646
> {{alias}}.main( zx.length, zx, 1, zy, 1, 0.8, 0.6 );
47-
> var z = zy.get( 0 );
48-
> var re = {{alias:@stdlib/complex/float64/real}}( z )
49-
~-0.6
50-
> var im = {{alias:@stdlib/complex/float64/imag}}( z )
51-
~-1.2
52-
> z = zx.get( 0 );
53-
> re = {{alias:@stdlib/complex/float64/real}}( z )
54-
~0.8
55-
> im = {{alias:@stdlib/complex/float64/imag}}( z )
56-
~1.6
47+
> zx
48+
<Complex128Array>[ ~0.8, ~1.6, ~2.4, ~3.2 ]
49+
> zy
50+
<Complex128Array>[ ~-0.6, ~-1.2, ~-1.8, ~-2.4 ]
5751

5852
// Advanced indexing:
5953
> zx = new {{alias:@stdlib/array/complex128}}( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
6054
> zy = new {{alias:@stdlib/array/complex128}}( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );
6155
> {{alias}}.main( 2, zx, -2, zy, 1, 0.8, 0.6 );
62-
> z = zy.get( 0 );
63-
> re = {{alias:@stdlib/complex/float64/real}}( z )
64-
~-3.0
65-
> im = {{alias:@stdlib/complex/float64/imag}}( z )
66-
~-3.6
67-
> z = zx.get( 2 );
68-
> re = {{alias:@stdlib/complex/float64/real}}( z )
69-
~4.0
70-
> im = {{alias:@stdlib/complex/float64/imag}}( z )
71-
~4.8
56+
> zx
57+
<Complex128Array>[ ~0.8, ~1.6, 3.0, 4.0, 4.0, ~4.8, 7.0, 8.0 ]
58+
> zy
59+
<Complex128Array>[ -3.0, ~-3.6, ~-0.6, ~-1.2, 0.0, 0.0, 0.0, 0.0 ]
7260

7361
// Using typed array views:
7462
> var zx0 = new {{alias:@stdlib/array/complex128}}( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
7563
> var zy0 = new {{alias:@stdlib/array/complex128}}( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );
7664
> var zx1 = new {{alias:@stdlib/array/complex128}}( zx0.buffer, zx0.BYTES_PER_ELEMENT*1 );
7765
> var zy1 = new {{alias:@stdlib/array/complex128}}( zy0.buffer, zy0.BYTES_PER_ELEMENT*2 );
7866
> {{alias}}.main( 1, zx1, 1, zy1, 1, 0.8, 0.6 );
79-
> z = zy0.get( 2 );
80-
> re = {{alias:@stdlib/complex/float64/real}}( z )
81-
~-1.8
82-
> im = {{alias:@stdlib/complex/float64/imag}}( z )
83-
~-2.4
84-
> z = zx0.get( 1 );
85-
> re = {{alias:@stdlib/complex/float64/real}}( z )
86-
~2.4
87-
> im = {{alias:@stdlib/complex/float64/imag}}( z )
88-
~3.2
67+
> zx0
68+
<Complex128Array>[ 1.0, 2.0, ~2.4, ~3.2, 5.0, 6.0 ]
69+
> zy0
70+
<Complex128Array>[ 0.0, 0.0, 0.0, 0.0, ~-1.8, ~-2.4 ]
8971

9072

9173
{{alias}}.ndarray( N, zx, strideX, offsetX, zy, strideY, offsetY, c, s )
@@ -135,31 +117,19 @@
135117
> var zx = new {{alias:@stdlib/array/complex128}}( [ 1.0, 2.0, 3.0, 4.0 ] );
136118
> var zy = new {{alias:@stdlib/array/complex128}}( [ 0.0, 0.0, 0.0, 0.0 ] );
137119
> {{alias}}.ndarray( zx.length, zx, 1, 0, zy, 1, 0, 0.8, 0.6 );
138-
> var z = zy.get( 0 );
139-
> var re = {{alias:@stdlib/complex/float64/real}}( z )
140-
~-0.6
141-
> var im = {{alias:@stdlib/complex/float64/imag}}( z )
142-
~-1.2
143-
> z = zx.get( 0 );
144-
> re = {{alias:@stdlib/complex/float64/real}}( z )
145-
~0.8
146-
> im = {{alias:@stdlib/complex/float64/imag}}( z )
147-
~1.6
120+
> zx
121+
<Complex128Array>[ ~0.8, ~1.6, ~2.4, ~3.2 ]
122+
> zy
123+
<Complex128Array>[ ~-0.6, ~-1.2, ~-1.8, ~-2.4 ]
148124

149125
// Advanced indexing:
150126
> zx = new {{alias:@stdlib/array/complex128}}( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
151127
> zy = new {{alias:@stdlib/array/complex128}}( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );
152128
> {{alias}}.ndarray( 1, zx, 2, 1, zy, 2, 1, 0.8, 0.6 );
153-
> z = zy.get( 1 );
154-
> re = {{alias:@stdlib/complex/float64/real}}( z )
155-
~-1.8
156-
> im = {{alias:@stdlib/complex/float64/imag}}( z )
157-
~-2.4
158-
> z = zx.get( 1 );
159-
> re = {{alias:@stdlib/complex/float64/real}}( z )
160-
~2.4
161-
> im = {{alias:@stdlib/complex/float64/imag}}( z )
162-
~3.2
129+
> zx
130+
<Complex128Array>[ 1.0, 2.0, ~2.4, ~3.2, 5.0, 6.0 ]
131+
> zy
132+
<Complex128Array>[ 0.0, 0.0, ~-1.8, ~-2.4, 0.0, 0.0 ]
163133

164134

165135
{{alias}}.Module( memory )

0 commit comments

Comments
 (0)