diff --git a/lib/node_modules/@stdlib/stats/strided/distances/dchebychev/docs/types/test.ts b/lib/node_modules/@stdlib/stats/strided/distances/dchebychev/docs/types/test.ts deleted file mode 100644 index af9b55d683a3..000000000000 --- a/lib/node_modules/@stdlib/stats/strided/distances/dchebychev/docs/types/test.ts +++ /dev/null @@ -1,248 +0,0 @@ -/* -* @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 dchebychev = require( './index' ); - - -// TESTS // - -// The function returns a number... -{ - const x = new Float64Array( 10 ); - const y = new Float64Array( 10 ); - - dchebychev( x.length, x, 1, y, 1 ); // $ExpectType number -} - -// The compiler throws an error if the function is provided a first argument which is not a number... -{ - const x = new Float64Array( 10 ); - const y = new Float64Array( 10 ); - - dchebychev( '10', x, 1, y, 1 ); // $ExpectError - dchebychev( true, x, 1, y, 1 ); // $ExpectError - dchebychev( false, x, 1, y, 1 ); // $ExpectError - dchebychev( null, x, 1, y, 1 ); // $ExpectError - dchebychev( undefined, x, 1, y, 1 ); // $ExpectError - dchebychev( [], x, 1, y, 1 ); // $ExpectError - dchebychev( {}, x, 1, y, 1 ); // $ExpectError - dchebychev( ( x: number ): number => x, x, 1, y, 1 ); // $ExpectError -} - -// The compiler throws an error if the function is provided a second argument which is not a Float64Array... -{ - const x = new Float64Array( 10 ); - const y = new Float64Array( 10 ); - - dchebychev( x.length, 10, 1, y, 1 ); // $ExpectError - dchebychev( x.length, '10', 1, y, 1 ); // $ExpectError - dchebychev( x.length, true, 1, y, 1 ); // $ExpectError - dchebychev( x.length, false, 1, y, 1 ); // $ExpectError - dchebychev( x.length, null, 1, y, 1 ); // $ExpectError - dchebychev( x.length, undefined, 1, y, 1 ); // $ExpectError - dchebychev( x.length, [], 1, y, 1 ); // $ExpectError - dchebychev( x.length, {}, 1, y, 1 ); // $ExpectError - dchebychev( x.length, ( x: number ): number => x, 1, y, 1 ); // $ExpectError -} - -// The compiler throws an error if the function is provided a third argument which is not a number... -{ - const x = new Float64Array( 10 ); - const y = new Float64Array( 10 ); - - dchebychev( x.length, x, '10', y, 1 ); // $ExpectError - dchebychev( x.length, x, true, y, 1 ); // $ExpectError - dchebychev( x.length, x, false, y, 1 ); // $ExpectError - dchebychev( x.length, x, null, y, 1 ); // $ExpectError - dchebychev( x.length, x, undefined, y, 1 ); // $ExpectError - dchebychev( x.length, x, [], y, 1 ); // $ExpectError - dchebychev( x.length, x, {}, y, 1 ); // $ExpectError - dchebychev( x.length, x, ( x: number ): number => x, y, 1 ); // $ExpectError -} - -// The compiler throws an error if the function is provided a fourth argument which is not a Float64Array... -{ - const x = new Float64Array( 10 ); - - dchebychev( x.length, x, 1, 10, 1 ); // $ExpectError - dchebychev( x.length, x, 1, '10', 1 ); // $ExpectError - dchebychev( x.length, x, 1, true, 1 ); // $ExpectError - dchebychev( x.length, x, 1, false, 1 ); // $ExpectError - dchebychev( x.length, x, 1, null, 1 ); // $ExpectError - dchebychev( x.length, x, 1, undefined, 1 ); // $ExpectError - dchebychev( x.length, x, 1, [], 1 ); // $ExpectError - dchebychev( x.length, x, 1, {}, 1 ); // $ExpectError - dchebychev( x.length, x, 1, ( x: number ): number => x, 1 ); // $ExpectError -} - -// The compiler throws an error if the function is provided a fifth argument which is not a number... -{ - const x = new Float64Array( 10 ); - const y = new Float64Array( 10 ); - - dchebychev( x.length, x, 1, y, '10' ); // $ExpectError - dchebychev( x.length, x, 1, y, true ); // $ExpectError - dchebychev( x.length, x, 1, y, false ); // $ExpectError - dchebychev( x.length, x, 1, y, null ); // $ExpectError - dchebychev( x.length, x, 1, y, undefined ); // $ExpectError - dchebychev( x.length, x, 1, y, [] ); // $ExpectError - dchebychev( x.length, x, 1, y, {} ); // $ExpectError - dchebychev( x.length, x, 1, y, ( x: number ): number => x ); // $ExpectError -} - -// The compiler throws an error if the function is provided an unsupported number of arguments... -{ - const x = new Float64Array( 10 ); - const y = new Float64Array( 10 ); - - dchebychev(); // $ExpectError - dchebychev( x.length ); // $ExpectError - dchebychev( x.length, x ); // $ExpectError - dchebychev( x.length, x, 1 ); // $ExpectError - dchebychev( x.length, x, 1, y ); // $ExpectError - dchebychev( x.length, x, 1, y, 1, 10 ); // $ExpectError -} - -// Attached to main export is an `ndarray` method which returns a number... -{ - const x = new Float64Array( 10 ); - const y = new Float64Array( 10 ); - - dchebychev.ndarray( x.length, x, 1, 0, y, 1, 0 ); // $ExpectType number -} - -// The compiler throws an error if the `ndarray` method is provided a first argument which is not a number... -{ - const x = new Float64Array( 10 ); - const y = new Float64Array( 10 ); - - dchebychev.ndarray( '10', x, 1, 0, y, 1, 0 ); // $ExpectError - dchebychev.ndarray( true, x, 1, 0, y, 1, 0 ); // $ExpectError - dchebychev.ndarray( false, x, 1, 0, y, 1, 0 ); // $ExpectError - dchebychev.ndarray( null, x, 1, 0, y, 1, 0 ); // $ExpectError - dchebychev.ndarray( undefined, x, 1, 0, y, 1, 0 ); // $ExpectError - dchebychev.ndarray( [], x, 1, 0, y, 1, 0 ); // $ExpectError - dchebychev.ndarray( {}, x, 1, 0, y, 1, 0 ); // $ExpectError - dchebychev.ndarray( ( x: number ): number => x, x, 1, 0, y, 1, 0 ); // $ExpectError -} - -// The compiler throws an error if the `ndarray` method is provided a second argument which is not a Float64Array... -{ - const x = new Float64Array( 10 ); - const y = new Float64Array( 10 ); - - dchebychev.ndarray( x.length, 10, 1, 0, y, 1, 0 ); // $ExpectError - dchebychev.ndarray( x.length, '10', 1, 0, y, 1, 0 ); // $ExpectError - dchebychev.ndarray( x.length, true, 1, 0, y, 1, 0 ); // $ExpectError - dchebychev.ndarray( x.length, false, 1, 0, y, 1, 0 ); // $ExpectError - dchebychev.ndarray( x.length, null, 1, 0, y, 1, 0 ); // $ExpectError - dchebychev.ndarray( x.length, undefined, 1, 0, y, 1, 0 ); // $ExpectError - dchebychev.ndarray( x.length, [], 1, 0, y, 1, 0 ); // $ExpectError - dchebychev.ndarray( x.length, {}, 1, 0, y, 1, 0 ); // $ExpectError - dchebychev.ndarray( x.length, ( x: number ): number => x, 1, 0, y, 1, 0 ); // $ExpectError -} - -// The compiler throws an error if the `ndarray` method is provided a third argument which is not a number... -{ - const x = new Float64Array( 10 ); - const y = new Float64Array( 10 ); - - dchebychev.ndarray( x.length, x, '10', 0, y, 1, 0 ); // $ExpectError - dchebychev.ndarray( x.length, x, true, 0, y, 1, 0 ); // $ExpectError - dchebychev.ndarray( x.length, x, false, 0, y, 1, 0 ); // $ExpectError - dchebychev.ndarray( x.length, x, null, 0, y, 1, 0 ); // $ExpectError - dchebychev.ndarray( x.length, x, undefined, 0, y, 1, 0 ); // $ExpectError - dchebychev.ndarray( x.length, x, [], 0, y, 1, 0 ); // $ExpectError - dchebychev.ndarray( x.length, x, {}, 0, y, 1, 0 ); // $ExpectError - dchebychev.ndarray( x.length, x, ( x: number ): number => x, 0, y, 1, 0 ); // $ExpectError -} - -// The compiler throws an error if the `ndarray` method is provided a fourth argument which is not a number... -{ - const x = new Float64Array( 10 ); - const y = new Float64Array( 10 ); - - dchebychev.ndarray( x.length, x, 1, '10', y, 1, 0 ); // $ExpectError - dchebychev.ndarray( x.length, x, 1, true, y, 1, 0 ); // $ExpectError - dchebychev.ndarray( x.length, x, 1, false, y, 1, 0 ); // $ExpectError - dchebychev.ndarray( x.length, x, 1, null, y, 1, 0 ); // $ExpectError - dchebychev.ndarray( x.length, x, 1, undefined, y, 1, 0 ); // $ExpectError - dchebychev.ndarray( x.length, x, 1, [], y, 1, 0 ); // $ExpectError - dchebychev.ndarray( x.length, x, 1, {}, y, 1, 0 ); // $ExpectError - dchebychev.ndarray( x.length, x, 1, ( x: number ): number => x, y, 1, 0 ); // $ExpectError -} - -// The compiler throws an error if the `ndarray` method is provided a fifth argument which is not a Float64Array... -{ - const x = new Float64Array( 10 ); - - dchebychev.ndarray( x.length, x, 1, 0, 10, 1, 0 ); // $ExpectError - dchebychev.ndarray( x.length, x, 1, 0, '10', 1, 0 ); // $ExpectError - dchebychev.ndarray( x.length, x, 1, 0, true, 1, 0 ); // $ExpectError - dchebychev.ndarray( x.length, x, 1, 0, false, 1, 0 ); // $ExpectError - dchebychev.ndarray( x.length, x, 1, 0, null, 1, 0 ); // $ExpectError - dchebychev.ndarray( x.length, x, 1, 0, undefined, 1, 0 ); // $ExpectError - dchebychev.ndarray( x.length, x, 1, 0, [], 1, 0 ); // $ExpectError - dchebychev.ndarray( x.length, x, 1, 0, {}, 1, 0 ); // $ExpectError - dchebychev.ndarray( x.length, x, 1, 0, ( x: number ): number => x, 1, 0 ); // $ExpectError -} - -// The compiler throws an error if the `ndarray` method is provided a sixth argument which is not a number... -{ - const x = new Float64Array( 10 ); - const y = new Float64Array( 10 ); - - dchebychev.ndarray( x.length, x, 1, 0, y, '10', 0 ); // $ExpectError - dchebychev.ndarray( x.length, x, 1, 0, y, true, 0 ); // $ExpectError - dchebychev.ndarray( x.length, x, 1, 0, y, false, 0 ); // $ExpectError - dchebychev.ndarray( x.length, x, 1, 0, y, null, 0 ); // $ExpectError - dchebychev.ndarray( x.length, x, 1, 0, y, undefined, 0 ); // $ExpectError - dchebychev.ndarray( x.length, x, 1, 0, y, [], 0 ); // $ExpectError - dchebychev.ndarray( x.length, x, 1, 0, y, {}, 0 ); // $ExpectError - dchebychev.ndarray( x.length, x, 1, 0, y, ( x: number ): number => x, 0 ); // $ExpectError -} - -// The compiler throws an error if the `ndarray` method is provided a seventh argument which is not a number... -{ - const x = new Float64Array( 10 ); - const y = new Float64Array( 10 ); - - dchebychev.ndarray( x.length, x, 1, 0, y, 1, '10' ); // $ExpectError - dchebychev.ndarray( x.length, x, 1, 0, y, 1, true ); // $ExpectError - dchebychev.ndarray( x.length, x, 1, 0, y, 1, false ); // $ExpectError - dchebychev.ndarray( x.length, x, 1, 0, y, 1, null ); // $ExpectError - dchebychev.ndarray( x.length, x, 1, 0, y, 1, undefined ); // $ExpectError - dchebychev.ndarray( x.length, x, 1, 0, y, 1, [] ); // $ExpectError - dchebychev.ndarray( x.length, x, 1, 0, y, 1, {} ); // $ExpectError - dchebychev.ndarray( x.length, x, 1, 0, y, 1, ( x: number ): number => x ); // $ExpectError -} - -// The compiler throws an error if the `ndarray` method is provided an unsupported number of arguments... -{ - const x = new Float64Array( 10 ); - const y = new Float64Array( 10 ); - - dchebychev.ndarray(); // $ExpectError - dchebychev.ndarray( x.length ); // $ExpectError - dchebychev.ndarray( x.length, x ); // $ExpectError - dchebychev.ndarray( x.length, x, 1 ); // $ExpectError - dchebychev.ndarray( x.length, x, 1, 0 ); // $ExpectError - dchebychev.ndarray( x.length, x, 1, 0, y ); // $ExpectError - dchebychev.ndarray( x.length, x, 1, 0, y, 1 ); // $ExpectError - dchebychev.ndarray( x.length, x, 1, 0, y, 1, 0, 10 ); // $ExpectError -} diff --git a/lib/node_modules/@stdlib/stats/strided/distances/dchebychev/README.md b/lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/README.md similarity index 77% rename from lib/node_modules/@stdlib/stats/strided/distances/dchebychev/README.md rename to lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/README.md index 998172b23477..e1102ecb4739 100644 --- a/lib/node_modules/@stdlib/stats/strided/distances/dchebychev/README.md +++ b/lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/README.md @@ -18,15 +18,15 @@ limitations under the License. --> -# dchebychev +# dchebyshev -> Compute the Chebychev distance between two double-precision floating-point strided arrays. +> Compute the Chebyshev distance between two double-precision floating-point strided arrays.
-The [Chebychev distance][wikipedia-chebychev-distance] (also known as the $L_∞$ metric ) is defined as +The [Chebyshev distance][wikipedia-chebyshev-distance] (also known as the $L_∞$ metric ) is defined as - + ```math D(A,B)=\max _{i}(|a_{i}-b_{i}|) = \lim _{p\to \infty}{\bigg (}\sum_{i=0}^{N-1}\left|a_{i}-b_{i}\right|^{p}{\bigg )}^{1/p} @@ -45,12 +45,12 @@ where `a_i` and `b_i` are the _ith_ components of vectors **A** and **B**, respe ## Usage ```javascript -var dchebychev = require( '@stdlib/stats/strided/distances/dchebychev' ); +var dchebyshev = require( '@stdlib/stats/strided/distances/dchebyshev' ); ``` -#### dchebychev( N, x, strideX, y, strideY ) +#### dchebyshev( N, x, strideX, y, strideY ) -Computes the Chebychev distance between two double-precision floating-point strided arrays. +Computes the Chebyshev distance between two double-precision floating-point strided arrays. ```javascript var Float64Array = require( '@stdlib/array/float64' ); @@ -58,7 +58,7 @@ var Float64Array = require( '@stdlib/array/float64' ); var x = new Float64Array( [ 4.0, 2.0, -3.0, 5.0, -1.0 ] ); var y = new Float64Array( [ 2.0, 6.0, -1.0, -4.0, 8.0 ] ); -var z = dchebychev( x.length, x, 1, y, 1 ); +var z = dchebyshev( x.length, x, 1, y, 1 ); // returns 9.0 ``` @@ -70,7 +70,7 @@ The function has the following parameters: - **y**: input [`Float64Array`][@stdlib/array/float64]. - **strideY**: stride length of `y`. -The `N` and stride parameters determine which elements in the strided arrays are accessed at runtime. For example, to calculate the Chebychev distance between every other element in `x` and the first `N` elements of `y` in reverse order, +The `N` and stride parameters determine which elements in the strided arrays are accessed at runtime. For example, to calculate the Chebyshev distance between every other element in `x` and the first `N` elements of `y` in reverse order, ```javascript var Float64Array = require( '@stdlib/array/float64' ); @@ -78,7 +78,7 @@ var Float64Array = require( '@stdlib/array/float64' ); var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); var y = new Float64Array( [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ] ); -var z = dchebychev( 3, x, 2, y, -1 ); +var z = dchebyshev( 3, x, 2, y, -1 ); // returns 4.0 ``` @@ -97,13 +97,13 @@ var y0 = new Float64Array( [ 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ); var x1 = new Float64Array( x0.buffer, x0.BYTES_PER_ELEMENT*1 ); // start at 2nd element var y1 = new Float64Array( y0.buffer, y0.BYTES_PER_ELEMENT*3 ); // start at 4th element -var z = dchebychev( 3, x1, 1, y1, 1 ); +var z = dchebyshev( 3, x1, 1, y1, 1 ); // returns 8.0 ``` -#### dchebychev.ndarray( N, x, strideX, offsetX, y, strideY, offsetY ) +#### dchebyshev.ndarray( N, x, strideX, offsetX, y, strideY, offsetY ) -Computes the Chebychev distance between two double-precision floating-point strided arrays using alternative indexing semantics. +Computes the Chebyshev distance between two double-precision floating-point strided arrays using alternative indexing semantics. ```javascript var Float64Array = require( '@stdlib/array/float64' ); @@ -111,7 +111,7 @@ var Float64Array = require( '@stdlib/array/float64' ); var x = new Float64Array( [ 4.0, 2.0, -3.0, 5.0, -1.0 ] ); var y = new Float64Array( [ 2.0, 6.0, -1.0, -4.0, 8.0 ] ); -var z = dchebychev.ndarray( x.length, x, 1, 0, y, 1, 0 ); +var z = dchebyshev.ndarray( x.length, x, 1, 0, y, 1, 0 ); // returns 9.0 ``` @@ -120,7 +120,7 @@ The function has the following additional parameters: - **offsetX**: starting index for `x`. - **offsetY**: starting index for `y`. -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, to calculate the Chebychev distance between every other element in `x` starting from the second element with the last 3 elements in `y` in reverse order +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, to calculate the Chebyshev distance between every other element in `x` starting from the second element with the last 3 elements in `y` in reverse order ```javascript var Float64Array = require( '@stdlib/array/float64' ); @@ -128,7 +128,7 @@ var Float64Array = require( '@stdlib/array/float64' ); var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); var y = new Float64Array( [ 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ); -var z = dchebychev.ndarray( 3, x, 2, 1, y, -1, y.length-1 ); +var z = dchebyshev.ndarray( 3, x, 2, 1, y, -1, y.length-1 ); // returns 10.0 ``` @@ -154,7 +154,7 @@ var z = dchebychev.ndarray( 3, x, 2, 1, y, -1, y.length-1 ); ```javascript var discreteUniform = require( '@stdlib/random/array/discrete-uniform' ); -var dchebychev = require( '@stdlib/stats/strided/distances/dchebychev' ); +var dchebyshev = require( '@stdlib/stats/strided/distances/dchebyshev' ); var opts = { 'dtype': 'float64' @@ -165,7 +165,7 @@ console.log( x ); var y = discreteUniform( x.length, 0, 10, opts ); console.log( y ); -var out = dchebychev.ndarray( x.length, x, 1, 0, y, -1, y.length-1 ); +var out = dchebyshev.ndarray( x.length, x, 1, 0, y, -1, y.length-1 ); console.log( out ); ``` @@ -196,18 +196,18 @@ console.log( out ); ### Usage ```c -#include "stdlib/stats/strided/distances/dchebychev.h" +#include "stdlib/stats/strided/distances/dchebyshev.h" ``` -#### stdlib_strided_dchebychev( N, \*X, strideX, \*Y, strideY ) +#### stdlib_strided_dchebyshev( N, \*X, strideX, \*Y, strideY ) -Computes the Chebychev distance between two double-precision floating-point strided arrays. +Computes the Chebyshev distance between two double-precision floating-point strided arrays. ```c const double x[] = { 4.0, 2.0, -3.0, 5.0, -1.0 }; const double y[] = { 2.0, 6.0, -1.0, -4.0, 8.0 }; -double v = stdlib_strided_dchebychev( 5, x, 1, y, 1 ); +double v = stdlib_strided_dchebyshev( 5, x, 1, y, 1 ); // returns 9.0 ``` @@ -220,22 +220,22 @@ The function accepts the following arguments: - **strideY**: `[in] CBLAS_INT` stride length of `Y`. ```c -double stdlib_strided_dchebychev( const CBLAS_INT N, const double *X, const CBLAS_INT strideX, const double *Y, const CBLAS_INT strideY ); +double stdlib_strided_dchebyshev( const CBLAS_INT N, const double *X, const CBLAS_INT strideX, const double *Y, const CBLAS_INT strideY ); ``` -#### stdlib_strided_dchebychev_ndarray( N, \*X, strideX, offsetX, \*Y, strideY, offsetY ) +#### stdlib_strided_dchebyshev_ndarray( N, \*X, strideX, offsetX, \*Y, strideY, offsetY ) -Computes the Chebychev distance between two double-precision floating-point strided arrays using alternative indexing semantics. +Computes the Chebyshev distance between two double-precision floating-point strided arrays using alternative indexing semantics. ```c const double x[] = { 4.0, 2.0, -3.0, 5.0, -1.0 }; const double y[] = { 2.0, 6.0, -1.0, -4.0, 8.0 }; -double v = stdlib_strided_dchebychev_ndarray( 5, x, -1, 4, y, -1, 4 ); +double v = stdlib_strided_dchebyshev_ndarray( 5, x, -1, 4, y, -1, 4 ); // returns 9.0 ``` @@ -250,7 +250,7 @@ The function accepts the following arguments: - **offsetY**: `[in] CBLAS_INT` starting index for `Y`. ```c -double stdlib_strided_dchebychev_ndarray( const CBLAS_INT N, const double *X, const CBLAS_INT strideX, const CBLAS_INT offsetX, const double *Y, const CBLAS_INT strideY, const CBLAS_INT offsetY ); +double stdlib_strided_dchebyshev_ndarray( const CBLAS_INT N, const double *X, const CBLAS_INT strideX, const CBLAS_INT offsetX, const double *Y, const CBLAS_INT strideY, const CBLAS_INT offsetY ); ```
@@ -272,7 +272,7 @@ double stdlib_strided_dchebychev_ndarray( const CBLAS_INT N, const double *X, co ### Examples ```c -#include "stdlib/stats/strided/distances/dchebychev.h" +#include "stdlib/stats/strided/distances/dchebyshev.h" #include int main( void ) { @@ -287,17 +287,17 @@ int main( void ) { const int strideX = 1; const int strideY = -1; - // Compute the Chebychev distance between `x` and `y`: - double d = stdlib_strided_dchebychev( N, x, strideX, y, strideY ); + // Compute the Chebyshev distance between `x` and `y`: + double d = stdlib_strided_dchebyshev( N, x, strideX, y, strideY ); // Print the result: - printf( "Chebychev distance: %lf\n", d ); + printf( "Chebyshev distance: %lf\n", d ); - // Compute the Chebychev distance between `x` and `y` with offsets: - d = stdlib_strided_dchebychev_ndarray( N, x, strideX, 0, y, strideY, N-1 ); + // Compute the Chebyshev distance between `x` and `y` with offsets: + d = stdlib_strided_dchebyshev_ndarray( N, x, strideX, 0, y, strideY, N-1 ); // Print the result: - printf( "Chebychev distance: %lf\n", d ); + printf( "Chebyshev distance: %lf\n", d ); } ``` @@ -325,7 +325,7 @@ int main( void ) { [mdn-typed-array]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray -[wikipedia-chebychev-distance]: https://en.wikipedia.org/wiki/Chebyshev_distance +[wikipedia-chebyshev-distance]: https://en.wikipedia.org/wiki/Chebyshev_distance diff --git a/lib/node_modules/@stdlib/stats/strided/distances/dchebychev/benchmark/benchmark.js b/lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/benchmark/benchmark.js similarity index 95% rename from lib/node_modules/@stdlib/stats/strided/distances/dchebychev/benchmark/benchmark.js rename to lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/benchmark/benchmark.js index 508b6360781a..7a4eb3c0f2ca 100644 --- a/lib/node_modules/@stdlib/stats/strided/distances/dchebychev/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/benchmark/benchmark.js @@ -26,7 +26,7 @@ var isnan = require( '@stdlib/math/base/assert/is-nan' ); var pow = require( '@stdlib/math/base/special/pow' ); var format = require( '@stdlib/string/format' ); var pkg = require( './../package.json' ).name; -var dchebychev = require( './../lib/dchebychev.js' ); +var dchebyshev = require( './../lib/dchebyshev.js' ); // VARIABLES // @@ -62,7 +62,7 @@ function createBenchmark( len ) { b.tic(); for ( i = 0; i < b.iterations; i++ ) { - d = dchebychev( x.length, x, 1, y, 1 ); + d = dchebyshev( x.length, x, 1, y, 1 ); if ( isnan( d ) ) { b.fail( 'should not return NaN' ); } diff --git a/lib/node_modules/@stdlib/stats/strided/distances/dchebychev/benchmark/benchmark.native.js b/lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/benchmark/benchmark.native.js similarity index 92% rename from lib/node_modules/@stdlib/stats/strided/distances/dchebychev/benchmark/benchmark.native.js rename to lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/benchmark/benchmark.native.js index a2cccc84bef3..1e3997f2c9ea 100644 --- a/lib/node_modules/@stdlib/stats/strided/distances/dchebychev/benchmark/benchmark.native.js +++ b/lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/benchmark/benchmark.native.js @@ -32,9 +32,9 @@ var pkg = require( './../package.json' ).name; // VARIABLES // -var dchebychev = tryRequire( resolve( __dirname, './../lib/dchebychev.native.js' ) ); +var dchebyshev = tryRequire( resolve( __dirname, './../lib/dchebyshev.native.js' ) ); var opts = { - 'skip': ( dchebychev instanceof Error ) + 'skip': ( dchebyshev instanceof Error ) }; var options = { 'dtype': 'float64' @@ -67,7 +67,7 @@ function createBenchmark( len ) { b.tic(); for ( i = 0; i < b.iterations; i++ ) { - d = dchebychev( x.length, x, 1, y, 1 ); + d = dchebyshev( x.length, x, 1, y, 1 ); if ( isnan( d ) ) { b.fail( 'should not return NaN' ); } diff --git a/lib/node_modules/@stdlib/stats/strided/distances/dchebychev/benchmark/benchmark.ndarray.js b/lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/benchmark/benchmark.ndarray.js similarity index 95% rename from lib/node_modules/@stdlib/stats/strided/distances/dchebychev/benchmark/benchmark.ndarray.js rename to lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/benchmark/benchmark.ndarray.js index 4dc3d2609f48..58e96571ee9a 100644 --- a/lib/node_modules/@stdlib/stats/strided/distances/dchebychev/benchmark/benchmark.ndarray.js +++ b/lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/benchmark/benchmark.ndarray.js @@ -26,7 +26,7 @@ var isnan = require( '@stdlib/math/base/assert/is-nan' ); var pow = require( '@stdlib/math/base/special/pow' ); var format = require( '@stdlib/string/format' ); var pkg = require( './../package.json' ).name; -var dchebychev = require( './../lib/ndarray.js' ); +var dchebyshev = require( './../lib/ndarray.js' ); // VARIABLES // @@ -62,7 +62,7 @@ function createBenchmark( len ) { b.tic(); for ( i = 0; i < b.iterations; i++ ) { - d = dchebychev( x.length, x, 1, 0, y, 1, 0 ); + d = dchebyshev( x.length, x, 1, 0, y, 1, 0 ); if ( isnan( d ) ) { b.fail( 'should not return NaN' ); } diff --git a/lib/node_modules/@stdlib/stats/strided/distances/dchebychev/benchmark/benchmark.ndarray.native.js b/lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/benchmark/benchmark.ndarray.native.js similarity index 93% rename from lib/node_modules/@stdlib/stats/strided/distances/dchebychev/benchmark/benchmark.ndarray.native.js rename to lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/benchmark/benchmark.ndarray.native.js index d7dc415cc71d..2094b73a3b97 100644 --- a/lib/node_modules/@stdlib/stats/strided/distances/dchebychev/benchmark/benchmark.ndarray.native.js +++ b/lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/benchmark/benchmark.ndarray.native.js @@ -32,9 +32,9 @@ var pkg = require( './../package.json' ).name; // VARIABLES // -var dchebychev = tryRequire( resolve( __dirname, './../lib/ndarray.native.js' ) ); +var dchebyshev = tryRequire( resolve( __dirname, './../lib/ndarray.native.js' ) ); var opts = { - 'skip': ( dchebychev instanceof Error ) + 'skip': ( dchebyshev instanceof Error ) }; var options = { 'dtype': 'float64' @@ -67,7 +67,7 @@ function createBenchmark( len ) { b.tic(); for ( i = 0; i < b.iterations; i++ ) { - d = dchebychev( x.length, x, 1, 0, y, 1, 0 ); + d = dchebyshev( x.length, x, 1, 0, y, 1, 0 ); if ( isnan( d ) ) { b.fail( 'should not return NaN' ); } diff --git a/lib/node_modules/@stdlib/stats/strided/distances/dchebychev/benchmark/c/Makefile b/lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/benchmark/c/Makefile similarity index 100% rename from lib/node_modules/@stdlib/stats/strided/distances/dchebychev/benchmark/c/Makefile rename to lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/benchmark/c/Makefile diff --git a/lib/node_modules/@stdlib/stats/strided/distances/dchebychev/benchmark/c/benchmark.length.c b/lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/benchmark/c/benchmark.length.c similarity index 95% rename from lib/node_modules/@stdlib/stats/strided/distances/dchebychev/benchmark/c/benchmark.length.c rename to lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/benchmark/c/benchmark.length.c index ff3b9df9a973..2c80f1d53f6c 100644 --- a/lib/node_modules/@stdlib/stats/strided/distances/dchebychev/benchmark/c/benchmark.length.c +++ b/lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/benchmark/c/benchmark.length.c @@ -16,14 +16,14 @@ * limitations under the License. */ -#include "stdlib/stats/strided/distances/dchebychev.h" +#include "stdlib/stats/strided/distances/dchebyshev.h" #include #include #include #include #include -#define NAME "dchebychev" +#define NAME "dchebyshev" #define ITERATIONS 10000000 #define REPEATS 3 #define MIN 1 @@ -113,7 +113,7 @@ static double benchmark1( int iterations, int len ) { z = 0.0; t = tic(); for ( i = 0; i < iterations; i++ ) { - z = stdlib_strided_dchebychev( len, x, 1, y, 1 ); + z = stdlib_strided_dchebyshev( len, x, 1, y, 1 ); if ( z != z ) { printf( "should not return NaN\n" ); break; @@ -152,7 +152,7 @@ static double benchmark2( int iterations, int len ) { z = 0.0; t = tic(); for ( i = 0; i < iterations; i++ ) { - z = stdlib_strided_dchebychev_ndarray( len, x, 1, 0, y, 1, 0 ); + z = stdlib_strided_dchebyshev_ndarray( len, x, 1, 0, y, 1, 0 ); if ( z != z ) { printf( "should not return NaN\n" ); break; diff --git a/lib/node_modules/@stdlib/stats/strided/distances/dchebychev/binding.gyp b/lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/binding.gyp similarity index 100% rename from lib/node_modules/@stdlib/stats/strided/distances/dchebychev/binding.gyp rename to lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/binding.gyp diff --git a/lib/node_modules/@stdlib/stats/strided/distances/dchebychev/docs/repl.txt b/lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/docs/repl.txt similarity index 94% rename from lib/node_modules/@stdlib/stats/strided/distances/dchebychev/docs/repl.txt rename to lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/docs/repl.txt index 5d830f94c96a..46e254a664a1 100644 --- a/lib/node_modules/@stdlib/stats/strided/distances/dchebychev/docs/repl.txt +++ b/lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/docs/repl.txt @@ -1,6 +1,6 @@ {{alias}}( N, x, strideX, y, strideY ) - Computes the Chebychev distance between two double-precision floating-point + Computes the Chebyshev distance between two double-precision floating-point strided arrays. The `N` and stride parameters determine which elements in the strided arrays @@ -31,7 +31,7 @@ Returns ------- out: number - Chebychev distance. + Chebyshev distance. Examples -------- @@ -57,7 +57,7 @@ {{alias}}.ndarray( N, x, strideX, offsetX, y, strideY, offsetY ) - Computes the Chebychev distance between two double-precision floating-point + Computes the Chebyshev distance between two double-precision floating-point strided arrays using alternative indexing semantics. While typed array views mandate a view offset based on the underlying @@ -90,7 +90,7 @@ Returns ------- out: number - Chebychev distance. + Chebyshev distance. Examples -------- diff --git a/lib/node_modules/@stdlib/stats/strided/distances/dchebychev/docs/types/index.d.ts b/lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/docs/types/index.d.ts similarity index 81% rename from lib/node_modules/@stdlib/stats/strided/distances/dchebychev/docs/types/index.d.ts rename to lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/docs/types/index.d.ts index 4bac5a0a3e6c..08d013d3adbf 100644 --- a/lib/node_modules/@stdlib/stats/strided/distances/dchebychev/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/docs/types/index.d.ts @@ -19,18 +19,18 @@ // TypeScript Version: 4.1 /** -* Interface describing `dchebychev`. +* Interface describing `dchebyshev`. */ interface Routine { /** - * Computes the Chebychev distance between two double-precision floating-point strided arrays. + * Computes the Chebyshev distance between two double-precision floating-point strided arrays. * * @param N - number of indexed elements * @param x - first input array * @param strideX - `x` stride length * @param y - second input array * @param strideY - `y` stride length - * @returns Chebychev distance + * @returns Chebyshev distance * * @example * var Float64Array = require( '@stdlib/array/float64' ); @@ -38,13 +38,13 @@ interface Routine { * var x = new Float64Array( [ 4.0, 2.0, -3.0, 5.0, -1.0 ] ); * var y = new Float64Array( [ 2.0, 6.0, -1.0, -4.0, 8.0 ] ); * - * var z = dchebychev( x.length, x, 1, y, 1 ); + * var z = dchebyshev( x.length, x, 1, y, 1 ); * // returns 9.0 */ ( N: number, x: Float64Array, strideX: number, y: Float64Array, strideY: number ): number; /** - * Computes the Chebychev distance between two double-precision floating-point strided arrays using alternative indexing semantics. + * Computes the Chebyshev distance between two double-precision floating-point strided arrays using alternative indexing semantics. * * @param N - number of indexed elements * @param x - first input array @@ -53,7 +53,7 @@ interface Routine { * @param y - second input array * @param strideY - `y` stride length * @param offsetY - starting index for `y` - * @returns Chebychev distance + * @returns Chebyshev distance * * @example * var Float64Array = require( '@stdlib/array/float64' ); @@ -61,21 +61,21 @@ interface Routine { * var x = new Float64Array( [ 4.0, 2.0, -3.0, 5.0, -1.0 ] ); * var y = new Float64Array( [ 2.0, 6.0, -1.0, -4.0, 8.0 ] ); * - * var z = dchebychev.ndarray( x.length, x, 1, 0, y, 1, 0 ); + * var z = dchebyshev.ndarray( x.length, x, 1, 0, y, 1, 0 ); * // returns 9.0 */ ndarray( N: number, x: Float64Array, strideX: number, offsetX: number, y: Float64Array, strideY: number, offsetY: number ): number; } /** -* Computes the Chebychev distance between two double-precision floating-point strided arrays. +* Computes the Chebyshev distance between two double-precision floating-point strided arrays. * * @param N - number of indexed elements * @param x - first input array * @param strideX - `x` stride length * @param y - second input array * @param strideY - `y` stride length -* @returns Chebychev distance +* @returns Chebyshev distance * * @example * var Float64Array = require( '@stdlib/array/float64' ); @@ -83,7 +83,7 @@ interface Routine { * var x = new Float64Array( [ 4.0, 2.0, -3.0, 5.0, -1.0 ] ); * var y = new Float64Array( [ 2.0, 6.0, -1.0, -4.0, 8.0 ] ); * -* var z = dchebychev( x.length, x, 1, y, 1 ); +* var z = dchebyshev( x.length, x, 1, y, 1 ); * // returns 9.0 * * @example @@ -92,12 +92,12 @@ interface Routine { * var x = new Float64Array( [ 4.0, 2.0, -3.0, 5.0, -1.0 ] ); * var y = new Float64Array( [ 2.0, 6.0, -1.0, -4.0, 8.0 ] ); * -* var z = dchebychev.ndarray( x.length, x, 1, 0, y, 1, 0 ); +* var z = dchebyshev.ndarray( x.length, x, 1, 0, y, 1, 0 ); * // returns 9.0 */ -declare var dchebychev: Routine; +declare var dchebyshev: Routine; // EXPORTS // -export = dchebychev; +export = dchebyshev; diff --git a/lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/docs/types/test.ts b/lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/docs/types/test.ts new file mode 100644 index 000000000000..013c0b504504 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/docs/types/test.ts @@ -0,0 +1,248 @@ +/* +* @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 dchebyshev = require( './index' ); + + +// TESTS // + +// The function returns a number... +{ + const x = new Float64Array( 10 ); + const y = new Float64Array( 10 ); + + dchebyshev( x.length, x, 1, y, 1 ); // $ExpectType number +} + +// The compiler throws an error if the function is provided a first argument which is not a number... +{ + const x = new Float64Array( 10 ); + const y = new Float64Array( 10 ); + + dchebyshev( '10', x, 1, y, 1 ); // $ExpectError + dchebyshev( true, x, 1, y, 1 ); // $ExpectError + dchebyshev( false, x, 1, y, 1 ); // $ExpectError + dchebyshev( null, x, 1, y, 1 ); // $ExpectError + dchebyshev( undefined, x, 1, y, 1 ); // $ExpectError + dchebyshev( [], x, 1, y, 1 ); // $ExpectError + dchebyshev( {}, x, 1, y, 1 ); // $ExpectError + dchebyshev( ( x: number ): number => x, x, 1, y, 1 ); // $ExpectError +} + +// The compiler throws an error if the function is provided a second argument which is not a Float64Array... +{ + const x = new Float64Array( 10 ); + const y = new Float64Array( 10 ); + + dchebyshev( x.length, 10, 1, y, 1 ); // $ExpectError + dchebyshev( x.length, '10', 1, y, 1 ); // $ExpectError + dchebyshev( x.length, true, 1, y, 1 ); // $ExpectError + dchebyshev( x.length, false, 1, y, 1 ); // $ExpectError + dchebyshev( x.length, null, 1, y, 1 ); // $ExpectError + dchebyshev( x.length, undefined, 1, y, 1 ); // $ExpectError + dchebyshev( x.length, [], 1, y, 1 ); // $ExpectError + dchebyshev( x.length, {}, 1, y, 1 ); // $ExpectError + dchebyshev( x.length, ( x: number ): number => x, 1, y, 1 ); // $ExpectError +} + +// The compiler throws an error if the function is provided a third argument which is not a number... +{ + const x = new Float64Array( 10 ); + const y = new Float64Array( 10 ); + + dchebyshev( x.length, x, '10', y, 1 ); // $ExpectError + dchebyshev( x.length, x, true, y, 1 ); // $ExpectError + dchebyshev( x.length, x, false, y, 1 ); // $ExpectError + dchebyshev( x.length, x, null, y, 1 ); // $ExpectError + dchebyshev( x.length, x, undefined, y, 1 ); // $ExpectError + dchebyshev( x.length, x, [], y, 1 ); // $ExpectError + dchebyshev( x.length, x, {}, y, 1 ); // $ExpectError + dchebyshev( x.length, x, ( x: number ): number => x, y, 1 ); // $ExpectError +} + +// The compiler throws an error if the function is provided a fourth argument which is not a Float64Array... +{ + const x = new Float64Array( 10 ); + + dchebyshev( x.length, x, 1, 10, 1 ); // $ExpectError + dchebyshev( x.length, x, 1, '10', 1 ); // $ExpectError + dchebyshev( x.length, x, 1, true, 1 ); // $ExpectError + dchebyshev( x.length, x, 1, false, 1 ); // $ExpectError + dchebyshev( x.length, x, 1, null, 1 ); // $ExpectError + dchebyshev( x.length, x, 1, undefined, 1 ); // $ExpectError + dchebyshev( x.length, x, 1, [], 1 ); // $ExpectError + dchebyshev( x.length, x, 1, {}, 1 ); // $ExpectError + dchebyshev( x.length, x, 1, ( x: number ): number => x, 1 ); // $ExpectError +} + +// The compiler throws an error if the function is provided a fifth argument which is not a number... +{ + const x = new Float64Array( 10 ); + const y = new Float64Array( 10 ); + + dchebyshev( x.length, x, 1, y, '10' ); // $ExpectError + dchebyshev( x.length, x, 1, y, true ); // $ExpectError + dchebyshev( x.length, x, 1, y, false ); // $ExpectError + dchebyshev( x.length, x, 1, y, null ); // $ExpectError + dchebyshev( x.length, x, 1, y, undefined ); // $ExpectError + dchebyshev( x.length, x, 1, y, [] ); // $ExpectError + dchebyshev( x.length, x, 1, y, {} ); // $ExpectError + dchebyshev( x.length, x, 1, y, ( x: number ): number => x ); // $ExpectError +} + +// The compiler throws an error if the function is provided an unsupported number of arguments... +{ + const x = new Float64Array( 10 ); + const y = new Float64Array( 10 ); + + dchebyshev(); // $ExpectError + dchebyshev( x.length ); // $ExpectError + dchebyshev( x.length, x ); // $ExpectError + dchebyshev( x.length, x, 1 ); // $ExpectError + dchebyshev( x.length, x, 1, y ); // $ExpectError + dchebyshev( x.length, x, 1, y, 1, 10 ); // $ExpectError +} + +// Attached to main export is an `ndarray` method which returns a number... +{ + const x = new Float64Array( 10 ); + const y = new Float64Array( 10 ); + + dchebyshev.ndarray( x.length, x, 1, 0, y, 1, 0 ); // $ExpectType number +} + +// The compiler throws an error if the `ndarray` method is provided a first argument which is not a number... +{ + const x = new Float64Array( 10 ); + const y = new Float64Array( 10 ); + + dchebyshev.ndarray( '10', x, 1, 0, y, 1, 0 ); // $ExpectError + dchebyshev.ndarray( true, x, 1, 0, y, 1, 0 ); // $ExpectError + dchebyshev.ndarray( false, x, 1, 0, y, 1, 0 ); // $ExpectError + dchebyshev.ndarray( null, x, 1, 0, y, 1, 0 ); // $ExpectError + dchebyshev.ndarray( undefined, x, 1, 0, y, 1, 0 ); // $ExpectError + dchebyshev.ndarray( [], x, 1, 0, y, 1, 0 ); // $ExpectError + dchebyshev.ndarray( {}, x, 1, 0, y, 1, 0 ); // $ExpectError + dchebyshev.ndarray( ( x: number ): number => x, x, 1, 0, y, 1, 0 ); // $ExpectError +} + +// The compiler throws an error if the `ndarray` method is provided a second argument which is not a Float64Array... +{ + const x = new Float64Array( 10 ); + const y = new Float64Array( 10 ); + + dchebyshev.ndarray( x.length, 10, 1, 0, y, 1, 0 ); // $ExpectError + dchebyshev.ndarray( x.length, '10', 1, 0, y, 1, 0 ); // $ExpectError + dchebyshev.ndarray( x.length, true, 1, 0, y, 1, 0 ); // $ExpectError + dchebyshev.ndarray( x.length, false, 1, 0, y, 1, 0 ); // $ExpectError + dchebyshev.ndarray( x.length, null, 1, 0, y, 1, 0 ); // $ExpectError + dchebyshev.ndarray( x.length, undefined, 1, 0, y, 1, 0 ); // $ExpectError + dchebyshev.ndarray( x.length, [], 1, 0, y, 1, 0 ); // $ExpectError + dchebyshev.ndarray( x.length, {}, 1, 0, y, 1, 0 ); // $ExpectError + dchebyshev.ndarray( x.length, ( x: number ): number => x, 1, 0, y, 1, 0 ); // $ExpectError +} + +// The compiler throws an error if the `ndarray` method is provided a third argument which is not a number... +{ + const x = new Float64Array( 10 ); + const y = new Float64Array( 10 ); + + dchebyshev.ndarray( x.length, x, '10', 0, y, 1, 0 ); // $ExpectError + dchebyshev.ndarray( x.length, x, true, 0, y, 1, 0 ); // $ExpectError + dchebyshev.ndarray( x.length, x, false, 0, y, 1, 0 ); // $ExpectError + dchebyshev.ndarray( x.length, x, null, 0, y, 1, 0 ); // $ExpectError + dchebyshev.ndarray( x.length, x, undefined, 0, y, 1, 0 ); // $ExpectError + dchebyshev.ndarray( x.length, x, [], 0, y, 1, 0 ); // $ExpectError + dchebyshev.ndarray( x.length, x, {}, 0, y, 1, 0 ); // $ExpectError + dchebyshev.ndarray( x.length, x, ( x: number ): number => x, 0, y, 1, 0 ); // $ExpectError +} + +// The compiler throws an error if the `ndarray` method is provided a fourth argument which is not a number... +{ + const x = new Float64Array( 10 ); + const y = new Float64Array( 10 ); + + dchebyshev.ndarray( x.length, x, 1, '10', y, 1, 0 ); // $ExpectError + dchebyshev.ndarray( x.length, x, 1, true, y, 1, 0 ); // $ExpectError + dchebyshev.ndarray( x.length, x, 1, false, y, 1, 0 ); // $ExpectError + dchebyshev.ndarray( x.length, x, 1, null, y, 1, 0 ); // $ExpectError + dchebyshev.ndarray( x.length, x, 1, undefined, y, 1, 0 ); // $ExpectError + dchebyshev.ndarray( x.length, x, 1, [], y, 1, 0 ); // $ExpectError + dchebyshev.ndarray( x.length, x, 1, {}, y, 1, 0 ); // $ExpectError + dchebyshev.ndarray( x.length, x, 1, ( x: number ): number => x, y, 1, 0 ); // $ExpectError +} + +// The compiler throws an error if the `ndarray` method is provided a fifth argument which is not a Float64Array... +{ + const x = new Float64Array( 10 ); + + dchebyshev.ndarray( x.length, x, 1, 0, 10, 1, 0 ); // $ExpectError + dchebyshev.ndarray( x.length, x, 1, 0, '10', 1, 0 ); // $ExpectError + dchebyshev.ndarray( x.length, x, 1, 0, true, 1, 0 ); // $ExpectError + dchebyshev.ndarray( x.length, x, 1, 0, false, 1, 0 ); // $ExpectError + dchebyshev.ndarray( x.length, x, 1, 0, null, 1, 0 ); // $ExpectError + dchebyshev.ndarray( x.length, x, 1, 0, undefined, 1, 0 ); // $ExpectError + dchebyshev.ndarray( x.length, x, 1, 0, [], 1, 0 ); // $ExpectError + dchebyshev.ndarray( x.length, x, 1, 0, {}, 1, 0 ); // $ExpectError + dchebyshev.ndarray( x.length, x, 1, 0, ( x: number ): number => x, 1, 0 ); // $ExpectError +} + +// The compiler throws an error if the `ndarray` method is provided a sixth argument which is not a number... +{ + const x = new Float64Array( 10 ); + const y = new Float64Array( 10 ); + + dchebyshev.ndarray( x.length, x, 1, 0, y, '10', 0 ); // $ExpectError + dchebyshev.ndarray( x.length, x, 1, 0, y, true, 0 ); // $ExpectError + dchebyshev.ndarray( x.length, x, 1, 0, y, false, 0 ); // $ExpectError + dchebyshev.ndarray( x.length, x, 1, 0, y, null, 0 ); // $ExpectError + dchebyshev.ndarray( x.length, x, 1, 0, y, undefined, 0 ); // $ExpectError + dchebyshev.ndarray( x.length, x, 1, 0, y, [], 0 ); // $ExpectError + dchebyshev.ndarray( x.length, x, 1, 0, y, {}, 0 ); // $ExpectError + dchebyshev.ndarray( x.length, x, 1, 0, y, ( x: number ): number => x, 0 ); // $ExpectError +} + +// The compiler throws an error if the `ndarray` method is provided a seventh argument which is not a number... +{ + const x = new Float64Array( 10 ); + const y = new Float64Array( 10 ); + + dchebyshev.ndarray( x.length, x, 1, 0, y, 1, '10' ); // $ExpectError + dchebyshev.ndarray( x.length, x, 1, 0, y, 1, true ); // $ExpectError + dchebyshev.ndarray( x.length, x, 1, 0, y, 1, false ); // $ExpectError + dchebyshev.ndarray( x.length, x, 1, 0, y, 1, null ); // $ExpectError + dchebyshev.ndarray( x.length, x, 1, 0, y, 1, undefined ); // $ExpectError + dchebyshev.ndarray( x.length, x, 1, 0, y, 1, [] ); // $ExpectError + dchebyshev.ndarray( x.length, x, 1, 0, y, 1, {} ); // $ExpectError + dchebyshev.ndarray( x.length, x, 1, 0, y, 1, ( x: number ): number => x ); // $ExpectError +} + +// The compiler throws an error if the `ndarray` method is provided an unsupported number of arguments... +{ + const x = new Float64Array( 10 ); + const y = new Float64Array( 10 ); + + dchebyshev.ndarray(); // $ExpectError + dchebyshev.ndarray( x.length ); // $ExpectError + dchebyshev.ndarray( x.length, x ); // $ExpectError + dchebyshev.ndarray( x.length, x, 1 ); // $ExpectError + dchebyshev.ndarray( x.length, x, 1, 0 ); // $ExpectError + dchebyshev.ndarray( x.length, x, 1, 0, y ); // $ExpectError + dchebyshev.ndarray( x.length, x, 1, 0, y, 1 ); // $ExpectError + dchebyshev.ndarray( x.length, x, 1, 0, y, 1, 0, 10 ); // $ExpectError +} diff --git a/lib/node_modules/@stdlib/stats/strided/distances/dchebychev/examples/c/Makefile b/lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/examples/c/Makefile similarity index 100% rename from lib/node_modules/@stdlib/stats/strided/distances/dchebychev/examples/c/Makefile rename to lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/examples/c/Makefile diff --git a/lib/node_modules/@stdlib/stats/strided/distances/dchebychev/examples/c/example.c b/lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/examples/c/example.c similarity index 72% rename from lib/node_modules/@stdlib/stats/strided/distances/dchebychev/examples/c/example.c rename to lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/examples/c/example.c index 6aca6e7819fa..31a010dae757 100644 --- a/lib/node_modules/@stdlib/stats/strided/distances/dchebychev/examples/c/example.c +++ b/lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/examples/c/example.c @@ -16,7 +16,7 @@ * limitations under the License. */ -#include "stdlib/stats/strided/distances/dchebychev.h" +#include "stdlib/stats/strided/distances/dchebyshev.h" #include int main( void ) { @@ -31,15 +31,15 @@ int main( void ) { const int strideX = 1; const int strideY = -1; - // Compute the Chebychev distance between `x` and `y`: - double d = stdlib_strided_dchebychev( N, x, strideX, y, strideY ); + // Compute the Chebyshev distance between `x` and `y`: + double d = stdlib_strided_dchebyshev( N, x, strideX, y, strideY ); // Print the result: - printf( "Chebychev distance: %lf\n", d ); + printf( "Chebyshev distance: %lf\n", d ); - // Compute the Chebychev distance between `x` and `y` with offsets: - d = stdlib_strided_dchebychev_ndarray( N, x, strideX, 0, y, strideY, N-1 ); + // Compute the Chebyshev distance between `x` and `y` with offsets: + d = stdlib_strided_dchebyshev_ndarray( N, x, strideX, 0, y, strideY, N-1 ); // Print the result: - printf( "Chebychev distance: %lf\n", d ); + printf( "Chebyshev distance: %lf\n", d ); } diff --git a/lib/node_modules/@stdlib/stats/strided/distances/dchebychev/examples/index.js b/lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/examples/index.js similarity index 89% rename from lib/node_modules/@stdlib/stats/strided/distances/dchebychev/examples/index.js rename to lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/examples/index.js index f3fe8b767c99..b9fb2e593ee3 100644 --- a/lib/node_modules/@stdlib/stats/strided/distances/dchebychev/examples/index.js +++ b/lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/examples/index.js @@ -19,7 +19,7 @@ 'use strict'; var discreteUniform = require( '@stdlib/random/array/discrete-uniform' ); -var dchebychev = require( './../lib' ); +var dchebyshev = require( './../lib' ); var opts = { 'dtype': 'float64' @@ -30,5 +30,5 @@ console.log( x ); var y = discreteUniform( x.length, 0, 10, opts ); console.log( y ); -var out = dchebychev.ndarray( x.length, x, 1, 0, y, -1, y.length-1 ); +var out = dchebyshev.ndarray( x.length, x, 1, 0, y, -1, y.length-1 ); console.log( out ); diff --git a/lib/node_modules/@stdlib/stats/strided/distances/dchebychev/include.gypi b/lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/include.gypi similarity index 100% rename from lib/node_modules/@stdlib/stats/strided/distances/dchebychev/include.gypi rename to lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/include.gypi diff --git a/lib/node_modules/@stdlib/stats/strided/distances/dchebychev/include/stdlib/stats/strided/distances/dchebychev.h b/lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/include/stdlib/stats/strided/distances/dchebyshev.h similarity index 74% rename from lib/node_modules/@stdlib/stats/strided/distances/dchebychev/include/stdlib/stats/strided/distances/dchebychev.h rename to lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/include/stdlib/stats/strided/distances/dchebyshev.h index f1ad3b3a6eff..d6f1005967a9 100644 --- a/lib/node_modules/@stdlib/stats/strided/distances/dchebychev/include/stdlib/stats/strided/distances/dchebychev.h +++ b/lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/include/stdlib/stats/strided/distances/dchebyshev.h @@ -16,8 +16,8 @@ * limitations under the License. */ -#ifndef STDLIB_STATS_STRIDED_DISTANCES_DCHEBYCHEV_H -#define STDLIB_STATS_STRIDED_DISTANCES_DCHEBYCHEV_H +#ifndef STDLIB_STATS_STRIDED_DISTANCES_DCHEBYSHEV_H +#define STDLIB_STATS_STRIDED_DISTANCES_DCHEBYSHEV_H #include "stdlib/blas/base/shared.h" @@ -29,17 +29,17 @@ extern "C" { #endif /** -* Computes the Chebychev distance between two double-precision floating-point strided arrays. +* Computes the Chebyshev distance between two double-precision floating-point strided arrays. */ -double API_SUFFIX(stdlib_strided_dchebychev)( const CBLAS_INT N, const double *X, const CBLAS_INT strideX, const double *Y, const CBLAS_INT strideY ); +double API_SUFFIX(stdlib_strided_dchebyshev)( const CBLAS_INT N, const double *X, const CBLAS_INT strideX, const double *Y, const CBLAS_INT strideY ); /** -* Computes the Chebychev distance between two double-precision floating-point strided arrays using alternative indexing semantics. +* Computes the Chebyshev distance between two double-precision floating-point strided arrays using alternative indexing semantics. */ -double API_SUFFIX(stdlib_strided_dchebychev_ndarray)( const CBLAS_INT N, const double *X, const CBLAS_INT strideX, const CBLAS_INT offsetX, const double *Y, const CBLAS_INT strideY, const CBLAS_INT offsetY ); +double API_SUFFIX(stdlib_strided_dchebyshev_ndarray)( const CBLAS_INT N, const double *X, const CBLAS_INT strideX, const CBLAS_INT offsetX, const double *Y, const CBLAS_INT strideY, const CBLAS_INT offsetY ); #ifdef __cplusplus } #endif -#endif // !STDLIB_STATS_STRIDED_DISTANCES_DCHEBYCHEV_H +#endif // !STDLIB_STATS_STRIDED_DISTANCES_DCHEBYSHEV_H diff --git a/lib/node_modules/@stdlib/stats/strided/distances/dchebychev/lib/dchebychev.js b/lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/lib/dchebyshev.js similarity index 86% rename from lib/node_modules/@stdlib/stats/strided/distances/dchebychev/lib/dchebychev.js rename to lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/lib/dchebyshev.js index ff3fa9844760..f2b549ac0e97 100644 --- a/lib/node_modules/@stdlib/stats/strided/distances/dchebychev/lib/dchebychev.js +++ b/lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/lib/dchebyshev.js @@ -27,14 +27,14 @@ var ndarray = require( './ndarray.js' ); // MAIN // /** -* Computes the Chebychev distance between two double-precision floating-point strided arrays. +* Computes the Chebyshev distance between two double-precision floating-point strided arrays. * * @param {NonNegativeInteger} N - number of indexed elements * @param {Float64Array} x - first input array * @param {integer} strideX - stride length of `x` * @param {Float64Array} y - second input array * @param {integer} strideY - stride length of `y` -* @returns {number} Chebychev distance +* @returns {number} Chebyshev distance * * @example * var Float64Array = require( '@stdlib/array/float64' ); @@ -42,10 +42,10 @@ var ndarray = require( './ndarray.js' ); * var x = new Float64Array( [ 4.0, 2.0, -3.0, 5.0, -1.0 ] ); * var y = new Float64Array( [ 2.0, 6.0, -1.0, -4.0, 8.0 ] ); * -* var z = dchebychev( x.length, x, 1, y, 1 ); +* var z = dchebyshev( x.length, x, 1, y, 1 ); * // returns 9.0 */ -function dchebychev( N, x, strideX, y, strideY ) { +function dchebyshev( N, x, strideX, y, strideY ) { var ox = stride2offset( N, strideX ); var oy = stride2offset( N, strideY ); return ndarray( N, x, strideX, ox, y, strideY, oy ); @@ -54,4 +54,4 @@ function dchebychev( N, x, strideX, y, strideY ) { // EXPORTS // -module.exports = dchebychev; +module.exports = dchebyshev; diff --git a/lib/node_modules/@stdlib/stats/strided/distances/dchebychev/lib/dchebychev.native.js b/lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/lib/dchebyshev.native.js similarity index 84% rename from lib/node_modules/@stdlib/stats/strided/distances/dchebychev/lib/dchebychev.native.js rename to lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/lib/dchebyshev.native.js index 2855eacf7dbf..215cef7b1139 100644 --- a/lib/node_modules/@stdlib/stats/strided/distances/dchebychev/lib/dchebychev.native.js +++ b/lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/lib/dchebyshev.native.js @@ -26,14 +26,14 @@ var addon = require( './../src/addon.node' ); // MAIN // /** -* Computes the Chebychev distance between two double-precision floating-point strided arrays. +* Computes the Chebyshev distance between two double-precision floating-point strided arrays. * * @param {NonNegativeInteger} N - number of indexed elements * @param {Float64Array} x - first input array * @param {integer} strideX - stride length of `x` * @param {Float64Array} y - second input array * @param {integer} strideY - stride length of `y` -* @returns {number} Chebychev distance +* @returns {number} Chebyshev distance * * @example * var Float64Array = require( '@stdlib/array/float64' ); @@ -41,14 +41,14 @@ var addon = require( './../src/addon.node' ); * var x = new Float64Array( [ 4.0, 2.0, -3.0, 5.0, -1.0 ] ); * var y = new Float64Array( [ 2.0, 6.0, -1.0, -4.0, 8.0 ] ); * -* var z = dchebychev( x.length, x, 1, y, 1 ); +* var z = dchebyshev( x.length, x, 1, y, 1 ); * // returns 9.0 */ -function dchebychev( N, x, strideX, y, strideY ) { +function dchebyshev( N, x, strideX, y, strideY ) { return addon( N, x, strideX, y, strideY ); } // EXPORTS // -module.exports = dchebychev; +module.exports = dchebyshev; diff --git a/lib/node_modules/@stdlib/stats/strided/distances/dchebychev/lib/index.js b/lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/lib/index.js similarity index 73% rename from lib/node_modules/@stdlib/stats/strided/distances/dchebychev/lib/index.js rename to lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/lib/index.js index 76a1bd5c0e76..b94655ab24e2 100644 --- a/lib/node_modules/@stdlib/stats/strided/distances/dchebychev/lib/index.js +++ b/lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/lib/index.js @@ -19,28 +19,28 @@ 'use strict'; /** -* Compute the Chebychev distance between two double-precision floating-point strided arrays. +* Compute the Chebyshev distance between two double-precision floating-point strided arrays. * -* @module @stdlib/stats/strided/distances/dchebychev +* @module @stdlib/stats/strided/distances/dchebyshev * * @example * var Float64Array = require( '@stdlib/array/float64' ); -* var dchebychev = require( '@stdlib/stats/strided/distances/dchebychev' ); +* var dchebyshev = require( '@stdlib/stats/strided/distances/dchebyshev' ); * * var x = new Float64Array( [ 4.0, 2.0, -3.0, 5.0, -1.0 ] ); * var y = new Float64Array( [ 2.0, 6.0, -1.0, -4.0, 8.0 ] ); * -* var z = dchebychev( x.length, x, 1, y, 1 ); +* var z = dchebyshev( x.length, x, 1, y, 1 ); * // returns 9.0 * * @example * var Float64Array = require( '@stdlib/array/float64' ); -* var dchebychev = require( '@stdlib/stats/strided/distances/dchebychev' ); +* var dchebyshev = require( '@stdlib/stats/strided/distances/dchebyshev' ); * * var x = new Float64Array( [ 4.0, 2.0, -3.0, 5.0, -1.0 ] ); * var y = new Float64Array( [ 2.0, 6.0, -1.0, -4.0, 8.0 ] ); * -* var z = dchebychev.ndarray( x.length, x, 1, 0, y, 1, 0 ); +* var z = dchebyshev.ndarray( x.length, x, 1, 0, y, 1, 0 ); * // returns 9.0 */ @@ -54,17 +54,17 @@ var main = require( './main.js' ); // MAIN // -var dchebychev; +var dchebyshev; var tmp = tryRequire( join( __dirname, './native.js' ) ); if ( isError( tmp ) ) { - dchebychev = main; + dchebyshev = main; } else { - dchebychev = tmp; + dchebyshev = tmp; } // EXPORTS // -module.exports = dchebychev; +module.exports = dchebyshev; -// exports: { "ndarray": "dchebychev.ndarray" } +// exports: { "ndarray": "dchebyshev.ndarray" } diff --git a/lib/node_modules/@stdlib/stats/strided/distances/dchebychev/lib/main.js b/lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/lib/main.js similarity index 86% rename from lib/node_modules/@stdlib/stats/strided/distances/dchebychev/lib/main.js rename to lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/lib/main.js index 531f2ad91dc6..e4ecfd263fca 100644 --- a/lib/node_modules/@stdlib/stats/strided/distances/dchebychev/lib/main.js +++ b/lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/lib/main.js @@ -21,15 +21,15 @@ // MODULES // var setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' ); -var dchebychev = require( './dchebychev.js' ); +var dchebyshev = require( './dchebyshev.js' ); var ndarray = require( './ndarray.js' ); // MAIN // -setReadOnly( dchebychev, 'ndarray', ndarray ); +setReadOnly( dchebyshev, 'ndarray', ndarray ); // EXPORTS // -module.exports = dchebychev; +module.exports = dchebyshev; diff --git a/lib/node_modules/@stdlib/stats/strided/distances/dchebychev/lib/native.js b/lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/lib/native.js similarity index 86% rename from lib/node_modules/@stdlib/stats/strided/distances/dchebychev/lib/native.js rename to lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/lib/native.js index 0d2aab399fa7..5bd310a65a4e 100644 --- a/lib/node_modules/@stdlib/stats/strided/distances/dchebychev/lib/native.js +++ b/lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/lib/native.js @@ -21,15 +21,15 @@ // MODULES // var setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' ); -var dchebychev = require( './dchebychev.native.js' ); +var dchebyshev = require( './dchebyshev.native.js' ); var ndarray = require( './ndarray.native.js' ); // MAIN // -setReadOnly( dchebychev, 'ndarray', ndarray ); +setReadOnly( dchebyshev, 'ndarray', ndarray ); // EXPORTS // -module.exports = dchebychev; +module.exports = dchebyshev; diff --git a/lib/node_modules/@stdlib/stats/strided/distances/dchebychev/lib/ndarray.js b/lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/lib/ndarray.js similarity index 87% rename from lib/node_modules/@stdlib/stats/strided/distances/dchebychev/lib/ndarray.js rename to lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/lib/ndarray.js index 2c4ad39a5e5e..a30ea75e2bc6 100644 --- a/lib/node_modules/@stdlib/stats/strided/distances/dchebychev/lib/ndarray.js +++ b/lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/lib/ndarray.js @@ -26,7 +26,7 @@ var abs = require( '@stdlib/math/base/special/abs' ); // MAIN // /** -* Computes the Chebychev distance between two double-precision floating-point strided arrays using alternative indexing semantics. +* Computes the Chebyshev distance between two double-precision floating-point strided arrays using alternative indexing semantics. * * @param {NonNegativeInteger} N - number of indexed elements * @param {Float64Array} x - first input array @@ -35,7 +35,7 @@ var abs = require( '@stdlib/math/base/special/abs' ); * @param {Float64Array} y - second input array * @param {integer} strideY - stride length of `y` * @param {NonNegativeInteger} offsetY - starting index for `y` -* @returns {number} Chebychev distance +* @returns {number} Chebyshev distance * * @example * var Float64Array = require( '@stdlib/array/float64' ); @@ -43,10 +43,10 @@ var abs = require( '@stdlib/math/base/special/abs' ); * var x = new Float64Array( [ 4.0, 2.0, -3.0, 5.0, -1.0 ] ); * var y = new Float64Array( [ 2.0, 6.0, -1.0, -4.0, 8.0 ] ); * -* var z = dchebychev( x.length, x, 1, 0, y, 1, 0 ); +* var z = dchebyshev( x.length, x, 1, 0, y, 1, 0 ); * // returns 9.0 */ -function dchebychev( N, x, strideX, offsetX, y, strideY, offsetY ) { +function dchebyshev( N, x, strideX, offsetX, y, strideY, offsetY ) { var max; var ox; var oy; @@ -76,4 +76,4 @@ function dchebychev( N, x, strideX, offsetX, y, strideY, offsetY ) { // EXPORTS // -module.exports = dchebychev; +module.exports = dchebyshev; diff --git a/lib/node_modules/@stdlib/stats/strided/distances/dchebychev/lib/ndarray.native.js b/lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/lib/ndarray.native.js similarity index 85% rename from lib/node_modules/@stdlib/stats/strided/distances/dchebychev/lib/ndarray.native.js rename to lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/lib/ndarray.native.js index d83492e4ce93..ac5488485fc9 100644 --- a/lib/node_modules/@stdlib/stats/strided/distances/dchebychev/lib/ndarray.native.js +++ b/lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/lib/ndarray.native.js @@ -26,7 +26,7 @@ var addon = require( './../src/addon.node' ); // MAIN // /** -* Computes the Chebychev distance between two double-precision floating-point strided arrays using alternative indexing semantics. +* Computes the Chebyshev distance between two double-precision floating-point strided arrays using alternative indexing semantics. * * @param {NonNegativeInteger} N - number of indexed elements * @param {Float64Array} x - first input array @@ -35,7 +35,7 @@ var addon = require( './../src/addon.node' ); * @param {Float64Array} y - second input array * @param {integer} strideY - stride length of `y` * @param {NonNegativeInteger} offsetY - starting index for `y` -* @returns {number} Chebychev distance +* @returns {number} Chebyshev distance * * @example * var Float64Array = require( '@stdlib/array/float64' ); @@ -43,14 +43,14 @@ var addon = require( './../src/addon.node' ); * var x = new Float64Array( [ 4.0, 2.0, -3.0, 5.0, -1.0 ] ); * var y = new Float64Array( [ 2.0, 6.0, -1.0, -4.0, 8.0 ] ); * -* var z = dchebychev( x.length, x, 1, 0, y, 1, 0 ); +* var z = dchebyshev( x.length, x, 1, 0, y, 1, 0 ); * // returns 9.0 */ -function dchebychev( N, x, strideX, offsetX, y, strideY, offsetY ) { +function dchebyshev( N, x, strideX, offsetX, y, strideY, offsetY ) { return addon.ndarray( N, x, strideX, offsetX, y, strideY, offsetY ); } // EXPORTS // -module.exports = dchebychev; +module.exports = dchebyshev; diff --git a/lib/node_modules/@stdlib/stats/strided/distances/dchebychev/manifest.json b/lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/manifest.json similarity index 100% rename from lib/node_modules/@stdlib/stats/strided/distances/dchebychev/manifest.json rename to lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/manifest.json diff --git a/lib/node_modules/@stdlib/stats/strided/distances/dchebychev/package.json b/lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/package.json similarity index 91% rename from lib/node_modules/@stdlib/stats/strided/distances/dchebychev/package.json rename to lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/package.json index 6f7f562f91d7..0371e4aca53b 100644 --- a/lib/node_modules/@stdlib/stats/strided/distances/dchebychev/package.json +++ b/lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/package.json @@ -1,7 +1,7 @@ { - "name": "@stdlib/stats/strided/distances/dchebychev", + "name": "@stdlib/stats/strided/distances/dchebyshev", "version": "0.0.0", - "description": "Compute the Chebychev distance between two double-precision floating-point strided arrays.", + "description": "Compute the Chebyshev distance between two double-precision floating-point strided arrays.", "license": "Apache-2.0", "author": { "name": "The Stdlib Authors", @@ -59,7 +59,7 @@ "stats", "mathematics", "math", - "chebychev", + "chebyshev", "distance", "metric", "strided", diff --git a/lib/node_modules/@stdlib/stats/strided/distances/dchebychev/src/Makefile b/lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/src/Makefile similarity index 100% rename from lib/node_modules/@stdlib/stats/strided/distances/dchebychev/src/Makefile rename to lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/src/Makefile diff --git a/lib/node_modules/@stdlib/stats/strided/distances/dchebychev/src/addon.c b/lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/src/addon.c similarity index 93% rename from lib/node_modules/@stdlib/stats/strided/distances/dchebychev/src/addon.c rename to lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/src/addon.c index 1da8896de1c7..442ee03a52f7 100644 --- a/lib/node_modules/@stdlib/stats/strided/distances/dchebychev/src/addon.c +++ b/lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/src/addon.c @@ -16,7 +16,7 @@ * limitations under the License. */ -#include "stdlib/stats/strided/distances/dchebychev.h" +#include "stdlib/stats/strided/distances/dchebyshev.h" #include "stdlib/blas/base/shared.h" #include "stdlib/napi/export.h" #include "stdlib/napi/argv.h" @@ -39,7 +39,7 @@ static napi_value addon( napi_env env, napi_callback_info info ) { STDLIB_NAPI_ARGV_INT64( env, strideY, argv, 4 ); STDLIB_NAPI_ARGV_STRIDED_FLOAT64ARRAY( env, X, N, strideX, argv, 1 ); STDLIB_NAPI_ARGV_STRIDED_FLOAT64ARRAY( env, Y, N, strideY, argv, 3 ); - STDLIB_NAPI_CREATE_DOUBLE( env, API_SUFFIX(stdlib_strided_dchebychev)( N, X, strideX, Y, strideY ), v ); + STDLIB_NAPI_CREATE_DOUBLE( env, API_SUFFIX(stdlib_strided_dchebyshev)( N, X, strideX, Y, strideY ), v ); return v; } @@ -59,7 +59,7 @@ static napi_value addon_method( napi_env env, napi_callback_info info ) { STDLIB_NAPI_ARGV_INT64( env, offsetY, argv, 6 ); STDLIB_NAPI_ARGV_STRIDED_FLOAT64ARRAY( env, X, N, strideX, argv, 1 ); STDLIB_NAPI_ARGV_STRIDED_FLOAT64ARRAY( env, Y, N, strideY, argv, 4 ); - STDLIB_NAPI_CREATE_DOUBLE( env, API_SUFFIX(stdlib_strided_dchebychev_ndarray)( N, X, strideX, offsetX, Y, strideY, offsetY ), v ); + STDLIB_NAPI_CREATE_DOUBLE( env, API_SUFFIX(stdlib_strided_dchebyshev_ndarray)( N, X, strideX, offsetX, Y, strideY, offsetY ), v ); return v; } diff --git a/lib/node_modules/@stdlib/stats/strided/distances/dchebychev/src/main.c b/lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/src/main.c similarity index 82% rename from lib/node_modules/@stdlib/stats/strided/distances/dchebychev/src/main.c rename to lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/src/main.c index 723315a34149..d50758d79dab 100644 --- a/lib/node_modules/@stdlib/stats/strided/distances/dchebychev/src/main.c +++ b/lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/src/main.c @@ -16,29 +16,29 @@ * limitations under the License. */ -#include "stdlib/stats/strided/distances/dchebychev.h" +#include "stdlib/stats/strided/distances/dchebyshev.h" #include "stdlib/math/base/special/abs.h" #include "stdlib/blas/base/shared.h" #include "stdlib/strided/base/stride2offset.h" /** -* Computes the Chebychev distance between two double-precision floating-point strided arrays. +* Computes the Chebyshev distance between two double-precision floating-point strided arrays. * * @param N number of indexed elements * @param X first array * @param strideX X stride length * @param Y second array * @param strideY Y stride length -* @return Chebychev distance +* @return Chebyshev distance */ -double API_SUFFIX(stdlib_strided_dchebychev)( const CBLAS_INT N, const double *X, const CBLAS_INT strideX, const double *Y, const CBLAS_INT strideY ) { +double API_SUFFIX(stdlib_strided_dchebyshev)( const CBLAS_INT N, const double *X, const CBLAS_INT strideX, const double *Y, const CBLAS_INT strideY ) { CBLAS_INT ox = stdlib_strided_stride2offset( N, strideX ); CBLAS_INT oy = stdlib_strided_stride2offset( N, strideY ); - return API_SUFFIX(stdlib_strided_dchebychev_ndarray)( N, X, strideX, ox, Y, strideY, oy ); + return API_SUFFIX(stdlib_strided_dchebyshev_ndarray)( N, X, strideX, ox, Y, strideY, oy ); } /** -* Computes the Chebychev distance between two double-precision floating-point strided arrays using alternative indexing semantics. +* Computes the Chebyshev distance between two double-precision floating-point strided arrays using alternative indexing semantics. * * @param N number of indexed elements * @param X first array @@ -47,9 +47,9 @@ double API_SUFFIX(stdlib_strided_dchebychev)( const CBLAS_INT N, const double *X * @param Y second array * @param strideY Y stride length * @param offsetY starting index for Y -* @return Chebychev distance +* @return Chebyshev distance */ -double API_SUFFIX(stdlib_strided_dchebychev_ndarray)( const CBLAS_INT N, const double *X, const CBLAS_INT strideX, const CBLAS_INT offsetX, const double *Y, const CBLAS_INT strideY, const CBLAS_INT offsetY ) { +double API_SUFFIX(stdlib_strided_dchebyshev_ndarray)( const CBLAS_INT N, const double *X, const CBLAS_INT strideX, const CBLAS_INT offsetX, const double *Y, const CBLAS_INT strideY, const CBLAS_INT offsetY ) { CBLAS_INT ox; CBLAS_INT oy; CBLAS_INT i; diff --git a/lib/node_modules/@stdlib/stats/strided/distances/dchebychev/test/test.dchebychev.js b/lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/test/test.dchebyshev.js similarity index 87% rename from lib/node_modules/@stdlib/stats/strided/distances/dchebychev/test/test.dchebychev.js rename to lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/test/test.dchebyshev.js index 4fa9aa167fad..81668970c0bf 100644 --- a/lib/node_modules/@stdlib/stats/strided/distances/dchebychev/test/test.dchebychev.js +++ b/lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/test/test.dchebyshev.js @@ -23,23 +23,23 @@ var tape = require( 'tape' ); var Float64Array = require( '@stdlib/array/float64' ); var isAlmostSameValue = require( '@stdlib/assert/is-almost-same-value' ); -var dchebychev = require( './../lib/dchebychev.js' ); +var dchebyshev = require( './../lib/dchebyshev.js' ); // TESTS // tape( 'main export is a function', function test( t ) { t.ok( true, __filename ); - t.strictEqual( typeof dchebychev, 'function', 'main export is a function' ); + t.strictEqual( typeof dchebyshev, 'function', 'main export is a function' ); t.end(); }); tape( 'the function has an arity of 5', function test( t ) { - t.strictEqual( dchebychev.length, 5, 'returns expected value' ); + t.strictEqual( dchebyshev.length, 5, 'returns expected value' ); t.end(); }); -tape( 'the function calculates the Chebychev distance between two strided arrays', function test( t ) { +tape( 'the function calculates the Chebyshev distance between two strided arrays', function test( t ) { var d; var x; var y; @@ -48,14 +48,14 @@ tape( 'the function calculates the Chebychev distance between two strided arrays y = new Float64Array( [ 2.0, 6.0, -1.0, -4.0, 8.0, 8.0, 2.0, -3.0 ] ); // Test against textbook formula: max(2,4,2,9,9,6,7,9) - d = dchebychev( x.length, x, 1, y, 1 ); + d = dchebyshev( x.length, x, 1, y, 1 ); t.strictEqual( isAlmostSameValue( d, 9.0, 0 ), true, 'returns expected value' ); x = new Float64Array( [ 3.0, -4.0, 1.0 ] ); y = new Float64Array( [ 1.0, -2.0, 3.0 ] ); // Test against textbook formula: max(2,2,2) - d = dchebychev( x.length, x, 1, y, 1 ); + d = dchebyshev( x.length, x, 1, y, 1 ); t.strictEqual( isAlmostSameValue( d, 2.0, 0 ), true, 'returns expected value' ); t.end(); @@ -69,10 +69,10 @@ tape( 'if provided an `N` parameter less than or equal to `0`, the function retu x = new Float64Array( [ 3.0, -4.0, 1.0 ] ); y = new Float64Array( [ 1.0, -2.0, 3.0 ] ); - d = dchebychev( 0, x, 1, y, 1 ); + d = dchebyshev( 0, x, 1, y, 1 ); t.strictEqual( isAlmostSameValue( d, NaN, 0 ), true, 'returns expected value' ); - d = dchebychev( -4, x, 1, y, 1 ); + d = dchebyshev( -4, x, 1, y, 1 ); t.strictEqual( isAlmostSameValue( d, NaN, 0 ), true, 'returns expected value' ); t.end(); }); @@ -99,7 +99,7 @@ tape( 'the function supports an `x` stride', function test( t ) { ]); // Test against textbook formula: max(6,7,9) - d = dchebychev( 3, x, 2, y, 1 ); + d = dchebyshev( 3, x, 2, y, 1 ); t.strictEqual( isAlmostSameValue( d, 9.0, 0 ), true, 'returns expected value' ); t.end(); }); @@ -126,7 +126,7 @@ tape( 'the function supports a `y` stride', function test( t ) { ]); // Test against textbook formula: max(6,0,1) - d = dchebychev( 3, x, 1, y, 2 ); + d = dchebyshev( 3, x, 1, y, 2 ); t.strictEqual( isAlmostSameValue( d, 6.0, 0 ), true, 'returns expected value' ); t.end(); }); @@ -152,7 +152,7 @@ tape( 'the function supports negative strides', function test( t ) { ]); // Test against textbook formula: max(3,4,5) - d = dchebychev( 3, x, -2, y, -1 ); + d = dchebyshev( 3, x, -2, y, -1 ); t.strictEqual( isAlmostSameValue( d, 5.0, 0 ), true, 'returns expected value' ); t.end(); }); @@ -178,7 +178,7 @@ tape( 'the function supports complex access patterns', function test( t ) { ]); // Test against textbook formula: max(7,4,1) - d = dchebychev( 3, x, 2, y, -1 ); + d = dchebyshev( 3, x, 2, y, -1 ); t.strictEqual( isAlmostSameValue( d, 7.0, 0 ), true, 'returns expected value' ); t.end(); }); @@ -211,7 +211,7 @@ tape( 'the function supports view offsets', function test( t ) { y1 = new Float64Array( y0.buffer, y0.BYTES_PER_ELEMENT*3 ); // Test against textbook formula: max(7,6,5) - d = dchebychev( 3, x1, 2, y1, 1 ); + d = dchebyshev( 3, x1, 2, y1, 1 ); t.strictEqual( isAlmostSameValue( d, 7.0, 0 ), true, 'returns expected value' ); t.end(); }); diff --git a/lib/node_modules/@stdlib/stats/strided/distances/dchebychev/test/test.dchebychev.native.js b/lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/test/test.dchebyshev.native.js similarity index 87% rename from lib/node_modules/@stdlib/stats/strided/distances/dchebychev/test/test.dchebychev.native.js rename to lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/test/test.dchebyshev.native.js index a44a5ea21f04..ca4f1af2ec5d 100644 --- a/lib/node_modules/@stdlib/stats/strided/distances/dchebychev/test/test.dchebychev.native.js +++ b/lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/test/test.dchebyshev.native.js @@ -29,9 +29,9 @@ var tryRequire = require( '@stdlib/utils/try-require' ); // VARIABLES // -var dchebychev = tryRequire( resolve( __dirname, './../lib/dchebychev.native.js' ) ); +var dchebyshev = tryRequire( resolve( __dirname, './../lib/dchebyshev.native.js' ) ); var opts = { - 'skip': ( dchebychev instanceof Error ) + 'skip': ( dchebyshev instanceof Error ) }; @@ -39,16 +39,16 @@ var opts = { tape( 'main export is a function', opts, function test( t ) { t.ok( true, __filename ); - t.strictEqual( typeof dchebychev, 'function', 'main export is a function' ); + t.strictEqual( typeof dchebyshev, 'function', 'main export is a function' ); t.end(); }); tape( 'the function has an arity of 5', opts, function test( t ) { - t.strictEqual( dchebychev.length, 5, 'returns expected value' ); + t.strictEqual( dchebyshev.length, 5, 'returns expected value' ); t.end(); }); -tape( 'the function calculates the Chebychev distance between two strided arrays', opts, function test( t ) { +tape( 'the function calculates the Chebyshev distance between two strided arrays', opts, function test( t ) { var d; var x; var y; @@ -57,14 +57,14 @@ tape( 'the function calculates the Chebychev distance between two strided arrays y = new Float64Array( [ 2.0, 6.0, -1.0, -4.0, 8.0, 8.0, 2.0, -3.0 ] ); // Test against textbook formula: max(2,4,2,9,9,6,7,9) - d = dchebychev( x.length, x, 1, y, 1 ); + d = dchebyshev( x.length, x, 1, y, 1 ); t.strictEqual( isAlmostSameValue( d, 9.0, 0 ), true, 'returns expected value' ); x = new Float64Array( [ 3.0, -4.0, 1.0 ] ); y = new Float64Array( [ 1.0, -2.0, 3.0 ] ); // Test against textbook formula: max(2,2,2) - d = dchebychev( x.length, x, 1, y, 1 ); + d = dchebyshev( x.length, x, 1, y, 1 ); t.strictEqual( isAlmostSameValue( d, 2.0, 0 ), true, 'returns expected value' ); t.end(); @@ -78,10 +78,10 @@ tape( 'if provided an `N` parameter less than or equal to `0`, the function retu x = new Float64Array( [ 3.0, -4.0, 1.0 ] ); y = new Float64Array( [ 1.0, -2.0, 3.0 ] ); - d = dchebychev( 0, x, 1, y, 1 ); + d = dchebyshev( 0, x, 1, y, 1 ); t.strictEqual( isAlmostSameValue( d, NaN, 0 ), true, 'returns expected value' ); - d = dchebychev( -4, x, 1, y, 1 ); + d = dchebyshev( -4, x, 1, y, 1 ); t.strictEqual( isAlmostSameValue( d, NaN, 0 ), true, 'returns expected value' ); t.end(); }); @@ -108,7 +108,7 @@ tape( 'the function supports an `x` stride', opts, function test( t ) { ]); // Test against textbook formula: max(6,7,9) - d = dchebychev( 3, x, 2, y, 1 ); + d = dchebyshev( 3, x, 2, y, 1 ); t.strictEqual( isAlmostSameValue( d, 9.0, 0 ), true, 'returns expected value' ); t.end(); }); @@ -135,7 +135,7 @@ tape( 'the function supports a `y` stride', opts, function test( t ) { ]); // Test against textbook formula: max(6,0,1) - d = dchebychev( 3, x, 1, y, 2 ); + d = dchebyshev( 3, x, 1, y, 2 ); t.strictEqual( isAlmostSameValue( d, 6.0, 0 ), true, 'returns expected value' ); t.end(); }); @@ -161,7 +161,7 @@ tape( 'the function supports negative strides', opts, function test( t ) { ]); // Test against textbook formula: max(3,4,5) - d = dchebychev( 3, x, -2, y, -1 ); + d = dchebyshev( 3, x, -2, y, -1 ); t.strictEqual( isAlmostSameValue( d, 5.0, 0 ), true, 'returns expected value' ); t.end(); }); @@ -187,7 +187,7 @@ tape( 'the function supports complex access patterns', opts, function test( t ) ]); // Test against textbook formula: max(7,4,1) - d = dchebychev( 3, x, 2, y, -1 ); + d = dchebyshev( 3, x, 2, y, -1 ); t.strictEqual( isAlmostSameValue( d, 7.0, 0 ), true, 'returns expected value' ); t.end(); }); @@ -220,7 +220,7 @@ tape( 'the function supports view offsets', opts, function test( t ) { y1 = new Float64Array( y0.buffer, y0.BYTES_PER_ELEMENT*3 ); // Test against textbook formula: max(7,6,5) - d = dchebychev( 3, x1, 2, y1, 1 ); + d = dchebyshev( 3, x1, 2, y1, 1 ); t.strictEqual( isAlmostSameValue( d, 7.0, 0 ), true, 'returns expected value' ); t.end(); }); diff --git a/lib/node_modules/@stdlib/stats/strided/distances/dchebychev/test/test.js b/lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/test/test.js similarity index 78% rename from lib/node_modules/@stdlib/stats/strided/distances/dchebychev/test/test.js rename to lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/test/test.js index 9ba499afa079..f1774eb1dc58 100644 --- a/lib/node_modules/@stdlib/stats/strided/distances/dchebychev/test/test.js +++ b/lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/test/test.js @@ -23,7 +23,7 @@ var tape = require( 'tape' ); var proxyquire = require( 'proxyquire' ); var IS_BROWSER = require( '@stdlib/assert/is-browser' ); -var dchebychev = require( './../lib' ); +var dchebyshev = require( './../lib' ); // VARIABLES // @@ -37,21 +37,21 @@ var opts = { tape( 'main export is a function', function test( t ) { t.ok( true, __filename ); - t.strictEqual( typeof dchebychev, 'function', 'main export is a function' ); + t.strictEqual( typeof dchebyshev, 'function', 'main export is a function' ); t.end(); }); tape( 'attached to the main export is a method providing an ndarray interface', function test( t ) { - t.strictEqual( typeof dchebychev.ndarray, 'function', 'method is a function' ); + t.strictEqual( typeof dchebyshev.ndarray, 'function', 'method is a function' ); t.end(); }); tape( 'if a native implementation is available, the main export is the native implementation', opts, function test( t ) { - var dchebychev = proxyquire( './../lib', { + var dchebyshev = proxyquire( './../lib', { '@stdlib/utils/try-require': tryRequire }); - t.strictEqual( dchebychev, mock, 'returns expected value' ); + t.strictEqual( dchebyshev, mock, 'returns expected value' ); t.end(); function tryRequire() { @@ -64,16 +64,16 @@ tape( 'if a native implementation is available, the main export is the native im }); tape( 'if a native implementation is not available, the main export is a JavaScript implementation', opts, function test( t ) { - var dchebychev; + var dchebyshev; var main; - main = require( './../lib/dchebychev.js' ); + main = require( './../lib/dchebyshev.js' ); - dchebychev = proxyquire( './../lib', { + dchebyshev = proxyquire( './../lib', { '@stdlib/utils/try-require': tryRequire }); - t.strictEqual( dchebychev, main, 'returns expected value' ); + t.strictEqual( dchebyshev, main, 'returns expected value' ); t.end(); function tryRequire() { diff --git a/lib/node_modules/@stdlib/stats/strided/distances/dchebychev/test/test.ndarray.js b/lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/test/test.ndarray.js similarity index 86% rename from lib/node_modules/@stdlib/stats/strided/distances/dchebychev/test/test.ndarray.js rename to lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/test/test.ndarray.js index 20ad4fc77844..3bd819777218 100644 --- a/lib/node_modules/@stdlib/stats/strided/distances/dchebychev/test/test.ndarray.js +++ b/lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/test/test.ndarray.js @@ -23,23 +23,23 @@ var tape = require( 'tape' ); var Float64Array = require( '@stdlib/array/float64' ); var isAlmostSameValue = require( '@stdlib/assert/is-almost-same-value' ); -var dchebychev = require( './../lib/ndarray.js' ); +var dchebyshev = require( './../lib/ndarray.js' ); // TESTS // tape( 'main export is a function', function test( t ) { t.ok( true, __filename ); - t.strictEqual( typeof dchebychev, 'function', 'main export is a function' ); + t.strictEqual( typeof dchebyshev, 'function', 'main export is a function' ); t.end(); }); tape( 'the function has an arity of 7', function test( t ) { - t.strictEqual( dchebychev.length, 7, 'returns expected value' ); + t.strictEqual( dchebyshev.length, 7, 'returns expected value' ); t.end(); }); -tape( 'the function calculates the Chebychev distance between two strided arrays', function test( t ) { +tape( 'the function calculates the Chebyshev distance between two strided arrays', function test( t ) { var d; var x; var y; @@ -48,14 +48,14 @@ tape( 'the function calculates the Chebychev distance between two strided arrays y = new Float64Array( [ 2.0, 6.0, -1.0, -4.0, 8.0, 8.0, 2.0, -3.0 ] ); // Test against textbook formula: max(2,4,2,9,9,6,7,9) - d = dchebychev( x.length, x, 1, 0, y, 1, 0 ); + d = dchebyshev( x.length, x, 1, 0, y, 1, 0 ); t.strictEqual( isAlmostSameValue( d, 9.0, 0 ), true, 'returns expected value' ); x = new Float64Array( [ 3.0, -4.0, 1.0 ] ); y = new Float64Array( [ 1.0, -2.0, 3.0 ] ); // Test against textbook formula: max(2,2,2) - d = dchebychev( x.length, x, 1, 0, y, 1, 0 ); + d = dchebyshev( x.length, x, 1, 0, y, 1, 0 ); t.strictEqual( isAlmostSameValue( d, 2.0, 0 ), true, 'returns expected value' ); t.end(); @@ -69,10 +69,10 @@ tape( 'if provided an `N` parameter less than or equal to `0`, the function retu x = new Float64Array( [ 3.0, -4.0, 1.0 ] ); y = new Float64Array( [ 1.0, -2.0, 3.0 ] ); - d = dchebychev( 0, x, 1, 0, y, 1, 0 ); + d = dchebyshev( 0, x, 1, 0, y, 1, 0 ); t.strictEqual( isAlmostSameValue( d, NaN, 0 ), true, 'returns expected value' ); - d = dchebychev( -4, x, 1, 0, y, 1, 0 ); + d = dchebyshev( -4, x, 1, 0, y, 1, 0 ); t.strictEqual( isAlmostSameValue( d, NaN, 0 ), true, 'returns expected value' ); t.end(); }); @@ -99,7 +99,7 @@ tape( 'the function supports an `x` stride', function test( t ) { ]); // Test against textbook formula: max(6,7,9) - d = dchebychev( 3, x, 2, 0, y, 1, 0 ); + d = dchebyshev( 3, x, 2, 0, y, 1, 0 ); t.strictEqual( isAlmostSameValue( d, 9.0, 0 ), true, 'returns expected value' ); t.end(); }); @@ -127,7 +127,7 @@ tape( 'the function supports an `x` offset', function test( t ) { ]); // Test against textbook formula: max(4,3,2) - d = dchebychev( 3, x, 2, 1, y, 1, 0 ); + d = dchebyshev( 3, x, 2, 1, y, 1, 0 ); t.strictEqual( isAlmostSameValue( d, 4.0, 0 ), true, 'returns expected value' + d ); t.end(); }); @@ -154,7 +154,7 @@ tape( 'the function supports a `y` stride', function test( t ) { ]); // Test against textbook formula: max(6,0,1) - d = dchebychev( 3, x, 1, 0, y, 2, 0 ); + d = dchebyshev( 3, x, 1, 0, y, 2, 0 ); t.strictEqual( isAlmostSameValue( d, 6.0, 0 ), true, 'returns expected value' ); t.end(); }); @@ -182,7 +182,7 @@ tape( 'the function supports a `y` offset', function test( t ) { ]); // Test against textbook formula: max(8,7,6) - d = dchebychev( 3, x, 2, 0, y, 1, 3 ); + d = dchebyshev( 3, x, 2, 0, y, 1, 3 ); t.strictEqual( isAlmostSameValue( d, 8.0, 0 ), true, 'returns expected value' ); t.end(); }); @@ -208,7 +208,7 @@ tape( 'the function supports negative strides', function test( t ) { ]); // Test against textbook formula: max(3,4,5) - d = dchebychev( 3, x, -2, x.length-1, y, -1, 2 ); + d = dchebyshev( 3, x, -2, x.length-1, y, -1, 2 ); t.strictEqual( isAlmostSameValue( d, 5.0, 0 ), true, 'returns expected value' ); t.end(); }); @@ -234,7 +234,7 @@ tape( 'the function supports complex access patterns', function test( t ) { ]); // Test against textbook formula: max(8,5,2) - d = dchebychev( 3, x, 2, 0, y, -1, y.length-2 ); + d = dchebyshev( 3, x, 2, 0, y, -1, y.length-2 ); t.strictEqual( isAlmostSameValue( d, 8.0, 0 ), true, 'returns expected value' ); t.end(); }); diff --git a/lib/node_modules/@stdlib/stats/strided/distances/dchebychev/test/test.ndarray.native.js b/lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/test/test.ndarray.native.js similarity index 86% rename from lib/node_modules/@stdlib/stats/strided/distances/dchebychev/test/test.ndarray.native.js rename to lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/test/test.ndarray.native.js index 56a0fd9f7739..c41ba00d91f5 100644 --- a/lib/node_modules/@stdlib/stats/strided/distances/dchebychev/test/test.ndarray.native.js +++ b/lib/node_modules/@stdlib/stats/strided/distances/dchebyshev/test/test.ndarray.native.js @@ -29,9 +29,9 @@ var tryRequire = require( '@stdlib/utils/try-require' ); // VARIABLES // -var dchebychev = tryRequire( resolve( __dirname, './../lib/ndarray.native.js' ) ); +var dchebyshev = tryRequire( resolve( __dirname, './../lib/ndarray.native.js' ) ); var opts = { - 'skip': ( dchebychev instanceof Error ) + 'skip': ( dchebyshev instanceof Error ) }; @@ -39,16 +39,16 @@ var opts = { tape( 'main export is a function', opts, function test( t ) { t.ok( true, __filename ); - t.strictEqual( typeof dchebychev, 'function', 'main export is a function' ); + t.strictEqual( typeof dchebyshev, 'function', 'main export is a function' ); t.end(); }); tape( 'the function has an arity of 7', opts, function test( t ) { - t.strictEqual( dchebychev.length, 7, 'returns expected value' ); + t.strictEqual( dchebyshev.length, 7, 'returns expected value' ); t.end(); }); -tape( 'the function calculates the Chebychev distance between two strided arrays', opts, function test( t ) { +tape( 'the function calculates the Chebyshev distance between two strided arrays', opts, function test( t ) { var d; var x; var y; @@ -57,14 +57,14 @@ tape( 'the function calculates the Chebychev distance between two strided arrays y = new Float64Array( [ 2.0, 6.0, -1.0, -4.0, 8.0, 8.0, 2.0, -3.0 ] ); // Test against textbook formula: max(2,4,2,9,9,6,7,9) - d = dchebychev( x.length, x, 1, 0, y, 1, 0 ); + d = dchebyshev( x.length, x, 1, 0, y, 1, 0 ); t.strictEqual( isAlmostSameValue( d, 9.0, 0 ), true, 'returns expected value' ); x = new Float64Array( [ 3.0, -4.0, 1.0 ] ); y = new Float64Array( [ 1.0, -2.0, 3.0 ] ); // Test against textbook formula: max(2,2,2) - d = dchebychev( x.length, x, 1, 0, y, 1, 0 ); + d = dchebyshev( x.length, x, 1, 0, y, 1, 0 ); t.strictEqual( isAlmostSameValue( d, 2.0, 0 ), true, 'returns expected value' ); t.end(); @@ -78,10 +78,10 @@ tape( 'if provided an `N` parameter less than or equal to `0`, the function retu x = new Float64Array( [ 3.0, -4.0, 1.0 ] ); y = new Float64Array( [ 1.0, -2.0, 3.0 ] ); - d = dchebychev( 0, x, 1, 0, y, 1, 0 ); + d = dchebyshev( 0, x, 1, 0, y, 1, 0 ); t.strictEqual( isAlmostSameValue( d, NaN, 0 ), true, 'returns expected value' ); - d = dchebychev( -4, x, 1, 0, y, 1, 0 ); + d = dchebyshev( -4, x, 1, 0, y, 1, 0 ); t.strictEqual( isAlmostSameValue( d, NaN, 0 ), true, 'returns expected value' ); t.end(); }); @@ -108,7 +108,7 @@ tape( 'the function supports an `x` stride', opts, function test( t ) { ]); // Test against textbook formula: max(6,7,9) - d = dchebychev( 3, x, 2, 0, y, 1, 0 ); + d = dchebyshev( 3, x, 2, 0, y, 1, 0 ); t.strictEqual( isAlmostSameValue( d, 9.0, 0 ), true, 'returns expected value' ); t.end(); }); @@ -136,7 +136,7 @@ tape( 'the function supports an `x` offset', opts, function test( t ) { ]); // Test against textbook formula: max(4,3,2) - d = dchebychev( 3, x, 2, 1, y, 1, 0 ); + d = dchebyshev( 3, x, 2, 1, y, 1, 0 ); t.strictEqual( isAlmostSameValue( d, 4.0, 0 ), true, 'returns expected value' ); t.end(); }); @@ -163,7 +163,7 @@ tape( 'the function supports a `y` stride', opts, function test( t ) { ]); // Test against textbook formula: max(6,0,1) - d = dchebychev( 3, x, 1, 0, y, 2, 0 ); + d = dchebyshev( 3, x, 1, 0, y, 2, 0 ); t.strictEqual( isAlmostSameValue( d, 6.0, 0 ), true, 'returns expected value' ); t.end(); }); @@ -191,7 +191,7 @@ tape( 'the function supports a `y` offset', opts, function test( t ) { ]); // Test against textbook formula: max(8,7,6) - d = dchebychev( 3, x, 2, 0, y, 1, 3 ); + d = dchebyshev( 3, x, 2, 0, y, 1, 3 ); t.strictEqual( isAlmostSameValue( d, 8.0, 0 ), true, 'returns expected value' ); t.end(); }); @@ -217,7 +217,7 @@ tape( 'the function supports negative strides', opts, function test( t ) { ]); // Test against textbook formula: max(3,4,5) - d = dchebychev( 3, x, -2, x.length-1, y, -1, 2 ); + d = dchebyshev( 3, x, -2, x.length-1, y, -1, 2 ); t.strictEqual( isAlmostSameValue( d, 5.0, 0 ), true, 'returns expected value' ); t.end(); }); @@ -243,7 +243,7 @@ tape( 'the function supports complex access patterns', opts, function test( t ) ]); // Test against textbook formula: max(8,5,2) - d = dchebychev( 3, x, 2, 0, y, -1, y.length-2 ); + d = dchebyshev( 3, x, 2, 0, y, -1, y.length-2 ); t.strictEqual( isAlmostSameValue( d, 8.0, 0 ), true, 'returns expected value' ); t.end(); }); diff --git a/lib/node_modules/@stdlib/stats/strided/distances/docs/types/index.d.ts b/lib/node_modules/@stdlib/stats/strided/distances/docs/types/index.d.ts index cc0dbb392eef..5c322c98975f 100644 --- a/lib/node_modules/@stdlib/stats/strided/distances/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/stats/strided/distances/docs/types/index.d.ts @@ -20,7 +20,6 @@ /* eslint-disable max-lines */ -import dchebychev = require( '@stdlib/stats/strided/distances/dchebychev' ); import dcityblock = require( '@stdlib/stats/strided/distances/dcityblock' ); import dcosineDistance = require( '@stdlib/stats/strided/distances/dcosine-distance' ); import dcosineSimilarity = require( '@stdlib/stats/strided/distances/dcosine-similarity' ); @@ -31,36 +30,6 @@ import dsquaredEuclidean = require( '@stdlib/stats/strided/distances/dsquared-eu * Interface describing the `distances` namespace. */ interface Namespace { - /** - * Computes the Chebychev distance between two double-precision floating-point strided arrays. - * - * @param N - number of indexed elements - * @param x - first input array - * @param strideX - `x` stride length - * @param y - second input array - * @param strideY - `y` stride length - * @returns Chebychev distance - * - * @example - * var Float64Array = require( '@stdlib/array/float64' ); - * - * var x = new Float64Array( [ 4.0, 2.0, -3.0, 5.0, -1.0 ] ); - * var y = new Float64Array( [ 2.0, 6.0, -1.0, -4.0, 8.0 ] ); - * - * var z = ns.dchebychev( x.length, x, 1, y, 1 ); - * // returns 9.0 - * - * @example - * var Float64Array = require( '@stdlib/array/float64' ); - * - * var x = new Float64Array( [ 4.0, 2.0, -3.0, 5.0, -1.0 ] ); - * var y = new Float64Array( [ 2.0, 6.0, -1.0, -4.0, 8.0 ] ); - * - * var z = ns.dchebychev.ndarray( x.length, x, 1, 0, y, 1, 0 ); - * // returns 9.0 - */ - dchebychev: typeof dchebychev; - /** * Computes the city block (Manhattan) distance between two double-precision floating-point strided arrays. * diff --git a/lib/node_modules/@stdlib/stats/strided/distances/lib/index.js b/lib/node_modules/@stdlib/stats/strided/distances/lib/index.js index 784c990cbdd0..e8a4aab718db 100644 --- a/lib/node_modules/@stdlib/stats/strided/distances/lib/index.js +++ b/lib/node_modules/@stdlib/stats/strided/distances/lib/index.js @@ -36,15 +36,6 @@ var setReadOnly = require( '@stdlib/utils/define-read-only-property' ); */ var ns = {}; -/** -* @name dchebychev -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/stats/strided/distances/dchebychev} -*/ -setReadOnly( ns, 'dchebychev', require( '@stdlib/stats/strided/distances/dchebychev' ) ); - /** * @name dcityblock * @memberof ns