@stdlib/strided-base-ternary
Advanced tools
+1
-1
@@ -1,1 +0,1 @@ | ||
| Copyright (c) 2016-2021 The Stdlib Authors. | ||
| Copyright (c) 2016-2022 The Stdlib Authors. |
+2
-2
| { | ||
| "name": "@stdlib/strided-base-ternary", | ||
| "version": "0.0.6", | ||
| "version": "0.0.7", | ||
| "description": "Apply a ternary callback to strided input array elements and assign results to elements in a strided output array.", | ||
@@ -45,5 +45,5 @@ "license": "Apache-2.0", | ||
| "@stdlib/array-filled": "^0.0.x", | ||
| "@stdlib/array-filled-by": "^0.0.x", | ||
| "@stdlib/array-float64": "^0.0.x", | ||
| "@stdlib/bench": "^0.0.x", | ||
| "@stdlib/blas-ext-base-gfill-by": "^0.0.x", | ||
| "@stdlib/math-base-assert-is-nan": "^0.0.x", | ||
@@ -50,0 +50,0 @@ "@stdlib/math-base-special-floor": "^0.0.x", |
+31
-22
@@ -23,3 +23,3 @@ <!-- | ||
| [![NPM version][npm-image]][npm-url] [![Build Status][test-image]][test-url] [![Coverage Status][coverage-image]][coverage-url] [![dependencies][dependencies-image]][dependencies-url] | ||
| [![NPM version][npm-image]][npm-url] [![Build Status][test-image]][test-url] [![Coverage Status][coverage-image]][coverage-url] <!-- [![dependencies][dependencies-image]][dependencies-url] --> | ||
@@ -83,3 +83,2 @@ > Apply a ternary callback to strided input array elements and assign results to elements in a strided output array. | ||
| var Float64Array = require( '@stdlib/array-float64' ); | ||
| var floor = require( '@stdlib/math-base-special-floor' ); | ||
@@ -95,6 +94,4 @@ function add( x, y, z ) { | ||
| var N = floor( x.length / 2 ); | ||
| ternary( [ x, y, z, w ], [ N ], [ 2, 2, 2, -1 ], add ); | ||
| // w => <Float64Array>[ 15.0, 9.0, 3.0, 0.0, 0.0, 0.0 ] | ||
| ternary( [ x, y, z, w ], [ 3 ], [ 2, 2, 2, -1 ], add ); | ||
| // w => <Float64Array>[ 15.0, 9.0, 3.0, 0.0, 0.0 ] | ||
| ``` | ||
@@ -106,3 +103,2 @@ | ||
| var Float64Array = require( '@stdlib/array-float64' ); | ||
| var floor = require( '@stdlib/math-base-special-floor' ); | ||
@@ -125,5 +121,3 @@ function add( x, y, z ) { | ||
| var N = floor( x0.length / 2 ); | ||
| ternary( [ x1, y1, z1, w1 ], [ N ], [ -2, -2, -2, 1 ], add ); | ||
| ternary( [ x1, y1, z1, w1 ], [ 3 ], [ -2, -2, -2, 1 ], add ); | ||
| // w0 => <Float64Array>[ 0.0, 0.0, 0.0, 18.0, 12.0, 6.0 ] | ||
@@ -164,3 +158,2 @@ ``` | ||
| var Float64Array = require( '@stdlib/array-float64' ); | ||
| var floor = require( '@stdlib/math-base-special-floor' ); | ||
@@ -176,5 +169,3 @@ function add( x, y, z ) { | ||
| var N = floor( x.length / 2 ); | ||
| ternary.ndarray( [ x, y, z, w ], [ N ], [ 2, 2, 2, -1 ], [ 1, 1, 1, w.length-1 ], add ); | ||
| ternary.ndarray( [ x, y, z, w ], [ 3 ], [ 2, 2, 2, -1 ], [ 1, 1, 1, w.length-1 ], add ); | ||
| // w => <Float64Array>[ 0.0, 0.0, 0.0, 18.0, 12.0, 6.0 ] | ||
@@ -202,3 +193,3 @@ ``` | ||
| var filledarray = require( '@stdlib/array-filled' ); | ||
| var gfillBy = require( '@stdlib/blas-ext-base-gfill-by' ); | ||
| var filledarrayBy = require( '@stdlib/array-filled-by' ); | ||
| var ternary = require( '@stdlib/strided-base-ternary' ); | ||
@@ -212,12 +203,9 @@ | ||
| var x = filledarray( 0.0, N, 'generic' ); | ||
| gfillBy( x.length, x, 1, discreteUniform( -100, 100 ) ); | ||
| var x = filledarrayBy( N, 'generic', discreteUniform( -100, 100 ) ); | ||
| console.log( x ); | ||
| var y = filledarray( 0.0, N, 'generic' ); | ||
| gfillBy( y.length, y, 1, discreteUniform( -100, 100 ) ); | ||
| var y = filledarrayBy( N, 'generic', discreteUniform( -100, 100 ) ); | ||
| console.log( y ); | ||
| var z = filledarray( 0.0, N, 'generic' ); | ||
| gfillBy( z.length, z, 1, discreteUniform( -100, 100 ) ); | ||
| var z = filledarrayBy( N, 'generic', discreteUniform( -100, 100 ) ); | ||
| console.log( z ); | ||
@@ -240,3 +228,13 @@ | ||
| <!-- 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="main-repo" > | ||
@@ -265,3 +263,3 @@ | ||
| Copyright © 2016-2021. The Stdlib [Authors][stdlib-authors]. | ||
| Copyright © 2016-2022. The Stdlib [Authors][stdlib-authors]. | ||
@@ -285,5 +283,16 @@ </section> | ||
| <!-- | ||
| [dependencies-image]: https://img.shields.io/david/stdlib-js/strided-base-ternary.svg | ||
| [dependencies-url]: https://david-dm.org/stdlib-js/strided-base-ternary/main | ||
| --> | ||
| [umd]: https://github.com/umdjs/umd | ||
| [es-module]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules | ||
| [deno-url]: https://github.com/stdlib-js/strided-base-ternary/tree/deno | ||
| [umd-url]: https://github.com/stdlib-js/strided-base-ternary/tree/umd | ||
| [esm-url]: https://github.com/stdlib-js/strided-base-ternary/tree/esm | ||
| [chat-image]: https://img.shields.io/gitter/room/stdlib-js/stdlib.svg | ||
@@ -290,0 +299,0 @@ [chat-url]: https://gitter.im/stdlib-js/stdlib/ |
Unidentified License
LicenseSomething that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
Unidentified License
LicenseSomething that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
62596
0.47%300
3.09%