Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/heap-data-structure/d-ary-heap
:octopus: d-ary heap data structure library for JavaScript
https://github.com/heap-data-structure/d-ary-heap
agpl binary-heap computer-science d-ary-heap data-structures heaps javascript worst-case
Last synced: 2 months ago
JSON representation
:octopus: d-ary heap data structure library for JavaScript
- Host: GitHub
- URL: https://github.com/heap-data-structure/d-ary-heap
- Owner: heap-data-structure
- License: agpl-3.0
- Created: 2015-05-28T10:17:03.000Z (over 9 years ago)
- Default Branch: main
- Last Pushed: 2024-10-11T01:38:55.000Z (3 months ago)
- Last Synced: 2024-10-14T09:16:57.589Z (3 months ago)
- Topics: agpl, binary-heap, computer-science, d-ary-heap, data-structures, heaps, javascript, worst-case
- Language: JavaScript
- Homepage: https://heap-data-structure.github.io/d-ary-heap
- Size: 4.81 MB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
:octopus:
[@heap-data-structure/d-ary-heap](https://heap-data-structure.github.io/d-ary-heap)
==
`d`-ary heap data structure library for JavaScript.
See [docs](https://heap-data-structure.github.io/d-ary-heap).
Parent is [@heap-data-structure](https://github.com/heap-data-structure/about).```js
import {_calloc} from '@array-like/alloc';
const calloc = _calloc(Int32Array);
const array = calloc(10000);import {iota} from '@array-like/fill';
iota(array, 0, array.length, 0);import {shuffle} from '@randomized/random';
shuffle(array, 0, array.length);import {swap} from '@array-like/swap';
import {increasing} from '@total-order/primitive';
import {makeheap} from '@heap-data-structure/d-ary-heap';
makeheap( 2 , increasing , swap , array , 0 , array.length ) ;
// ^ ^ ^ ^ ^ ^
// arity ordering swap input [left , right[
// method
//import {DAryHeap} from '@heap-data-structure/d-ary-heap';
let heap = new DAryHeap( 2 , increasing ) ;
// ^ ^
// arity ordering
//
```[![License](https://img.shields.io/github/license/heap-data-structure/d-ary-heap.svg)](https://raw.githubusercontent.com/heap-data-structure/d-ary-heap/main/LICENSE)
[![Version](https://img.shields.io/npm/v/@heap-data-structure/d-ary-heap.svg)](https://www.npmjs.org/package/@heap-data-structure/d-ary-heap)
[![Tests](https://img.shields.io/github/actions/workflow/status/heap-data-structure/d-ary-heap/ci.yml?branch=main&event=push&label=tests)](https://github.com/heap-data-structure/d-ary-heap/actions/workflows/ci.yml?query=branch:main)
[![Dependencies](https://img.shields.io/librariesio/github/heap-data-structure/d-ary-heap.svg)](https://github.com/heap-data-structure/d-ary-heap/network/dependencies)
[![GitHub issues](https://img.shields.io/github/issues/heap-data-structure/d-ary-heap.svg)](https://github.com/heap-data-structure/d-ary-heap/issues)
[![Downloads](https://img.shields.io/npm/dm/@heap-data-structure/d-ary-heap.svg)](https://www.npmjs.org/package/@heap-data-structure/d-ary-heap)[![Code issues](https://img.shields.io/codeclimate/issues/heap-data-structure/d-ary-heap.svg)](https://codeclimate.com/github/heap-data-structure/d-ary-heap/issues)
[![Code maintainability](https://img.shields.io/codeclimate/maintainability/heap-data-structure/d-ary-heap.svg)](https://codeclimate.com/github/heap-data-structure/d-ary-heap/trends/churn)
[![Code coverage (cov)](https://img.shields.io/codecov/c/gh/heap-data-structure/d-ary-heap/main.svg)](https://codecov.io/gh/heap-data-structure/d-ary-heap)
[![Code technical debt](https://img.shields.io/codeclimate/tech-debt/heap-data-structure/d-ary-heap.svg)](https://codeclimate.com/github/heap-data-structure/d-ary-heap/trends/technical_debt)
[![Documentation](https://heap-data-structure.github.io/d-ary-heap/badge.svg)](https://heap-data-structure.github.io/d-ary-heap/source.html)
[![Package size](https://img.shields.io/bundlephobia/minzip/@heap-data-structure/d-ary-heap)](https://bundlephobia.com/result?p=@heap-data-structure/d-ary-heap)## :newspaper: Description
This package contains a `d`-ary heap implementation that can be parametrized
with any `d > 0`.