Skip to content

Latest commit

 

History

History
224 lines (133 loc) · 5.3 KB

File metadata and controls

224 lines (133 loc) · 5.3 KB

dlasv2

Compute singular value decomposition of a 2x2 triangular matrix.

Usage

var dlasv2 = require( '@stdlib/lapack/base/dlasv2' );

dlasv2( F, G, H, out )

Computes singular value decomposition of a 2x2 triangular matrix.

var Float64Array = require( '@stdlib/array/float64' );
var out = new Float64Array( 6 );

out = dlasv2( 2.0, 3.0, 4.0, out );
// out => <Float64Array>[ 1.5513263285176897, 5.1568776039816795, 0.9664996487646696, 0.25666793515702424, 0.7496781758158659, 0.6618025632357402 ]

The function has the following parameters:

  • F: the (0,0) element of matrix.
  • G: the (0,1) element of matrix.
  • H: the (1,1) element of matrix.
  • out: Float64Array output array containing SSMIN, SSMAX, SNR, CSR, SNL, and CSL respectively.

Note that indexing is relative to the first index. To introduce an offset, use typed array views.

var Float64Array = require( '@stdlib/array/float64' );

// Initial arrays...
var OUT0 = new Float64Array( [ 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );

// Create offset views...
var OUT1 = new Float64Array( OUT0.buffer, OUT0.BYTES_PER_ELEMENT*1 ); // start at 2nd element

dlasv2( 2.0, 3.0, 4.0, OUT1 );
// OUT0 => <Float64Array>[ 0.0, 1.5513263285176897, 5.1568776039816795, 0.9664996487646696, 0.25666793515702424, 0.7496781758158659, 0.6618025632357402 ]

dlasv2.ndarray( F, G, H, out, strideOut, offsetOut )

Computes singular value decomposition of a 2x2 triangular matrix using alternative indexing semantics.

var Float64Array = require( '@stdlib/array/float64' );
var out = new Float64Array( 6 );

out = dlasv2.ndarray( 2.0, 3.0, 4.0, out, 1, 0 );
// out => <Float64Array>[ 1.5513263285176897, 5.1568776039816795, 0.9664996487646696, 0.25666793515702424, 0.7496781758158659, 0.6618025632357402 ]

The function has the following additional parameters:

  • strideOut: stride length for Out.
  • offsetOut: starting index for Out.

While typed array views mandate a view offset based on the underlying buffer, the offset parameters support indexing semantics based on starting indices. For example,

var Float64Array = require( '@stdlib/array/float64' );
var out = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] );

out = dlasv2.ndarray( 2.0, 3.0, 4.0, out, 1, 1 );
// out => <Float64Array>[ 0.0, 1.5513263285176897, 5.1568776039816795, 0.9664996487646696, 0.25666793515702424, 0.7496781758158659, 0.6618025632357402 ]

Notes

Examples

var Float64Array = require( '@stdlib/array/float64' );
var dlasv2 = require( '@stdlib/lapack/base/dlasv2' );

var out = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );

out = dlasv2( 2.0, 3.0, 4.0, out );
console.log( out );

C APIs

Usage

TODO

TODO

TODO.

TODO

TODO

TODO

Examples

TODO