Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dirichlet

Package Overview
Dependencies
Maintainers
6
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dirichlet

Dirichlet/aliased sinc function

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
19
decreased by-26.92%
Maintainers
6
Weekly downloads
 
Created
Source

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

Keywords

FAQs

Package last updated on 15 May 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc