Skip to content

Commit dda0844

Browse files
committed
Merge branch 'develop' of https://github.com/stdlib-js/stdlib into develop
2 parents ca19780 + a8648c9 commit dda0844

8 files changed

Lines changed: 90 additions & 10 deletions

File tree

lib/node_modules/@stdlib/blas/base/ndarray/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ The namespace exposes the following APIs:
4747

4848
- <span class="signature">[`caxpy( arrays )`][@stdlib/blas/base/ndarray/caxpy]</span><span class="delimiter">: </span><span class="description">multiply a one-dimensional single-precision complex floating-point ndarray `x` by a constant `alpha` and add the result to a one-dimensional single-precision complex floating-point ndarray `y`.</span>
4949
- <span class="signature">[`ccopy( arrays )`][@stdlib/blas/base/ndarray/ccopy]</span><span class="delimiter">: </span><span class="description">copy values from a one-dimensional single-precision complex floating-point ndarray `x` into a one-dimensional single-precision complex floating-point ndarray `y`.</span>
50+
- <span class="signature">[`cscal( arrays )`][@stdlib/blas/base/ndarray/cscal]</span><span class="delimiter">: </span><span class="description">multiply a one-dimensional single-precision complex floating-point ndarray by a scalar constant.</span>
5051
- <span class="signature">[`cswap( arrays )`][@stdlib/blas/base/ndarray/cswap]</span><span class="delimiter">: </span><span class="description">interchange two one-dimensional single-precision complex floating-point ndarrays.</span>
5152
- <span class="signature">[`dasum( arrays )`][@stdlib/blas/base/ndarray/dasum]</span><span class="delimiter">: </span><span class="description">calculate the sum of absolute values for all elements in a one-dimensional double-precision floating-point ndarray.</span>
5253
- <span class="signature">[`daxpy( arrays )`][@stdlib/blas/base/ndarray/daxpy]</span><span class="delimiter">: </span><span class="description">multiply a one-dimensional double-precision floating-point ndarray `x` by a constant `alpha` and add the result to a one-dimensional double-precision floating-point ndarray `y`.</span>
@@ -58,6 +59,7 @@ The namespace exposes the following APIs:
5859
- <span class="signature">[`gaxpy( arrays )`][@stdlib/blas/base/ndarray/gaxpy]</span><span class="delimiter">: </span><span class="description">multiply a one-dimensional ndarray `x` by a constant `alpha` and add the result to a one-dimensional ndarray `y`.</span>
5960
- <span class="signature">[`gcopy( arrays )`][@stdlib/blas/base/ndarray/gcopy]</span><span class="delimiter">: </span><span class="description">copy values from a one-dimensional ndarray `x` into a one-dimensional ndarray `y`.</span>
6061
- <span class="signature">[`gdot( arrays )`][@stdlib/blas/base/ndarray/gdot]</span><span class="delimiter">: </span><span class="description">calculate the dot product of two one-dimensional ndarrays.</span>
62+
- <span class="signature">[`gscal( arrays )`][@stdlib/blas/base/ndarray/gscal]</span><span class="delimiter">: </span><span class="description">multiply a one-dimensional ndarray by a scalar constant.</span>
6163
- <span class="signature">[`gswap( arrays )`][@stdlib/blas/base/ndarray/gswap]</span><span class="delimiter">: </span><span class="description">interchange two one-dimensional ndarrays.</span>
6264
- <span class="signature">[`sasum( arrays )`][@stdlib/blas/base/ndarray/sasum]</span><span class="delimiter">: </span><span class="description">calculate the sum of absolute values for all elements in a one-dimensional single-precision floating-point ndarray.</span>
6365
- <span class="signature">[`saxpy( arrays )`][@stdlib/blas/base/ndarray/saxpy]</span><span class="delimiter">: </span><span class="description">multiply a one-dimensional single-precision floating-point ndarray `x` by a constant `alpha` and add the result to a one-dimensional single-precision floating-point ndarray `y`.</span>
@@ -114,6 +116,8 @@ console.log( objectKeys( ns ) );
114116

115117
[@stdlib/blas/base/ndarray/ccopy]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/blas/base/ndarray/ccopy
116118

119+
[@stdlib/blas/base/ndarray/cscal]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/blas/base/ndarray/cscal
120+
117121
[@stdlib/blas/base/ndarray/cswap]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/blas/base/ndarray/cswap
118122

119123
[@stdlib/blas/base/ndarray/dasum]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/blas/base/ndarray/dasum
@@ -136,6 +140,8 @@ console.log( objectKeys( ns ) );
136140

137141
[@stdlib/blas/base/ndarray/gdot]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/blas/base/ndarray/gdot
138142

143+
[@stdlib/blas/base/ndarray/gscal]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/blas/base/ndarray/gscal
144+
139145
[@stdlib/blas/base/ndarray/gswap]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/blas/base/ndarray/gswap
140146

141147
[@stdlib/blas/base/ndarray/sasum]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/blas/base/ndarray/sasum

lib/node_modules/@stdlib/blas/base/ndarray/docs/types/index.d.ts

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
import caxpy = require( '@stdlib/blas/base/ndarray/caxpy' );
2424
import ccopy = require( '@stdlib/blas/base/ndarray/ccopy' );
25+
import cscal = require( '@stdlib/blas/base/ndarray/cscal' );
2526
import cswap = require( '@stdlib/blas/base/ndarray/cswap' );
2627
import dasum = require( '@stdlib/blas/base/ndarray/dasum' );
2728
import daxpy = require( '@stdlib/blas/base/ndarray/daxpy' );
@@ -33,6 +34,7 @@ import gasum = require( '@stdlib/blas/base/ndarray/gasum' );
3334
import gaxpy = require( '@stdlib/blas/base/ndarray/gaxpy' );
3435
import gcopy = require( '@stdlib/blas/base/ndarray/gcopy' );
3536
import gdot = require( '@stdlib/blas/base/ndarray/gdot' );
37+
import gscal = require( '@stdlib/blas/base/ndarray/gscal' );
3638
import gswap = require( '@stdlib/blas/base/ndarray/gswap' );
3739
import sasum = require( '@stdlib/blas/base/ndarray/sasum' );
3840
import saxpy = require( '@stdlib/blas/base/ndarray/saxpy' );
@@ -109,6 +111,38 @@ interface Namespace {
109111
*/
110112
ccopy: typeof ccopy;
111113

114+
/**
115+
* Multiplies a one-dimensional single-precision complex floating-point ndarray by a scalar constant.
116+
*
117+
* ## Notes
118+
*
119+
* - The function expects the following ndarrays:
120+
*
121+
* - a one-dimensional input ndarray.
122+
* - a zero-dimensional ndarray containing a scalar constant.
123+
*
124+
* @param arrays - array-like object containing ndarrays
125+
* @returns input ndarray
126+
*
127+
* @example
128+
* var Complex64Vector = require( '@stdlib/ndarray/vector/complex64' );
129+
* var Complex64 = require( '@stdlib/complex/float32/ctor' );
130+
* var scalar2ndarray = require( '@stdlib/ndarray/from-scalar' );
131+
*
132+
* var x = new Complex64Vector( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
133+
*
134+
* var alpha = scalar2ndarray( new Complex64( 2.0, 0.0 ), {
135+
* 'dtype': 'complex64'
136+
* });
137+
*
138+
* var y = ns.cscal( [ x, alpha ] );
139+
* // returns <ndarray>[ <Complex64>[ 2.0, 4.0 ], <Complex64>[ 6.0, 8.0 ], <Complex64>[ 10.0, 12.0 ] ]
140+
*
141+
* var bool = ( y === x );
142+
* // returns true
143+
*/
144+
cscal: typeof cscal;
145+
112146
/**
113147
* Interchanges two one-dimensional single-precision complex floating-point ndarrays.
114148
*
@@ -408,6 +442,37 @@ interface Namespace {
408442
*/
409443
gdot: typeof gdot;
410444

445+
/**
446+
* Multiplies a one-dimensional ndarray by a scalar constant.
447+
*
448+
* ## Notes
449+
*
450+
* - The function expects the following ndarrays:
451+
*
452+
* - a one-dimensional input ndarray.
453+
* - a zero-dimensional ndarray containing a scalar constant.
454+
*
455+
* @param arrays - array-like object containing ndarrays
456+
* @returns input ndarray
457+
*
458+
* @example
459+
* var vector = require( '@stdlib/ndarray/vector/ctor' );
460+
* var scalar2ndarray = require( '@stdlib/ndarray/from-scalar' );
461+
*
462+
* var x = vector( [ 1.0, 2.0, 3.0, 4.0, 5.0 ], 'generic' );
463+
*
464+
* var alpha = scalar2ndarray( 5.0, {
465+
* 'dtype': 'generic'
466+
* });
467+
*
468+
* var y = ns.gscal( [ x, alpha ] );
469+
* // returns <ndarray>[ 5.0, 10.0, 15.0, 20.0, 25.0 ]
470+
*
471+
* var bool = ( y === x );
472+
* // returns true
473+
*/
474+
gscal: typeof gscal;
475+
411476
/**
412477
* Interchanges two one-dimensional ndarrays.
413478
*

lib/node_modules/@stdlib/blas/ext/base/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ var o = ns;
122122
- <span class="signature">[`gapxsumors( N, alpha, x, strideX )`][@stdlib/blas/ext/base/gapxsumors]</span><span class="delimiter">: </span><span class="description">add a scalar constant to each strided array element and compute the sum using ordinary recursive summation.</span>
123123
- <span class="signature">[`gapxsumpw( N, alpha, x, strideX )`][@stdlib/blas/ext/base/gapxsumpw]</span><span class="delimiter">: </span><span class="description">add a scalar constant to each strided array element and compute the sum using pairwise summation.</span>
124124
- <span class="signature">[`gasumpw( N, x, strideX )`][@stdlib/blas/ext/base/gasumpw]</span><span class="delimiter">: </span><span class="description">calculate the sum of absolute values (_L1_ norm) of strided array elements using pairwise summation.</span>
125+
- <span class="signature">[`gcartesianPower( order, N, k, x, strideX, out, LDO )`][@stdlib/blas/ext/base/gcartesian-power]</span><span class="delimiter">: </span><span class="description">compute the Cartesian power for a strided array.</span>
125126
- <span class="signature">[`gcircshift( N, k, x, strideX )`][@stdlib/blas/ext/base/gcircshift]</span><span class="delimiter">: </span><span class="description">circularly shift the elements of a strided array by a specified number of positions.</span>
126127
- <span class="signature">[`gconjoin( N, prefix, suffix, conjunction, oxfordComma, x, strideX )`][@stdlib/blas/ext/base/gconjoin]</span><span class="delimiter">: </span><span class="description">return a string created by joining strided array elements into a human-readable list using a conjunction.</span>
127128
- <span class="signature">[`gcusum( N, sum, x, strideX, y, strideY )`][@stdlib/blas/ext/base/gcusum]</span><span class="delimiter">: </span><span class="description">calculate the cumulative sum of strided array elements.</span>
@@ -176,6 +177,7 @@ var o = ns;
176177
- <span class="signature">[`sapxsumors( N, alpha, x, strideX )`][@stdlib/blas/ext/base/sapxsumors]</span><span class="delimiter">: </span><span class="description">add a scalar constant to each single-precision floating-point strided array element and compute the sum using ordinary recursive summation.</span>
177178
- <span class="signature">[`sapxsumpw( N, alpha, x, strideX )`][@stdlib/blas/ext/base/sapxsumpw]</span><span class="delimiter">: </span><span class="description">add a scalar constant to each single-precision floating-point strided array element and compute the sum using pairwise summation.</span>
178179
- <span class="signature">[`sasumpw( N, x, strideX )`][@stdlib/blas/ext/base/sasumpw]</span><span class="delimiter">: </span><span class="description">calculate the sum of absolute values (_L1_ norm) of single-precision floating-point strided array elements using pairwise summation.</span>
180+
- <span class="signature">[`scartesianPower( order, N, k, x, strideX, out, LDO )`][@stdlib/blas/ext/base/scartesian-power]</span><span class="delimiter">: </span><span class="description">compute the Cartesian power for a single-precision floating-point strided array.</span>
179181
- <span class="signature">[`scartesianSquare( order, N, x, strideX, out, LDO )`][@stdlib/blas/ext/base/scartesian-square]</span><span class="delimiter">: </span><span class="description">compute the Cartesian square for a single-precision floating-point strided array.</span>
180182
- <span class="signature">[`scircshift( N, k, x, strideX )`][@stdlib/blas/ext/base/scircshift]</span><span class="delimiter">: </span><span class="description">circularly shift the elements of a single-precision floating-point strided array by a specified number of positions.</span>
181183
- <span class="signature">[`scusum( N, sum, x, strideX, y, strideY )`][@stdlib/blas/ext/base/scusum]</span><span class="delimiter">: </span><span class="description">calculate the cumulative sum of single-precision floating-point strided array elements.</span>
@@ -437,6 +439,8 @@ console.log( objectKeys( ns ) );
437439

438440
[@stdlib/blas/ext/base/gasumpw]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/blas/ext/base/gasumpw
439441

442+
[@stdlib/blas/ext/base/gcartesian-power]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/blas/ext/base/gcartesian-power
443+
440444
[@stdlib/blas/ext/base/gcircshift]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/blas/ext/base/gcircshift
441445

442446
[@stdlib/blas/ext/base/gconjoin]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/blas/ext/base/gconjoin
@@ -545,6 +549,8 @@ console.log( objectKeys( ns ) );
545549

546550
[@stdlib/blas/ext/base/sasumpw]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/blas/ext/base/sasumpw
547551

552+
[@stdlib/blas/ext/base/scartesian-power]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/blas/ext/base/scartesian-power
553+
548554
[@stdlib/blas/ext/base/scartesian-square]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/blas/ext/base/scartesian-square
549555

550556
[@stdlib/blas/ext/base/scircshift]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/blas/ext/base/scircshift

0 commit comments

Comments
 (0)