# dirichlet

> Dirichlet/aliased sinc function

Latest version **1.0.1** (published 2015-05-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install dirichlet
pnpm add dirichlet
yarn add dirichlet
bun add dirichlet
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2015-05-15 |
| First published | 2014-01-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Author | Mikola Lysenko |
| Maintainers | mikolalysenko, rreusser, planeshifter, jaspervdg, hughsk, substack |
| Keywords | dirichlet, aliased, sinc, rect, fourier, transform, lanczos |

## Links

- npm: https://www.npmjs.com/package/dirichlet
- Repository: https://github.com/mikolalysenko/dirichlet
- Issues: https://github.com/mikolalysenko/dirichlet/issues
- npm.io page: https://npm.io/package/dirichlet

## Dependencies (1)

- [almost-equal](https://npm.io/package/almost-equal.md) ^1.0.0

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2015-05-15
- 1.0.0 — 2015-05-04
- 0.0.0 — 2014-01-31

## 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

```javascript
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

---
_Source: https://npm.io/package/dirichlet · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
