Skip to content

Commit

Permalink
feat!: update namespace TypeScript declarations
Browse files Browse the repository at this point in the history
This commit removes `add`, `add3`, and `add4` symbols from `math/base/ops`. Those symbols have moved to `number/float64/base`.

BREAKING CHANGE: remove `add`, `add3`, and `add4`

To migrate, users should access those symbols in the `number/float64/base` namespace.

PR-URL: #5130
Reviewed-by: Athan Reines <[email protected]>
  • Loading branch information
stdlib-bot authored Feb 9, 2025
1 parent 152dfd2 commit d66db3f
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 128 deletions.
28 changes: 4 additions & 24 deletions lib/node_modules/@stdlib/blas/base/docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2090,41 +2090,21 @@ interface Namespace {
*
* @example
* var Complex128Array = require( '@stdlib/array/complex128' );
* var real = require( '@stdlib/complex/float64/real' );
* var imag = require( '@stdlib/complex/float64/imag' );
*
* var x = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
* var y = new Complex128Array( [ 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );
* var y = new Complex128Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );
*
* ns.zcopy( x.length, x, 1, y, 1 );
*
* var z = y.get( 0 );
* // returns <Complex128>
*
* var re = real( z );
* // returns 1.0
*
* var im = imag( z );
* // returns 2.0
* // y => <Complex128Array>[ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ]
*
* @example
* var Complex128Array = require( '@stdlib/array/complex128' );
* var real = require( '@stdlib/complex/float64/real' );
* var imag = require( '@stdlib/complex/float64/imag' );
*
* var x = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
* var y = new Complex128Array( [ 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );
* var y = new Complex128Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );
*
* ns.zcopy.ndarray( x.length, x, 1, 0, y, 1, 0 );
*
* var z = y.get( 0 );
* // returns <Complex128>
*
* var re = real( z );
* // returns 1.0
*
* var im = imag( z );
* // returns 2.0
* // y => <Complex128Array>[ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ]
*/
zcopy: typeof zcopy;

Expand Down
14 changes: 7 additions & 7 deletions lib/node_modules/@stdlib/blas/ext/base/docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1968,9 +1968,9 @@ interface Namespace {
* @param N - number of indexed elements
* @param order - sort order
* @param x - first input array
* @param strideX - `x` stride length
* @param strideX - stride length for `x`
* @param y - second input array
* @param strideY - `y` stride length
* @param strideY - stride length for `x`
* @returns `x`
*
* @example
Expand Down Expand Up @@ -2005,9 +2005,9 @@ interface Namespace {
* @param N - number of indexed elements
* @param order - sort order
* @param x - first input array
* @param strideX - `x` stride length
* @param strideX - stride length for `x`
* @param y - second input array
* @param strideY - `y` stride length
* @param strideY - stride length for `y`
* @returns `x`
*
* @example
Expand Down Expand Up @@ -2042,9 +2042,9 @@ interface Namespace {
* @param N - number of indexed elements
* @param order - sort order
* @param x - first input array
* @param strideX - `x` stride length
* @param strideX - stride length for `x`
* @param y - second input array
* @param strideY - `y` stride length
* @param strideY - stride length for `y`
* @returns `x`
*
* @example
Expand Down Expand Up @@ -2079,7 +2079,7 @@ interface Namespace {
* @param N - number of indexed elements
* @param order - sort order
* @param x - input array
* @param stride - stride length
* @param strideX - stride length
* @returns `x`
*
* @example
Expand Down
93 changes: 0 additions & 93 deletions lib/node_modules/@stdlib/math/base/ops/docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ import caddf = require( '@stdlib/complex/float32/base/add' );
import cmulf = require( '@stdlib/complex/float32/base/mul' );
import cadd = require( '@stdlib/complex/float64/base/add' );
import cmul = require( '@stdlib/complex/float64/base/mul' );
import add = require( '@stdlib/number/float64/base/add' );
import add3 = require( '@stdlib/number/float64/base/add3' );
import add4 = require( '@stdlib/number/float64/base/add4' );
import add5 = require( '@stdlib/math/base/ops/add5' );
import addf = require( '@stdlib/math/base/ops/addf' );
import cdiv = require( '@stdlib/math/base/ops/cdiv' );
Expand Down Expand Up @@ -197,96 +194,6 @@ interface Namespace {
*/
cmul: typeof cmul;

/**
* Computes the sum of two double-precision floating-point numbers `x` and `y`.
*
* @param x - first input value
* @param y - second input value
* @returns sum
*
* @example
* var v = ns.add( -1.0, 5.0 );
* // returns 4.0
*
* @example
* var v = ns.add( 2.0, 5.0 );
* // returns 7.0
*
* @example
* var v = ns.add( 0.0, 5.0 );
* // returns 5.0
*
* @example
* var v = ns.add( -0.0, 0.0 );
* // returns 0.0
*
* @example
* var v = ns.add( NaN, NaN );
* // returns NaN
*/
add: typeof add;

/**
* Computes the sum of three double-precision floating-point numbers.
*
* @param x - first input value
* @param y - second input value
* @param z - third input value
* @returns sum
*
* @example
* var v = ns.add3( -1.0, 5.0, 2.0 );
* // returns 6.0
*
* @example
* var v = ns.add3( 2.0, 5.0, 2.0 );
* // returns 9.0
*
* @example
* var v = ns.add3( 0.0, 5.0, 2.0 );
* // returns 7.0
*
* @example
* var v = ns.add3( -0.0, 0.0, -0.0 );
* // returns 0.0
*
* @example
* var v = ns.add3( NaN, NaN, NaN );
* // returns NaN
*/
add3: typeof add3;

/**
* Computes the sum of four double-precision floating-point numbers.
*
* @param x - first input value
* @param y - second input value
* @param z - third input value
* @param w - fourth input value
* @returns sum
*
* @example
* var v = ns.add4( -1.0, 5.0, 2.0, -3.0 );
* // returns 3.0
*
* @example
* var v = ns.add4( 2.0, 5.0, 2.0, -3.0 );
* // returns 6.0
*
* @example
* var v = ns.add4( 0.0, 5.0, 2.0, -3.0 );
* // returns 4.0
*
* @example
* var v = ns.add4( -0.0, 0.0, -0.0, -0.0 );
* // returns 0.0
*
* @example
* var v = ns.add4( NaN, NaN, NaN, NaN );
* // returns NaN
*/
add4: typeof add4;

/**
* Computes the sum of five double-precision floating-point numbers.
*
Expand Down
8 changes: 4 additions & 4 deletions lib/node_modules/@stdlib/stats/base/docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2121,7 +2121,7 @@ interface Namespace {
*
* @param N - number of indexed elements
* @param x - input array
* @param stride - stride length
* @param strideX - stride length
* @returns arithmetic mean
*
* @example
Expand Down Expand Up @@ -2674,7 +2674,7 @@ interface Namespace {
*
* @param N - number of indexed elements
* @param x - input array
* @param stride - stride length
* @param strideX - stride length
* @returns maximum absolute value
*
* @example
Expand Down Expand Up @@ -2959,7 +2959,7 @@ interface Namespace {
*
* @param N - number of indexed elements
* @param x - input array
* @param stride - stride length
* @param strideX - stride length
* @returns minimum absolute value
*
* @example
Expand Down Expand Up @@ -3959,7 +3959,7 @@ interface Namespace {
*
* @param N - number of indexed elements
* @param x - input array
* @param stride - stride length
* @param strideX - stride length
* @returns arithmetic mean
*
* @example
Expand Down

1 comment on commit d66db3f

@stdlib-bot
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Coverage Report

Package Statements Branches Functions Lines
blas/base $\color{green}789/789$
$\color{green}+100.00\%$
$\color{green}1/1$
$\color{green}+100.00\%$
$\color{green}0/0$
$\color{green}+100.00\%$
$\color{green}789/789$
$\color{green}+100.00\%$
blas/ext/base $\color{green}1068/1068$
$\color{green}+100.00\%$
$\color{green}1/1$
$\color{green}+100.00\%$
$\color{green}0/0$
$\color{green}+100.00\%$
$\color{green}1068/1068$
$\color{green}+100.00\%$
math/base/ops $\color{green}231/231$
$\color{green}+100.00\%$
$\color{green}1/1$
$\color{green}+100.00\%$
$\color{green}0/0$
$\color{green}+100.00\%$
$\color{green}231/231$
$\color{green}+100.00\%$
stats/base $\color{green}1968/1968$
$\color{green}+100.00\%$
$\color{green}1/1$
$\color{green}+100.00\%$
$\color{green}0/0$
$\color{green}+100.00\%$
$\color{green}1968/1968$
$\color{green}+100.00\%$

The above coverage report was generated for the changes in this push.

Please sign in to comment.