# infer-partial-order

> infer the partial order of a set from a set of examples.

Latest version **0.1.1** (published 2014-06-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install infer-partial-order
pnpm add infer-partial-order
yarn add infer-partial-order
bun add infer-partial-order
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2014-06-05 |
| First published | 2014-06-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Dominic Tarr |
| Maintainers | dominictarr |

## Links

- npm: https://www.npmjs.com/package/infer-partial-order
- Repository: https://github.com/dominictarr/infer-partial-order
- Issues: https://github.com/dominictarr/infer-partial-order/issues
- npm.io page: https://npm.io/package/infer-partial-order

## Recent versions

- 0.1.1 (latest) — 2014-06-05
- 0.1.0 — 2014-06-05
- 0.0.0 — 2014-06-05

## README

# infer-partial-order

infer the partial order of a set from a set of examples.

say we have two sequences `A, B, C` and `B, A, C`.
Here `A < C` and `B < C`, but sometimes `B == A`.
This relationship is obvious, because there are only 3 items,
but as the number of items increase, it's much less clear.

## Example

represent a partial ordering like this:
``` js
var infer = require('infer-partial-order')

infer([ [A, B, C], [B, A, C] ])

=> {
  A:[],
  B:[],
  C:[A, B]
}
```

Each key maps to the list of items that always come before it.

for more complex cases, you might want to use the canonical mode,
it strips out items that are indirectly lesser than a given item.
This is still enough information to build a graph of the order
relationships.
``` js
var infer = require('infer-partial-order')

infer([ [A, B, C, D, E], [B, A, D, C, E], [A, B, C, D, E])

=> {
  A:[],
  B:[],
  C:[A, B],
  D:[A, B],
  E:[C, D]
}
```



## License

MIT

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