🚨 Active Supply Chain Attack:node-ipc Package Compromised.Learn More
Socket
Book a DemoSign in
Socket

@stdlib/array-complex128

Package Overview
Dependencies
Maintainers
4
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stdlib/array-complex128

Complex128Array.

Source
npmnpm
Version
0.0.4
Version published
Weekly downloads
40K
6.79%
Maintainers
4
Weekly downloads
 
Created
Source

Complex128Array

NPM version Build Status Coverage Status dependencies

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

Chat

License

See LICENSE.

Copyright © 2016-2021. The Stdlib Authors.

Keywords

stdlib

FAQs

Package last updated on 07 Jul 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts