npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@stdlib/lapack-base-dpttrf

v0.1.0

Published

Compute the `L * D * L^T` factorization of a real symmetric positive definite tridiagonal matrix `A`.

Downloads

25

Readme

dpttrf

NPM version Build Status Coverage Status

Compute the L * D * L^T factorization of a real symmetric positive definite tridiagonal matrix A.

Usage

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

dpttrf( N, D, E )

Computes the L * D * L^T factorization of a real symmetric positive definite tridiagonal matrix A.

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

var D = new Float64Array( [ 4.0, 5.0, 6.0 ] );
var E = new Float64Array( [ 1.0, 2.0 ] );

dpttrf( 3, D, E );
// D => <Float64Array>[ 4, 4.75, ~5.15789 ]
// E => <Float64Array>[ 0.25, ~0.4210 ]

The function has the following parameters:

  • N: order of matrix A.
  • D: the N diagonal elements of A as a Float64Array.
  • E: the N-1 subdiagonal elements of A as a Float64Array.

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 D0 = new Float64Array( [ 0.0, 4.0, 5.0, 6.0 ] );
var E0 = new Float64Array( [ 0.0, 1.0, 2.0 ] );

// Create offset views...
var D1 = new Float64Array( D0.buffer, D0.BYTES_PER_ELEMENT*1 ); // start at 2nd element
var E1 = new Float64Array( E0.buffer, E0.BYTES_PER_ELEMENT*1 ); // start at 2nd element

dpttrf( 3, D1, E1 );
// D0 => <Float64Array>[ 0.0, 4.0, 4.75, ~5.15789 ]
// E0 => <Float64Array>[ 0.0, 0.25, ~0.4210 ]

dpttrf.ndarray( N, D, strideD, offsetD, E, strideE, offsetE )

Computes the L * D * L^T factorization of a real symmetric positive definite tridiagonal matrix A using alternative indexing semantics.

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

var D = new Float64Array( [ 4.0, 5.0, 6.0 ] );
var E = new Float64Array( [ 1.0, 2.0 ] );

dpttrf.ndarray( 3, D, 1, 0, E, 1, 0 );
// D => <Float64Array>[ 4, 4.75, ~5.15789 ]
// E => <Float64Array>[ 0.25, ~0.4210 ]

The function has the following additional parameters:

  • strideD: stride length for D.
  • offsetD: starting index for D.
  • strideE: stride length for E.
  • offsetE: starting index for E.

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 D = new Float64Array( [ 0.0, 4.0, 5.0, 6.0 ] );
var E = new Float64Array( [ 0.0, 1.0, 2.0 ] );

dpttrf.ndarray( 3, D, 1, 1, E, 1, 1 );
// D => <Float64Array>[ 0.0, 4.0, 4.75, ~5.15789 ]
// E => <Float64Array>[ 0.0, 0.25, ~0.4210 ]

Notes

  • Both functions mutate the input arrays D and E.

  • Both functions return a status code indicating success or failure. A status code indicates the following conditions:

    • 0: factorization was successful.
    • <0: the k-th argument had an illegal value, where -k equals the status code value.
    • 0 < k < N: the leading principal minor of order k is not positive and factorization could not be completed, where k equals the status code value.
    • N: the leading principal minor of order N is not positive, and factorization was completed.
  • dpttrf() corresponds to the LAPACK routine dpttrf.

Examples

var discreteUniform = require( '@stdlib/random-array-discrete-uniform' );
var dpttrf = require( '@stdlib/lapack-base-dpttrf' );

var opts = {
    'dtype': 'float64'
};
var D = discreteUniform( 5, 1, 5, opts );
console.log( D );

var E = discreteUniform( D.length-1, 1, 5, opts );
console.log( E );

// Perform the `L * D * L^T` factorization:
var info = dpttrf( D.length, D, E );
console.log( D );
console.log( E );
console.log( info );

C APIs

Installation

npm install @stdlib/lapack-base-dpttrf

Usage

TODO

TODO

TODO.

TODO

TODO

TODO

Examples

TODO

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

Copyright © 2016-2024. The Stdlib Authors.