Skip to content

Commit b51a185

Browse files
committed
Auto-generated commit
1 parent 0c0027f commit b51a185

File tree

7 files changed

+475
-17
lines changed

7 files changed

+475
-17
lines changed

CHANGELOG.md

+14-12
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<section class="release" id="unreleased">
66

7-
## Unreleased (2024-11-26)
7+
## Unreleased (2024-11-27)
88

99
<section class="packages">
1010

@@ -480,6 +480,7 @@ This release closes the following issue:
480480

481481
##### Features
482482

483+
- [`1d217ba`](https://github.com/stdlib-js/stdlib/commit/1d217bad1d35210a57d65c8be67c596815589082) - add `map` method to `array/fixed-endian-factory` [(#3270)](https://github.com/stdlib-js/stdlib/pull/3270)
483484
- [`2df0e9b`](https://github.com/stdlib-js/stdlib/commit/2df0e9bb08b8ad1c573b7c2383ef39e492dd5436) - add `some` method to `array/fixed-endian-factory` [(#3241)](https://github.com/stdlib-js/stdlib/pull/3241)
484485
- [`e3a2173`](https://github.com/stdlib-js/stdlib/commit/e3a2173a24bd8634f333cace626fc2d71740ebd3) - add `every` method to `array/fixed-endian-factory` [(#3200)](https://github.com/stdlib-js/stdlib/pull/3200)
485486
- [`b34732c`](https://github.com/stdlib-js/stdlib/commit/b34732cf655db60fbc798e12952f88c3edb07eaf) - add `at` method to `array/fixed-endian-factory` [(#3184)](https://github.com/stdlib-js/stdlib/pull/3184)
@@ -493,9 +494,9 @@ This release closes the following issue:
493494

494495
##### Closed Issues
495496

496-
A total of 3 issues were closed in this release:
497+
A total of 4 issues were closed in this release:
497498

498-
[#3135](https://github.com/stdlib-js/stdlib/issues/3135), [#3138](https://github.com/stdlib-js/stdlib/issues/3138), [#3155](https://github.com/stdlib-js/stdlib/issues/3155)
499+
[#3135](https://github.com/stdlib-js/stdlib/issues/3135), [#3138](https://github.com/stdlib-js/stdlib/issues/3138), [#3150](https://github.com/stdlib-js/stdlib/issues/3150), [#3155](https://github.com/stdlib-js/stdlib/issues/3155)
499500

500501
</section>
501502

@@ -549,9 +550,9 @@ A total of 3 issues were closed in this release:
549550

550551
### Closed Issues
551552

552-
A total of 10 issues were closed in this release:
553+
A total of 11 issues were closed in this release:
553554

554-
[#3135](https://github.com/stdlib-js/stdlib/issues/3135), [#3138](https://github.com/stdlib-js/stdlib/issues/3138), [#3155](https://github.com/stdlib-js/stdlib/issues/3155), [#3164](https://github.com/stdlib-js/stdlib/issues/3164), [#3165](https://github.com/stdlib-js/stdlib/issues/3165), [#3176](https://github.com/stdlib-js/stdlib/issues/3176), [#3177](https://github.com/stdlib-js/stdlib/issues/3177), [#3178](https://github.com/stdlib-js/stdlib/issues/3178), [#3179](https://github.com/stdlib-js/stdlib/issues/3179), [#3180](https://github.com/stdlib-js/stdlib/issues/3180)
555+
[#3135](https://github.com/stdlib-js/stdlib/issues/3135), [#3138](https://github.com/stdlib-js/stdlib/issues/3138), [#3150](https://github.com/stdlib-js/stdlib/issues/3150), [#3155](https://github.com/stdlib-js/stdlib/issues/3155), [#3164](https://github.com/stdlib-js/stdlib/issues/3164), [#3165](https://github.com/stdlib-js/stdlib/issues/3165), [#3176](https://github.com/stdlib-js/stdlib/issues/3176), [#3177](https://github.com/stdlib-js/stdlib/issues/3177), [#3178](https://github.com/stdlib-js/stdlib/issues/3178), [#3179](https://github.com/stdlib-js/stdlib/issues/3179), [#3180](https://github.com/stdlib-js/stdlib/issues/3180)
555556

556557
</section>
557558

@@ -564,7 +565,7 @@ A total of 10 issues were closed in this release:
564565
A total of 7 people contributed to this release. Thank you to the following contributors:
565566

566567
- Aayush Khanna
567-
- Abhijit
568+
- Abhijit Raut
568569
- Athan Reines
569570
- Kshitij-Dale
570571
- Philipp Burckhardt
@@ -581,19 +582,20 @@ A total of 7 people contributed to this release. Thank you to the following cont
581582

582583
<details>
583584

585+
- [`1d217ba`](https://github.com/stdlib-js/stdlib/commit/1d217bad1d35210a57d65c8be67c596815589082) - **feat:** add `map` method to `array/fixed-endian-factory` [(#3270)](https://github.com/stdlib-js/stdlib/pull/3270) _(by Aayush Khanna, Athan Reines)_
584586
- [`2df0e9b`](https://github.com/stdlib-js/stdlib/commit/2df0e9bb08b8ad1c573b7c2383ef39e492dd5436) - **feat:** add `some` method to `array/fixed-endian-factory` [(#3241)](https://github.com/stdlib-js/stdlib/pull/3241) _(by Kshitij-Dale, Athan Reines)_
585587
- [`abb0dc3`](https://github.com/stdlib-js/stdlib/commit/abb0dc38783210623e67f19a5bb95b3998f75ff7) - **docs:** update examples and descriptions _(by Athan Reines)_
586588
- [`95d0bbc`](https://github.com/stdlib-js/stdlib/commit/95d0bbc4b76c57dba4b4edd343dcd046490d4a51) - **bench:** test for primitive value _(by Athan Reines)_
587589
- [`c712a8e`](https://github.com/stdlib-js/stdlib/commit/c712a8ec07db672a01355ddfca2192be25fe85ca) - **feat:** add `array/base/broadcasted-ternary4d` [(#3232)](https://github.com/stdlib-js/stdlib/pull/3232) _(by Vinit Pandit, Athan Reines)_
588-
- [`28db4f2`](https://github.com/stdlib-js/stdlib/commit/28db4f2869749f6a6d6f7ae6476bd27f65052e96) - **feat:** add `array/base/mskunary4d` [(#3208)](https://github.com/stdlib-js/stdlib/pull/3208) _(by Abhijit, Athan Reines)_
590+
- [`28db4f2`](https://github.com/stdlib-js/stdlib/commit/28db4f2869749f6a6d6f7ae6476bd27f65052e96) - **feat:** add `array/base/mskunary4d` [(#3208)](https://github.com/stdlib-js/stdlib/pull/3208) _(by Abhijit Raut, Athan Reines)_
589591
- [`fb3c880`](https://github.com/stdlib-js/stdlib/commit/fb3c880b79a6861fe3da4b14eefadafc90d63eda) - **feat:** add `array/base/braodcasted-ternary3d` [(#3228)](https://github.com/stdlib-js/stdlib/pull/3228) _(by Vinit Pandit, Athan Reines)_
590592
- [`2af4b75`](https://github.com/stdlib-js/stdlib/commit/2af4b757cab1052ee7a788f2154f2c7b8c9aa9bb) - **docs:** add note _(by Athan Reines)_
591593
- [`10641b6`](https://github.com/stdlib-js/stdlib/commit/10641b65eee7299d16d0c0239575eafc6b575557) - **docs:** add note _(by Athan Reines)_
592594
- [`2c40c48`](https://github.com/stdlib-js/stdlib/commit/2c40c487c3f7cfcfa445d9855fb6c89b97ebf600) - **docs:** fix return values _(by Athan Reines)_
593595
- [`dc93a3a`](https://github.com/stdlib-js/stdlib/commit/dc93a3ac7351a59e0f61e6384312d96655cc2edc) - **docs:** fix return values _(by Athan Reines)_
594596
- [`b26d9d5`](https://github.com/stdlib-js/stdlib/commit/b26d9d5bd9e60a63ce017bbb470f0769b6dcc628) - **feat:** add `array/base/mskunary5d` [(#3207)](https://github.com/stdlib-js/stdlib/pull/3207) _(by Vinit Pandit, Athan Reines, Abhijit, stdlib-bot)_
595-
- [`34ae5c9`](https://github.com/stdlib-js/stdlib/commit/34ae5c9570bf6428dc5bede92557ae56981554c2) - **feat:** add `array/base/mskbinary5d` [(#3198)](https://github.com/stdlib-js/stdlib/pull/3198) _(by Abhijit)_
596-
- [`cb27ec4`](https://github.com/stdlib-js/stdlib/commit/cb27ec42bd7e65c46877e57064d36ff9b38b502b) - **feat:** add `array/base/mskbinary4d` [(#3196)](https://github.com/stdlib-js/stdlib/pull/3196) _(by Abhijit, Athan Reines)_
597+
- [`34ae5c9`](https://github.com/stdlib-js/stdlib/commit/34ae5c9570bf6428dc5bede92557ae56981554c2) - **feat:** add `array/base/mskbinary5d` [(#3198)](https://github.com/stdlib-js/stdlib/pull/3198) _(by Abhijit Raut)_
598+
- [`cb27ec4`](https://github.com/stdlib-js/stdlib/commit/cb27ec42bd7e65c46877e57064d36ff9b38b502b) - **feat:** add `array/base/mskbinary4d` [(#3196)](https://github.com/stdlib-js/stdlib/pull/3196) _(by Abhijit Raut, Athan Reines)_
597599
- [`e3a2173`](https://github.com/stdlib-js/stdlib/commit/e3a2173a24bd8634f333cace626fc2d71740ebd3) - **feat:** add `every` method to `array/fixed-endian-factory` [(#3200)](https://github.com/stdlib-js/stdlib/pull/3200) _(by Aayush Khanna, Athan Reines)_
598600
- [`c328fc5`](https://github.com/stdlib-js/stdlib/commit/c328fc515fc925ee717ed9cd844cca83a61da806) - **feat:** add `array/base/mskbinary3d` [(#3193)](https://github.com/stdlib-js/stdlib/pull/3193) _(by Rylan Yang, Athan Reines, stdlib-bot)_
599601
- [`9ba0dbd`](https://github.com/stdlib-js/stdlib/commit/9ba0dbd839707695a05fda5d4f50d67c5aba52f7) - **chore:** use relative paths to load main package export _(by Philipp Burckhardt)_
@@ -1330,7 +1332,7 @@ A total of 9 people contributed to this release. Thank you to the following cont
13301332
- Athan Reines
13311333
- Debashis Maharana
13321334
- HarshaNP
1333-
- Kaif Mohd
1335+
- Mohammad Kaif
13341336
- Philipp Burckhardt
13351337
- Soumajit Chatterjee
13361338
- Vaibhav Patel
@@ -1374,7 +1376,7 @@ A total of 9 people contributed to this release. Thank you to the following cont
13741376
- [`5742947`](https://github.com/stdlib-js/stdlib/commit/5742947f31198648b2f753e1f9322367c9e3ae06) - **feat:** add `array/base/cuany-by-right` [(#2667)](https://github.com/stdlib-js/stdlib/pull/2667) _(by Debashis Maharana, Philipp Burckhardt)_
13751377
- [`8f72b43`](https://github.com/stdlib-js/stdlib/commit/8f72b432c0fc81a78641d5689722ecc9671c6f02) - **style:** add missing spaces around parentheses _(by Philipp Burckhardt)_
13761378
- [`73266bf`](https://github.com/stdlib-js/stdlib/commit/73266bf9d7f82198bd752dafccedbc017d8c8bb1) - **feat:** add `array/base/cuany-by` [(#2818)](https://github.com/stdlib-js/stdlib/pull/2818) _(by yaswanth, Philipp Burckhardt)_
1377-
- [`e3078e5`](https://github.com/stdlib-js/stdlib/commit/e3078e56df8858a8f79fb3f3ded3fc76da955db5) - **feat:** add `array/base/cuevery-by` package _(by Kaif Mohd, Philipp Burckhardt)_
1379+
- [`e3078e5`](https://github.com/stdlib-js/stdlib/commit/e3078e56df8858a8f79fb3f3ded3fc76da955db5) - **feat:** add `array/base/cuevery-by` package _(by Mohammad Kaif, Philipp Burckhardt)_
13781380
- [`2091d38`](https://github.com/stdlib-js/stdlib/commit/2091d38aec245202fe1bbff462b12d0f5ed54ee1) - **feat:** add `array/base/cusome` _(by yaswanth, Philipp Burckhardt)_
13791381
- [`43aa58f`](https://github.com/stdlib-js/stdlib/commit/43aa58f81dcad604f11a5715a1546c015b0a9623) - **feat:** add `isByteOrder` to namespace _(by Athan Reines)_
13801382
- [`b18478e`](https://github.com/stdlib-js/stdlib/commit/b18478e236e9cb6991d5a0f952d217e043e46587) - **feat:** add `array/base/assert/is-byte-order` _(by Athan Reines)_
@@ -1404,7 +1406,7 @@ A total of 9 people contributed to this release. Thank you to the following cont
14041406
- [`0bb460f`](https://github.com/stdlib-js/stdlib/commit/0bb460f9675f693bd4eb5826888e493cae8757fc) - **feat:** add `array/base/cusome-by-right` _(by HarshaNP, Philipp Burckhardt)_
14051407
- [`cadb613`](https://github.com/stdlib-js/stdlib/commit/cadb6131d6ce50338d11757e88e8a910a0367983) - **chore:** update argument documentation styling _(by Philipp Burckhardt)_
14061408
- [`e722c97`](https://github.com/stdlib-js/stdlib/commit/e722c9742d30f0e3c0ec6ebb349b30338facbdf0) - **feat:** add `array/base/cunone-by-right` _(by HarshaNP, Philipp Burckhardt)_
1407-
- [`24e9908`](https://github.com/stdlib-js/stdlib/commit/24e9908afc085d5d2aece1844a6e25b36332f246) - **feat:** add `array/base/cunone-by` package _(by Kaif Mohd, Philipp Burckhardt, Athan Reines)_
1409+
- [`24e9908`](https://github.com/stdlib-js/stdlib/commit/24e9908afc085d5d2aece1844a6e25b36332f246) - **feat:** add `array/base/cunone-by` package _(by Mohammad Kaif, Philipp Burckhardt, Athan Reines)_
14081410
- [`a541897`](https://github.com/stdlib-js/stdlib/commit/a541897dec2cd902c186d9ad128b6efd8a3ca528) - **docs:** fix grammar _(by Athan Reines)_
14091411
- [`583452c`](https://github.com/stdlib-js/stdlib/commit/583452c820523f4bc97b293b4424d0c1bf59fffc) - **fix:** add missing property _(by Athan Reines)_
14101412
- [`91ad072`](https://github.com/stdlib-js/stdlib/commit/91ad07207eee217885975ce19d83e85d1f4a6499) - **fix:** add missing property _(by Athan Reines)_

CONTRIBUTORS

+2-4
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
# Contributors listed in alphabetical order.
44

55
Aayush Khanna <aayushiitbhu23@gmail.com>
6-
Abhijit <abhijitmraut8010@gmail.com>
7-
AbhijitRaut04 <121740684+AbhijitRaut04@users.noreply.github.com>
6+
Abhijit Raut <abhijitmraut8010@gmail.com>
87
Adarsh Palaskar <adarshpalaskar99@gmail.com>
98
Aditya Sapra <adityaework@gmail.com>
109
AgPriyanshu18 <113460573+AgPriyanshu18@users.noreply.github.com>
@@ -45,7 +44,6 @@ Joey Reed <joeyrreed@gmail.com>
4544
Jordan Gallivan <115050475+Jordan-Gallivan@users.noreply.github.com>
4645
Joris Labie <joris.labie1@gmail.com>
4746
Justin Dennison <justin1dennison@gmail.com>
48-
Kaif Mohd <mdkaifprofession@gmail.com>
4947
Karthik Prakash <116057817+skoriop@users.noreply.github.com>
5048
Khaldon <kahmd1444@gmail.com>
5149
Kohantika Nath <145763549+kohantikanath@users.noreply.github.com>
@@ -56,7 +54,7 @@ Marcus Fantham <mfantham@users.noreply.github.com>
5654
Matt Cochrane <matthew.cochrane.eng@gmail.com>
5755
Mihir Pandit <129577900+MSP20086@users.noreply.github.com>
5856
Milan Raj <rajsite@users.noreply.github.com>
59-
Mohammad Kaif <98884589+Kaif987@users.noreply.github.com>
57+
Mohammad Kaif <mdkaifprofession@gmail.com>
6058
Momtchil Momtchev <momtchil@momtchev.com>
6159
Muhammad Haris <harriskhan047@outlook.com>
6260
Naresh Jagadeesan <naresh.naresh000@gmail.com>

fixed-endian-factory/README.md

+62
Original file line numberDiff line numberDiff line change
@@ -483,6 +483,68 @@ var v = arr.get( 100 );
483483
// returns undefined
484484
```
485485

486+
<a name="method-map"></a>
487+
488+
#### TypedArray.prototype.map( callbackFn\[, thisArg] )
489+
490+
Returns a new array with each element being the result of a provided callback function.
491+
492+
```javascript
493+
function fcn( v ) {
494+
return -v;
495+
}
496+
497+
var Float64ArrayFE = fixedEndianFactory( 'float64' );
498+
499+
var arr = new Float64ArrayFE( 'little-endian', [ 1.0, 2.0, 3.0 ] );
500+
// returns <Float64ArrayFE>
501+
502+
var out = arr.map( fcn );
503+
// returns <Float64ArrayFE>
504+
505+
var z = out.get( 0 );
506+
// returns -1.0
507+
508+
z = out.get( 1 );
509+
// returns -2.0
510+
511+
z = out.get( 2 );
512+
// returns -3.0
513+
```
514+
515+
The callback function is provided three arguments:
516+
517+
- **value**: current array element.
518+
- **index**: current array element index.
519+
- **arr**: the array on which this method was called.
520+
521+
To set the function execution context, provide a `thisArg`.
522+
523+
```javascript
524+
function fcn( v, i ) {
525+
this.count += i;
526+
return -v;
527+
}
528+
529+
var Float64ArrayFE = fixedEndianFactory( 'float64' );
530+
531+
var arr = new Float64ArrayFE( 'little-endian', 3 );
532+
533+
arr.set( -1.0, 0 );
534+
arr.set( 1.0, 1 );
535+
arr.set( -1.0, 2 );
536+
537+
var context = {
538+
'count': 0
539+
};
540+
541+
var out = arr.map( fcn, context );
542+
// returns <Float64ArrayFE>
543+
544+
var count = context.count;
545+
// returns 3;
546+
```
547+
486548
<a name="method-set"></a>
487549

488550
#### TypedArrayFE.prototype.set( arr\[, offset] )
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
/**
2+
* @license Apache-2.0
3+
*
4+
* Copyright (c) 2024 The Stdlib Authors.
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
19+
'use strict';
20+
21+
// MODULES //
22+
23+
var bench = require( '@stdlib/bench' );
24+
var pkg = require( './../package.json' ).name;
25+
var factory = require( './../lib' );
26+
27+
28+
// VARIABLES //
29+
30+
var Float64ArrayFE = factory( 'float64' );
31+
32+
33+
// MAIN //
34+
35+
bench( pkg+':map', function benchmark( b ) {
36+
var out;
37+
var arr;
38+
var i;
39+
40+
arr = new Float64ArrayFE( 'little-endian', [ 1.0, 2.0, 2.0, 1.0 ] );
41+
42+
b.tic();
43+
for ( i = 0; i < b.iterations; i++ ) {
44+
out = arr.map( identity );
45+
if ( typeof out !== 'object' ) {
46+
b.fail( 'should return an object' );
47+
}
48+
}
49+
b.toc();
50+
if ( !( out instanceof Float64ArrayFE ) ) {
51+
b.fail( 'should return a typed array' );
52+
}
53+
b.pass( 'benchmark finished' );
54+
b.end();
55+
56+
function identity( v ) {
57+
return v;
58+
}
59+
});
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
/**
2+
* @license Apache-2.0
3+
*
4+
* Copyright (c) 2024 The Stdlib Authors.
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
19+
'use strict';
20+
21+
// MODULES //
22+
23+
var bench = require( '@stdlib/bench' );
24+
var pow = require( '@stdlib/math/base/special/pow' );
25+
var zeroTo = require( './../../zero-to' );
26+
var pkg = require( './../package.json' ).name;
27+
var factory = require( './../lib' );
28+
29+
30+
// VARIABLES //
31+
32+
var Float64ArrayFE = factory( 'float64' );
33+
34+
35+
// FUNCTIONS //
36+
37+
/**
38+
* Identity function.
39+
*
40+
* @private
41+
* @param {number} value - array element
42+
* @param {NonNegativeInteger} idx - array element index
43+
* @param {TypedArray} arr - array instance
44+
* @returns {number} input array element
45+
*/
46+
function identity( value ) {
47+
return value;
48+
}
49+
50+
/**
51+
* Creates a benchmark function.
52+
*
53+
* @private
54+
* @param {PositiveInteger} len - array length
55+
* @returns {Function} benchmark function
56+
*/
57+
function createBenchmark( len ) {
58+
var arr = new Float64ArrayFE( 'little-endian', zeroTo( len ) );
59+
return benchmark;
60+
61+
/**
62+
* Benchmark function.
63+
*
64+
* @private
65+
* @param {Benchmark} b - benchmark instance
66+
*/
67+
function benchmark( b ) {
68+
var out;
69+
var i;
70+
71+
b.tic();
72+
for ( i = 0; i < b.iterations; i++ ) {
73+
out = arr.map( identity );
74+
if ( typeof out !== 'object' ) {
75+
b.fail( 'should return an object' );
76+
}
77+
}
78+
b.toc();
79+
if ( !( out instanceof Float64ArrayFE ) ) {
80+
b.fail( 'should return a TypedArray' );
81+
}
82+
b.pass( 'benchmark finished' );
83+
b.end();
84+
}
85+
}
86+
87+
88+
// MAIN //
89+
90+
/**
91+
* Main execution sequence.
92+
*
93+
* @private
94+
*/
95+
function main() {
96+
var len;
97+
var min;
98+
var max;
99+
var f;
100+
var i;
101+
102+
min = 1; // 10^min
103+
max = 6; // 10^max
104+
105+
for ( i = min; i <= max; i++ ) {
106+
len = pow( 10, i );
107+
f = createBenchmark( len );
108+
bench( pkg+':map:len='+len, f );
109+
}
110+
}
111+
112+
main();

0 commit comments

Comments
 (0)