Skip to main content
Module

x/live/utils/stat.ts>Median

Git-based Visual CMS for Deno, </> htmx and Tailwind apps. Deploy on any Deno-compatible host.
Very Popular
Go to Latest
class Median
import { Median } from "https://deno.land/x/live@1.77.0/utils/stat.ts";

Constructors

new
Median(maxSize?: number)

Properties

private
maxHeap: MaxHeap
private
minHeap: MinHeap
private
removeCount: { [key: number]: number; }
private
values: number[]

Methods

private
addValue(value: number): void
private
calculateMedian(): number
private
removeValue(value: number): void
add(value: number): void
get(): number