Skip to main content
Module

x/ssds/mod.ts>ArrayHeapPQ#_getRelationIndex

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

Gets the index of the specified relation.

Is not safe (i.e. might cause an error by trying to access an index not present in the list of PQNodes). If the given Relation is invalid, returns 0.

Parameters

index: number

The index whose relation's index is to be queried.

relation: Relation

The relation to be queried about.

Returns

number

The index of the specified relation of the given index.