@partial-order/poset

6.0.0 • Public • Published

🕸️ @partial-order/poset

Distributive lattice of the divisors of 120
User:David_Eppstein / Public Domain

Partially ordered sets algorithms for JavaScript. See docs. Parent is js-algorithms.

import {minima} from '@partial-order/poset';
import {increasing} from '@total-order/primitive';

const a = [4, 12, 2, 6, 3];

const divides = (a, b) => b % a === 0;
const n = minima(divides, a, 0, a.length); // 2
a.slice(0, n).sort(increasing); // 2 3

const norel = (_a, _b) => false;
minima(norel, a, 0, a.length); // a.length

License Version Tests Dependencies Dev dependencies GitHub issues Downloads

Code issues Code maintainability Code coverage (cov) Code technical debt Documentation Package size

/@partial-order/poset/

    Package Sidebar

    Install

    npm i @partial-order/poset

    Weekly Downloads

    1

    Version

    6.0.0

    License

    AGPL-3.0

    Unpacked Size

    527 kB

    Total Files

    14

    Last publish

    Collaborators

    • raskat
    • aureooms