Skip to main content

ArrowGraph<N>

An ArrowGraph is a directed Graph where the edges have no values. This structure is useful for situations in which elements of the same type can have relations to each other. The relation is either there or not there, and is is directed, so A -> B does not imply that B -> A.

info

Like all Graph implementations, these graphs can contain cycles and isolated nodes are allowed.

The @rimbu/core package exports the following immutable ArrowGraph TypeScript types:

NameDescription
ArrowGraph<N>a generic directed graph with nodes of type N
ArrowGraphHashed<N>a directed graph with hashed nodes of type N
ArrowGraphSorted<N>a directed graph with sorted nodes of type N

Usage

Creation

Open file below in new window with full type-check

Query

Open file below in new window with full type-check

Motivation

Open file below in new window with full type-check

Builder

Open file below in new window with full type-check