Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "blas/gswap/docs/types/index.d"

Index

Functions

Functions

gswap

  • Interchanges two vectors.

    Notes

    • In general, for best performance, especially for large vectors, provide 1-dimensional ndarrays whose underlying data type is either float64 or float32.
    throws

    first argument must be either an array-like object or a 1-dimensional ndarray

    throws

    second argument must be either an array-like object or a 1-dimensional ndarray

    throws

    input arrays must be the same length

    Parameters

    Returns ndarray | ArrayLike < any >

    y

    Example

    var x = [ 4.0, 2.0, -3.0, 5.0, -1.0 ];
    var y = [ 2.0, 6.0, -1.0, -4.0, 8.0 ];
    
    gswap( x, y );
    // x => [ 2.0, 6.0, -1.0, -4.0, 8.0 ]
    // y => [ 4.0, 2.0, -3.0, 5.0, -1.0 ]