Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "array/typed-complex/docs/types/index.d"

Index

Variables

Functions

Variables

ArrayBuffer

ArrayBuffer: ArrayBufferConstructor

Functions

Export assignment complexarray

  • Creates a complex number typed array.

    Parameters

    • Optional dtype: DataType

      data type (default: 'complex128')

    Returns ComplexTypedArray

    complex number typed array

    Example

    var arr = complexarray();
    // returns <Complex128Array>

    Example

    var arr = complexarray( 'complex64');
    // returns <Complex64Array>
  • Creates a complex number typed array.

    Parameters

    • length: number

      typed array length

    • Optional dtype: DataType

      data type (default: 'complex128')

    Returns ComplexTypedArray

    typed array

    Example

    var arr = complexarray( 2 );
    // returns <Complex128Array>

    Example

    var arr = complexarray( 2, 'complex64' );
    // returns <Complex64Array>
  • Creates a complex number typed array.

    Parameters

    • complexarray: ComplexTypedArray

      complex number typed array from which to generate another complex number typed array

    • Optional dtype: DataType

      data type (default: 'complex128')

    Returns ComplexTypedArray

    complex number typed array

    Example

    var arr = complexarray( new Complex128Array( 2 ) );
    // returns <Complex128Array>

    Example

    var arr = complexarray( new Complex128Array( 2 ), 'complex64' );
    // returns <Complex64Array>
  • Creates a complex number typed array.

    throws

    array length must be a multiple of two

    Parameters

    • obj: ArrayLike<number> | Iterable<any>

      array-like object or iterable from which to generate a typed array

    • Optional dtype: DataType

      data type (default: 'complex128')

    Returns ComplexTypedArray

    complex number typed array

    Example

    var arr = complexarray( [ 0.5, 0.5 ] );
    // returns <Complex128Array>

    Example

    var arr = complexarray( [ 5, -3 ], 'complex64' );
    // returns <Complex64Array>
  • Creates a complex number typed array.

    Parameters

    • buffer: ArrayBuffer

      underlying ArrayBuffer

    • Optional dtype: DataType

      data type (default: 'complex128')

    Returns ComplexTypedArray

    complex number typed array

    Example

    var ArrayBuffer = require( `@stdlib/array/buffer` );
    
    var buf = new ArrayBuffer( 32 );
    var arr = complexarray( buf );
    // returns <Complex128Array>

    Example

    var ArrayBuffer = require( `@stdlib/array/buffer` );
    
    var buf = new ArrayBuffer( 32 );
    var arr = complexarray( buf, 'complex64' );
    // returns <Complex64Array>
  • Creates a complex number typed array.

    Parameters

    • buffer: ArrayBuffer

      underlying ArrayBuffer

    • Optional byteOffset: undefined | number

      integer byte offset specifying the location of the first array element (default: 0)

    • Optional dtype: DataType

      data type (default: 'complex128')

    Returns ComplexTypedArray

    complex number typed array

    Example

    var ArrayBuffer = require( `@stdlib/array/buffer` );
    
    var buf = new ArrayBuffer( 32 );
    var arr = complexarray( buf, 16 );
    // returns <Complex128Array>

    Example

    var ArrayBuffer = require( `@stdlib/array/buffer` );
    
    var buf = new ArrayBuffer( 32 );
    var arr = complexarray( buf, 16, 'complex64' );
    // returns <Complex64Array>
  • Creates a complex number typed array.

    Parameters

    • buffer: ArrayBuffer

      underlying ArrayBuffer

    • Optional byteOffset: undefined | number

      integer byte offset specifying the location of the first array element (default: 0)

    • Optional length: undefined | number

      view length; if not provided, the view spans from the byteOffset to the end of the underlying ArrayBuffer

    • Optional dtype: DataType

      data type (default: 'complex128')

    Returns ComplexTypedArray

    complex number typed array

    Example

    var ArrayBuffer = require( `@stdlib/array/buffer` );
    
    var buf = new ArrayBuffer( 64 );
    var arr = complexarray( buf, 16, 2 );
    // returns <Complex128Array>

    Example

    var ArrayBuffer = require( `@stdlib/array/buffer` );
    
    var buf = new ArrayBuffer( 64 );
    var arr = complexarray( buf, 16, 2, 'complex64' );
    // returns <Complex64Array>