JSPM

dirichlet

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 32
  • Score
    100M100P100Q77072F
  • License MIT

Dirichlet/aliased sinc function

Package Exports

  • dirichlet

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 (dirichlet) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

dirichlet

The Dirichlet (or aliased sinc) function. Defined to be,

                  { 1                                   if x % n === 0
dirichlet(n, x) = {           
                  { sin(pi * x) / (n * sin(pi * x / n)) otherwise

Alternatively, it is the inverse Fourier transform of the discrete rectangle function.

Example

var dirichlet = require("dirichlet")
var x = require("iota-array")(200)
var y = x.map(dirichlet.bind(null, 100))

console.log(x, y)

Install

npm install dirichlet

API

require("dirichlet")(n, x)

Returns the value of the dirichlet function

  • n is the number of samples
  • x is the point at which the dirichlet function is evaluated

Returns The value of the dirichlet function at x

Credits

(c) 2014 Mikola Lysenko. MIT License