Skip to main content
Module

x/ssds/mod.ts>ArrayHeapPQ#_isValidIndex

Some Specialized Data Structures for Deno.
Latest
method ArrayHeapPQ.prototype._isValidIndex
import { ArrayHeapPQ } from "https://deno.land/x/ssds@0.2.0/mod.ts";

Checks whether an index is acceptable or not.

Checks to verify that:

  • The index is within the bounds of the list
  • The reference at the index is not 'null'

Parameters

index: number

The index to check acceptability of.

Returns

boolean

'true' if the index is acceptable; 'false' otherwise.