JSPM

@stdlib/math-base-tools-hermitepoly

0.0.5
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 18
  • Score
    100M100P100Q63417F
  • License Apache-2.0

Evaluate a physicist's Hermite polynomial.

Package Exports

  • @stdlib/math-base-tools-hermitepoly

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@stdlib/math-base-tools-hermitepoly) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Physicist's Hermite Polynomial

NPM version Build Status Coverage Status dependencies

Evaluate a physicist's Hermite polynomial.

The physicist's Hermite polynomials are given by

Equation for physicist's Hermite polynomials.

Installation

npm install @stdlib/math-base-tools-hermitepoly

Usage

var hermitepoly = require( '@stdlib/math-base-tools-hermitepoly' );

hermitepoly( n, x )

Evaluates a physicist's Hermite polynomial of degree n.

var v = hermitepoly( 1, 1.0 );
// returns 2.0

v = hermitepoly( 1, 0.5 );
// returns ~1.0

v = hermitepoly( -1, 0.5 );
// returns NaN

v = hermitepoly( 0, 0.5 );
// returns 1.0

v = hermitepoly( 2, 0.5 );
// returns -1.0

hermitepoly.factory( n )

Returns a function for evaluating a physicist's Hermite polynomial of degree n.

var polyval = hermitepoly.factory( 2 );

var v = polyval( 0.5 );
// returns -1.0

Examples

var randu = require( '@stdlib/random-base-randu');
var hermitepoly = require( '@stdlib/math-base-tools-hermitepoly' );

var x;
var y;
var i;
var j;

for ( i = 0; i < 100; i++ ) {
    x = (randu()*100.0) - 50.0;
    for ( j = 1; j < 3; j++ ) {
        y = hermitepoly( j, x );
        console.log( 'H_%d( %d ) = %d', j, x.toFixed( 3 ), y.toFixed( 3 ) );
    }
}

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 © 2016-2021. The Stdlib Authors.