Skip to main content
Module

x/structurae/index.ts

Data structures for high-performance JavaScript applications.
Latest
import * as mod from "https://deno.land/x/structurae@4.0.1/index.ts";

Classes

Implements the Adjacency Matrix structure for unweighted directed graphs.

Implements the Adjacency Matrix data structure for unweighted undirected graphs.

Implements a grid or 2D matrix of bits.

Extends Array to implement the Binary Heap data structure. // TODO (docs) document priority queue operations // todo add heapsort?

Uses Uint32Array as an array or vector of bits. It's a simpler version of BitField that only sets and checks individual bits.

Implements a fast algorithm to manage availability of objects in an object pool using a BitArray.

A bit array that supports constant time rank and O(logN) time select operations.

Extends Array to handle sorted data.

Functions

Creates an Adjacency List class extending a given TypedArray class.

Creates an Adjacency Matrix class extending a given TypedArray class.

Creates an Adjacency Matrix class extending a given TypedArray class.

Creates a BigBitField class with a given schema. BigBitField uses bigints as bitfields to store and operate on data using bitwise operations.

Creates a BitField class from with a given schema. BitField uses numbers as bitfields to store and operate on data using bitwise operations. The size of the field is limited to 31 bits, for a larger bitfields consider using BigBitField class that uses bigints instead.

Returns the minimum amount of bits necessary to hold a given number.

Returns the index of the Least Significant Bit in a number.

Creates a Graph class extending a given adjacency structure.

Creates a Grid class extending a given Array-like class.

Counts set bits in a given number.

Creates a SymmetricGrid class extending a given Array-like class.