Package Exports
- @stdlib/array-complex128
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@stdlib/array-complex128) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Complex128Array
128-bit complex number array.
Installation
npm install @stdlib/array-complex128
Usage
var Complex128Array = require( '@stdlib/array-complex128' );
Complex128Array()
Creates a 128-bit complex number array.
var arr = new Complex128Array();
// returns <Complex128Array>
Examples
var Complex128 = require( '@stdlib/complex-float64' );
var Float64Array = require( '@stdlib/array-float64' );
var Complex128Array = require( '@stdlib/array-complex128' );
var arr;
var out;
// Create a complex array by specifying a length:
out = new Complex128Array( 3 );
console.log( out );
// Create a complex array from an array of complex numbers:
arr = [
new Complex128( 1.0, -1.0 ),
new Complex128( -3.14, 3.14 ),
new Complex128( 0.5, 0.5 )
];
out = new Complex128Array( arr );
console.log( out );
// Create a complex array from an interleaved typed array:
arr = new Float64Array( [ 1.0, -1.0, -3.14, 3.14, 0.5, 0.5 ] );
out = new Complex128Array( arr );
console.log( out );
// Create a complex array from an array buffer:
arr = new Float64Array( [ 1.0, -1.0, -3.14, 3.14, 0.5, 0.5 ] );
out = new Complex128Array( arr.buffer );
console.log( out );
// Create a complex array from an array buffer view:
arr = new Float64Array( [ 1.0, -1.0, -3.14, 3.14, 0.5, 0.5 ] );
out = new Complex128Array( arr.buffer, 16, 2 );
console.log( out );
Notice
This package is part of stdlib, a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more.
For more information on the project, filing bug reports and feature requests, and guidance on how to develop stdlib, see the main project repository.
Community
License
See LICENSE.
Copyright
Copyright © 2016-2021. The Stdlib Authors.