Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 9 additions & 73 deletions lib/node_modules/@stdlib/blas/ext/base/zfill/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ Fills a double-precision complex floating-point strided array `x` with a specifi
var Float64Array = require( '@stdlib/array/float64' );
var Complex128Array = require( '@stdlib/array/complex128' );
var Complex128 = require( '@stdlib/complex/float64/ctor' );
var real = require( '@stdlib/complex/float64/real' );
var imag = require( '@stdlib/complex/float64/imag' );

var arr = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
var x = new Complex128Array( arr );
Expand All @@ -49,13 +47,7 @@ var alpha = new Complex128( 10.0, 10.0 );
zfill( x.length, alpha, x, 1 );

var y = x.get( 0 );
// returns <Complex128>

var re = real( y );
// returns 10.0

var im = imag( y );
// returns 10.0
// returns <Complex128>[ 10.0, 10.0 ]
```

The function has the following parameters:
Expand All @@ -71,8 +63,6 @@ The `N` and stride parameters determine which elements in the strided array are
var Float64Array = require( '@stdlib/array/float64' );
var Complex128Array = require( '@stdlib/array/complex128' );
var Complex128 = require( '@stdlib/complex/float64/ctor' );
var real = require( '@stdlib/complex/float64/real' );
var imag = require( '@stdlib/complex/float64/imag' );

var arr = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
var x = new Complex128Array( arr );
Expand All @@ -82,22 +72,10 @@ var alpha = new Complex128( 10.0, 10.0 );
zfill( 2, alpha, x, 2 );

var y = x.get( 0 );
// returns <Complex128>

var re = real( y );
// returns 10.0

var im = imag( y );
// returns 10.0
// returns <Complex128>[ 10.0, 10.0 ]

y = x.get( 1 );
// returns <Complex128>

re = real( y );
// returns 3.0

im = imag( y );
// returns 4.0
// returns <Complex128>[ 3.0, 4.0 ]
```

Note that indexing is relative to the first index. To introduce an offset, use [`typed array`][mdn-typed-array] views.
Expand All @@ -106,8 +84,6 @@ Note that indexing is relative to the first index. To introduce an offset, use [
var Float64Array = require( '@stdlib/array/float64' );
var Complex128Array = require( '@stdlib/array/complex128' );
var Complex128 = require( '@stdlib/complex/float64/ctor' );
var real = require( '@stdlib/complex/float64/real' );
var imag = require( '@stdlib/complex/float64/imag' );

// Create the underlying floating-point array:
var arr = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
Expand All @@ -125,22 +101,10 @@ var alpha = new Complex128( 10.0, 10.0 );
zfill( 2, alpha, x1, 2 );

var y = x0.get( 0 );
// returns <Complex128>

var re = real( y );
// returns 1.0

var im = imag( y );
// returns 2.0
// returns <Complex128>[ 1.0, 2.0 ]

y = x0.get( 1 );
// returns <Complex128>

re = real( y );
// returns 10.0

im = imag( y );
// returns 10.0
// returns <Complex128>[ 10.0, 10.0 ]
```

#### zfill.ndarray( N, alpha, x, strideX, offsetX )
Expand All @@ -151,8 +115,6 @@ Fills a double-precision complex floating-point strided array `x` with a specifi
var Float64Array = require( '@stdlib/array/float64' );
var Complex128Array = require( '@stdlib/array/complex128' );
var Complex128 = require( '@stdlib/complex/float64/ctor' );
var real = require( '@stdlib/complex/float64/real' );
var imag = require( '@stdlib/complex/float64/imag' );

var arr = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
var x = new Complex128Array( arr );
Expand All @@ -162,13 +124,7 @@ var alpha = new Complex128( 10.0, 10.0 );
zfill.ndarray( x.length, alpha, x, 1, 0 );

var y = x.get( 0 );
// returns <Complex128>

var re = real( y );
// returns 10.0

var im = imag( y );
// returns 10.0
// returns <Complex128>[ 10.0, 10.0 ]
```

The function has the following additional parameters:
Expand All @@ -181,8 +137,6 @@ While [`typed array`][mdn-typed-array] views mandate a view offset based on the
var Float64Array = require( '@stdlib/array/float64' );
var Complex128Array = require( '@stdlib/array/complex128' );
var Complex128 = require( '@stdlib/complex/float64/ctor' );
var real = require( '@stdlib/complex/float64/real' );
var imag = require( '@stdlib/complex/float64/imag' );

var arr = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
var x = new Complex128Array( arr );
Expand All @@ -192,31 +146,13 @@ var alpha = new Complex128( 10.0, 10.0 );
zfill.ndarray( 2, alpha, x, 1, x.length-2 );

var y = x.get( 0 );
// returns <Complex128>

var re = real( y );
// returns 1.0

var im = imag( y );
// returns 2.0
// returns <Complex128>[ 1.0, 2.0]

y = x.get( 1 );
// returns <Complex128>

re = real( y );
// returns 10.0

im = imag( y );
// returns 10.0
// returns <Complex128>[ 10.0, 10.0 ]

y = x.get( 2 );
// returns <Complex128>

re = real( y );
// returns 10.0

im = imag( y );
// returns 10.0
// returns <Complex128>[ 10.0, 10.0 ]
```

</section>
Expand Down
56 changes: 16 additions & 40 deletions lib/node_modules/@stdlib/blas/ext/base/zfill/docs/repl.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,42 +36,27 @@
> var x = new {{alias:@stdlib/array/complex128}}( [ 1.0, 2.0, 3.0, 4.0 ] );
> var alpha = new {{alias:@stdlib/complex/float64/ctor}}( 5.0, -5.0 );
> {{alias}}( x.length, alpha, x, 1 );
> var z = x.get( 0 );
> var re = {{alias:@stdlib/complex/float64/real}}( z )
5.0
> var im = {{alias:@stdlib/complex/float64/imag}}( z )
-5.0
> var z = x.get( 0 )
<Complex128>[ 5.0, -5.0 ]

// Using `N` and stride parameters:
> x = new {{alias:@stdlib/array/complex128}}( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
> alpha = new {{alias:@stdlib/complex/float64/ctor}}( 5.0, -5.0 );
> {{alias}}( 2, alpha, x, 2 );
> z = x.get( 0 );
> re = {{alias:@stdlib/complex/float64/real}}( z )
5.0
> im = {{alias:@stdlib/complex/float64/imag}}( z )
-5.0
> z = x.get( 1 );
> re = {{alias:@stdlib/complex/float64/real}}( z )
3.0
> im = {{alias:@stdlib/complex/float64/imag}}( z )
4.0
> z = x.get( 0 )
<Complex128>[ 5.0, -5.0 ]
> z = x.get( 2 )
<Complex128>[ 5.0, -5.0 ]

// Using view offsets:
> var x0 = new {{alias:@stdlib/array/complex128}}( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
> var x1 = new {{alias:@stdlib/array/complex128}}( x0.buffer, x0.BYTES_PER_ELEMENT*1 );
> alpha = new {{alias:@stdlib/complex/float64/ctor}}( 5.0, -5.0 );
> {{alias}}( 2, alpha, x1, 1 );
> z = x0.get( 0 );
> re = {{alias:@stdlib/complex/float64/real}}( z )
1.0
> im = {{alias:@stdlib/complex/float64/imag}}( z )
2.0
> z = x0.get( 1 );
> re = {{alias:@stdlib/complex/float64/real}}( z )
5.0
> im = {{alias:@stdlib/complex/float64/imag}}( z )
-5.0
> z = x0.get( 0 )
<Complex128>[ 1.0, 2.0 ]
> z = x0.get( 1 )
<Complex128>[ 5.0, -5.0 ]


{{alias}}.ndarray( N, alpha, x, strideX, offsetX )
Expand Down Expand Up @@ -110,26 +95,17 @@
> var x = new {{alias:@stdlib/array/complex128}}( [ 1.0, 2.0, 3.0, 4.0 ] );
> var alpha = new {{alias:@stdlib/complex/float64/ctor}}( 2.0, 2.0 );
> {{alias}}.ndarray( x.length, alpha, x, 1, 0 );
> var z = x.get( 0 );
> var re = {{alias:@stdlib/complex/float64/real}}( z )
2.0
> var im = {{alias:@stdlib/complex/float64/imag}}( z )
2.0
> var z = x.get( 0 )
<Complex128>[ 2.0, 2.0 ]

// Using an index offset:
> x = new {{alias:@stdlib/array/complex128}}( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
> alpha = new {{alias:@stdlib/complex/float64/ctor}}( 5.0, -5.0 );
> {{alias}}.ndarray( 2, alpha, x, 2, 1 );
> z = x.get( 0 );
> re = {{alias:@stdlib/complex/float64/real}}( z )
1.0
> im = {{alias:@stdlib/complex/float64/imag}}( z )
2.0
> z = x.get( 1 );
> re = {{alias:@stdlib/complex/float64/real}}( z )
5.0
> im = {{alias:@stdlib/complex/float64/imag}}( z )
-5.0
> z = x.get( 0 )
<Complex128>[ 1.0, 2.0 ]
> z = x.get( 1 )
<Complex128>[ 5.0, -5.0 ]

See Also
--------
30 changes: 3 additions & 27 deletions lib/node_modules/@stdlib/blas/ext/base/zfill/docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ interface Routine {
* var Float64Array = require( '@stdlib/array/float64' );
* var Complex128Array = require( '@stdlib/array/complex128' );
* var Complex128 = require( '@stdlib/complex/float64/ctor' );
* var real = require( '@stdlib/complex/float64/real' );
* var imag = require( '@stdlib/complex/float64/imag' );
*
* var arr = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
* var x = new Complex128Array( arr );
Expand All @@ -51,13 +49,7 @@ interface Routine {
* zfill( x.length, alpha, x, 1 );
*
* var y = x.get( 0 );
* // returns <Complex128>
*
* var re = real( y );
* // returns 10.0
*
* var im = imag( y );
* // returns 10.0
* // returns <Complex128>[ 10.0, 10.0 ]
*/
( N: number, alpha: Complex128, x: Complex128Array, strideX: number ): Complex128Array;

Expand All @@ -75,8 +67,6 @@ interface Routine {
* var Float64Array = require( '@stdlib/array/float64' );
* var Complex128Array = require( '@stdlib/array/complex128' );
* var Complex128 = require( '@stdlib/complex/float64/ctor' );
* var real = require( '@stdlib/complex/float64/real' );
* var imag = require( '@stdlib/complex/float64/imag' );
*
* var arr = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
* var x = new Complex128Array( arr );
Expand All @@ -86,13 +76,7 @@ interface Routine {
* zfill( x.length, alpha, x, 1, 0 );
*
* var y = x.get( 0 );
* // returns <Complex128>
*
* var re = real( y );
* // returns 10.0
*
* var im = imag( y );
* // returns 10.0
* // returns <Complex128>[ 10.0, 10.0 ]
*/
ndarray( N: number, alpha: Complex128, x: Complex128Array, strideX: number, offsetX: number ): Complex128Array;
}
Expand All @@ -110,8 +94,6 @@ interface Routine {
* var Float64Array = require( '@stdlib/array/float64' );
* var Complex128Array = require( '@stdlib/array/complex128' );
* var Complex128 = require( '@stdlib/complex/float64/ctor' );
* var real = require( '@stdlib/complex/float64/real' );
* var imag = require( '@stdlib/complex/float64/imag' );
*
* var arr = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
* var x = new Complex128Array( arr );
Expand All @@ -121,13 +103,7 @@ interface Routine {
* zfill( x.length, alpha, x, 1 );
*
* var y = x.get( 0 );
* // returns <Complex128>
*
* var re = real( y );
* // returns 10.0
*
* var im = imag( y );
* // returns 10.0
* // returns <Complex128>[ 10.0, 10.0 ]
*/
declare var zfill: Routine;

Expand Down
10 changes: 1 addition & 9 deletions lib/node_modules/@stdlib/blas/ext/base/zfill/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
* var Float64Array = require( '@stdlib/array/float64' );
* var Complex128Array = require( '@stdlib/array/complex128' );
* var Complex128 = require( '@stdlib/complex/float64/ctor' );
* var real = require( '@stdlib/complex/float64/real' );
* var imag = require( '@stdlib/complex/float64/imag' );
* var zfill = require( '@stdlib/blas/ext/base/zfill' );
*
* var arr = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
Expand All @@ -39,13 +37,7 @@
* zfill( x.length, alpha, x, 1 );
*
* var y = x.get( 0 );
* // returns <Complex128>
*
* var re = real( y );
* // returns 10.0
*
* var im = imag( y );
* // returns 10.0
* // returns <Complex128>[ 10.0, 10.0 ]
*/

// MODULES //
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ var addon = require( './../src/addon.node' );
* var Float64Array = require( '@stdlib/array/float64' );
* var Complex128Array = require( '@stdlib/array/complex128' );
* var Complex128 = require( '@stdlib/complex/float64/ctor' );
* var real = require( '@stdlib/complex/float64/real' );
* var imag = require( '@stdlib/complex/float64/imag' );
*
* var arr = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
* var x = new Complex128Array( arr );
Expand All @@ -51,13 +49,7 @@ var addon = require( './../src/addon.node' );
* zfill( x.length, alpha, x, 1, 0 );
*
* var y = x.get( 0 );
* // returns <Complex128>
*
* var re = real( y );
* // returns 10.0
*
* var im = imag( y );
* // returns 10.0
* // returns <Complex128>[ 10.0, 10.0 ]
*/
function zfill( N, alpha, x, strideX, offsetX ) {
var view = reinterpret( x, 0 );
Expand Down
10 changes: 1 addition & 9 deletions lib/node_modules/@stdlib/blas/ext/base/zfill/lib/zfill.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ var ndarray = require( './ndarray.js' );
* var Float64Array = require( '@stdlib/array/float64' );
* var Complex128Array = require( '@stdlib/array/complex128' );
* var Complex128 = require( '@stdlib/complex/float64/ctor' );
* var real = require( '@stdlib/complex/float64/real' );
* var imag = require( '@stdlib/complex/float64/imag' );
*
* var arr = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
* var x = new Complex128Array( arr );
Expand All @@ -50,13 +48,7 @@ var ndarray = require( './ndarray.js' );
* zfill( x.length, alpha, x, 1 );
*
* var y = x.get( 0 );
* // returns <Complex128>
*
* var re = real( y );
* // returns 10.0
*
* var im = imag( y );
* // returns 10.0
* // returns <Complex128>[ 10.0, 10.0 ]
*/
function zfill( N, alpha, x, strideX ) {
return ndarray( N, alpha, x, strideX, stride2offset( N, strideX ) );
Expand Down
Loading