Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
40140bb
feat: add strided/base/reinterpret-uint64
DivitJain26 Aug 13, 2026
6dd0c59
docs: add package.json
DivitJain26 Aug 13, 2026
383a38e
feat: add entry point
DivitJain26 Aug 13, 2026
cd5666a
test: adds test
DivitJain26 Aug 13, 2026
c2a1b47
bench: adds benchmark
DivitJain26 Aug 13, 2026
13c9693
docs: adds type definition
DivitJain26 Aug 13, 2026
38c4bac
docs: adds repl file
DivitJain26 Aug 13, 2026
596902f
docs: adds example
DivitJain26 Aug 13, 2026
683e28e
chore: fix import order
DivitJain26 Aug 13, 2026
46707db
chore: upadte exmpales
DivitJain26 Aug 13, 2026
5888466
docs: add readme
DivitJain26 Aug 13, 2026
a35b9dc
chore: upadte exmpales
DivitJain26 Aug 13, 2026
f4b8af1
chore: update example
DivitJain26 Aug 13, 2026
dfdaefa
feat: add uint64 support for hasEqualValues
DivitJain26 Aug 13, 2026
c0abe5b
test: adds test for hasEqualValues
DivitJain26 Aug 13, 2026
5ca3241
Merge branch 'develop' into feat/add-uint64-support-for-has-equal-values
kgryte Aug 26, 2026
92736ca
Apply suggestions from code review
kgryte Aug 26, 2026
122a330
Merge branch 'stdlib-js:develop' into feat/add-uint64-support-for-has…
DivitJain26 Sep 25, 2026
9860e9d
feat: add support for comparision of int64 and uin64 array with real …
DivitJain26 Sep 26, 2026
f414234
feat: add support for comparision of int64 and uin64 array with real …
DivitJain26 Sep 26, 2026
8238eb4
test: add tests
DivitJain26 Sep 26, 2026
0e1fc06
refactor: use hexcode value
DivitJain26 Sep 27, 2026
cd0b6ca
docs: use hexcode value in example
DivitJain26 Sep 27, 2026
f954ce7
test: improve tests
DivitJain26 Sep 27, 2026
2dd0b14
Merge branch 'stdlib-js:develop' into feat/add-uint64-support-for-has…
DivitJain26 Sep 28, 2026
0c3917a
feat: add arrest/is-equal-int64array
DivitJain26 Sep 29, 2026
abe4b76
test: add test
DivitJain26 Sep 29, 2026
0d0d7a5
bench: add benchmarks
DivitJain26 Sep 29, 2026
2f96e87
docs: add docs
DivitJain26 Sep 29, 2026
a0798de
docs: add examples
DivitJain26 Sep 29, 2026
77b83fc
docs: add readme
DivitJain26 Sep 29, 2026
c37b4f1
Merge remote-tracking branch 'upstream/develop' into feat/add-is-equa…
stdlib-bot Sep 30, 2026
2bd8f8e
docs: add links
kgryte Oct 13, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
106 changes: 106 additions & 0 deletions lib/node_modules/@stdlib/assert/is-equal-int64array/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
<!--

@license Apache-2.0

Copyright (c) 2026 The Stdlib Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

-->

# isEqualInt64Array

> Test if two arguments are both [Int64Arrays][@stdlib/array/int64] and have equal values.

<section class="usage">

## Usage

```javascript
var isEqualInt64Array = require( '@stdlib/assert/is-equal-int64array' );
```

#### isEqualInt64Array( v1, v2 )

Tests if two arguments are both [Int64Arrays][@stdlib/array/int64] and have equal values.

```javascript
var Int64Array = require( '@stdlib/array/int64' );

var x = new Int64Array( [ 1, 2 ] );
var y = new Int64Array( [ 1, 2 ] );
var bool = isEqualInt64Array( x, y );
// returns true

bool = isEqualInt64Array( x, new Int64Array( [ 1, 3 ] ) );
// returns false
```

</section>

<!-- /.usage -->

<section class="notes">

</section>

<!-- /.notes -->

<section class="examples">

## Examples

<!-- eslint no-undef: "error" -->

```javascript
var Int64Array = require( '@stdlib/array/int64' );
var Uint64Array = require( '@stdlib/array/uint64' );
var isEqualInt64Array = require( '@stdlib/assert/is-equal-int64array' );

var x = new Int64Array( [ 1, 2, 3 ] );
var y = new Int64Array( [ 1, 2, 3 ] );
var out = isEqualInt64Array( x, y );
// returns true

x = new Int64Array( [ 1, 2, 3 ] );
y = new Uint64Array( [ 1, 2, 3 ] );
out = isEqualInt64Array( x, y );
// returns false

x = new Int64Array( [ 1, 2, 3 ] );
y = new Int64Array( [ 1, 2, 4 ] );
out = isEqualInt64Array( x, y );
// returns false
```

</section>

<!-- /.examples -->

<!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. -->

<section class="related">

</section>

<!-- /.related -->

<!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->

<section class="links">

[@stdlib/array/int64]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/int64

</section>

<!-- /.links -->
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
/**
* @license Apache-2.0
*
* Copyright (c) 2026 The Stdlib Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

'use strict';

// MODULES //

var bench = require( '@stdlib/bench' );
var isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;
var pow = require( '@stdlib/math/base/special/pow' );
var zeroTo = require( '@stdlib/array/zero-to' );
var Int64Array = require( '@stdlib/array/int64' );
var format = require( '@stdlib/string/format' );
var pkg = require( './../package.json' ).name;
var isEqualInt64Array = require( './../lib' );


// FUNCTIONS //

/**
* Creates a benchmark function.
*
* @private
* @param {PositiveInteger} len - array length
* @returns {Function} benchmark function
*/
function createBenchmark( len ) {
var x = new Int64Array( zeroTo( len ) );

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a chicken-and-the-egg situation. This is fine for now. We'll want to eventually replace with zeroTo( len, 'int64' ) once we add int64 support to zero-to.

var y = new Int64Array( zeroTo( len ) );
return benchmark;

/**
* Benchmark function.
*
* @private
* @param {Benchmark} b - benchmark instance
*/
function benchmark( b ) {
var bool;
var i;

b.tic();
for ( i = 0; i < b.iterations; i++ ) {
bool = isEqualInt64Array( x, y );
if ( typeof bool !== 'boolean' ) {
b.fail( 'should return a boolean' );
}
}
b.toc();
if ( !isBoolean( bool ) ) {
b.fail( 'should return a boolean' );
}
b.pass( 'benchmark finished' );
b.end();
}
}


// MAIN //

/**
* Main execution sequence.
*
* @private
*/
function main() {
var len;
var min;
var max;
var f;
var i;

min = 1; // 10^min
max = 6; // 10^max

for ( i = min; i <= max; i++ ) {
len = pow( 10, i );
f = createBenchmark( len );
bench( format( '%s:len=%d', pkg, len ), f );
}
}

main();
32 changes: 32 additions & 0 deletions lib/node_modules/@stdlib/assert/is-equal-int64array/docs/repl.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@

{{alias}}( v1, v2 )
Tests if two arguments are both Int64Arrays and have equal values.

Parameters
----------
v1: any
First input value.

v2: any
Second input value.

Returns
-------
bool: boolean
Boolean indicating whether two arguments are equal.

Examples
--------
> var x = new {{alias:@stdlib/array/int64}}( [ 1, 2, 3 ] );
> var y = new {{alias:@stdlib/array/int64}}( [ 1, 2, 3 ] );
> var bool = {{alias}}( x, y )
true

> x = new {{alias:@stdlib/array/int64}}( [ 1, 2, 3 ] );
> y = new {{alias:@stdlib/array/int64}}( [ 1, 2, 4 ] );
> bool = {{alias}}( x, y )
false

See Also
--------

Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/*
* @license Apache-2.0
*
* Copyright (c) 2026 The Stdlib Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

// TypeScript Version: 4.1

/**
* Tests if two arguments are both Int64Arrays and have equal values.
*
* @param v1 - first input value
* @param v2 - second input value
* @returns boolean indicating whether two arguments are equal
*
* @example
* var Int64Array = require( '@stdlib/array/int64' );
*
* var x = new Int64Array( [ 1, 2, 3 ] );
* var y = new Int64Array( [ 1, 2, 3 ] );
*
* var out = isEqualInt64Array( x, y );
* // returns true
*
* @example
* var Int64Array = require( '@stdlib/array/int64' );
*
* var x = new Int64Array( [ 1, 2, 3 ] );
* var y = new Int64Array( [ 1, 2, 4 ] );
*
* var out = isEqualInt64Array( x, y );
* // returns false
*/
declare function isEqualInt64Array( v1: any, v2: any ): boolean;

Check warning on line 46 in lib/node_modules/@stdlib/assert/is-equal-int64array/docs/types/index.d.ts

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Unexpected any. Specify a different type

Check warning on line 46 in lib/node_modules/@stdlib/assert/is-equal-int64array/docs/types/index.d.ts

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Unexpected any. Specify a different type


// EXPORTS //

export = isEqualInt64Array;
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* @license Apache-2.0
*
* Copyright (c) 2026 The Stdlib Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import isEqualInt64Array = require( './index' );


// TESTS //

// The function returns a boolean...
{
isEqualInt64Array( 3.14, 3.14 ); // $ExpectType boolean
isEqualInt64Array( null, null ); // $ExpectType boolean
isEqualInt64Array( 'beep', 'boop' ); // $ExpectType boolean
}

// The compiler throws an error if the function is provided an unsupported number of arguments...
{
isEqualInt64Array(); // $ExpectError
isEqualInt64Array( 3.14 ); // $ExpectError
isEqualInt64Array( 'beep', 'beep', 3.14 ); // $ExpectError
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/**
* @license Apache-2.0
*
* Copyright (c) 2026 The Stdlib Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

'use strict';

var Int64Array = require( '@stdlib/array/int64' );
var Uint64Array = require( '@stdlib/array/uint64' );
var isEqualInt64Array = require( './../lib' );

var x = new Int64Array( [ 1, 2, 3 ] );
var y = new Int64Array( [ 1, 2, 3 ] );
var out = isEqualInt64Array( x, y );
console.log( out );
// => true

x = new Int64Array( [ 1, 2, 3 ] );
y = new Uint64Array( [ 1, 2, 3 ] );
out = isEqualInt64Array( x, y );
console.log( out );
// => false

x = new Int64Array( [ 1, 2, 3 ] );
y = new Int64Array( [ 1, 2, 4 ] );
out = isEqualInt64Array( x, y );
console.log( out );
// => false
Loading
Loading