Compute the inverse of a triangular matrix.
var dtrti2 = require( '@stdlib/lapack/base/dtrti2' );
Computes the inverse of a triangular matrix.
var Float64Array = require( '@stdlib/array/float64' );
var A = new Float64Array( [ 1.0, 2.0, 0.0, 4.0 ] );
dtrti2( 'row-major', 'upper', 'non-unit', 2, A, 2 );
// A => <Float64Array>[ 1.0, -0.5, 0.0, 0.25 ]
The function has the following parameters:
- order: storage layout.
- uplo: specifies whether to copy the upper or lower triangular/trapezoidal part of a matrix
A
. - diag: specifies whether or not
A
is unit triangular. - N: order of matrix
A
. - A: input
Float64Array
. - LDA: stride of the first dimension of
A
(a.k.a., leading dimension of the matrixA
).
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 A0 = new Float64Array( [ 0.0, 1.0, 2.0, 0.0, 4.0 ] );
// Create offset views...
var A1 = new Float64Array( A0.buffer, A0.BYTES_PER_ELEMENT*1 ); // start at 2nd element
dtrti2( 'row-major', 'upper', 'non-unit', 2, A1, 2 );
// A0 => <Float64Array>[ 0.0, 1.0, -0.5, 0.0, 0.25 ]
Computes the inverse of a triangular matrix using alternative indexing semantics.
var Float64Array = require( '@stdlib/array/float64' );
var A = new Float64Array( [ 1.0, 2.0, 0.0, 4.0 ] );
dtrti2.ndarray( 'upper', 'non-unit', 2, A, 2, 1, 0 );
// A => <Float64Array>[ 1.0, -0.5, 0.0, 0.25 ]
The function has the following parameters:
- order: storage layout.
- uplo: specifies whether to copy the upper or lower triangular/trapezoidal part of a matrix
A
. - diag: specifies whether or not
A
is unit triangular. - N: order of matrix
A
. - A: input
Float64Array
. - sa1: stride of the first dimension of
A
. - sa2: stride of the second dimension of
A
. - oa: starting index for
A
.
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 A = new Float64Array( [ 0.0, 0.0, 1.0, 2.0, 0.0, 4.0 ] );
dtrti2.ndarray( 'upper', 'non-unit', 2, A, 2, 1, 2 );
// A => <Float64Array>[ 0.0, 0.0, 1.0, -0.5, 0.0, 0.25 ]
var Float64Array = require( '@stdlib/array/float64' );
var dtrti2 = require( '@stdlib/lapack/base/dtrti2' );
var A = new Float64Array( [ 1.0, 2.0, 0.0, 4.0 ] );
dtrti2( 'row-major', 'upper', 'non-unit', 2, A, 2 );
console.log( A );
TODO
TODO.
TODO
TODO
TODO
TODO