Package-level declarations

Types

Link copied to clipboard
interface Graph<T>

A generic, immutable graph structure.

Link copied to clipboard
data class PersistentDirectedGraph<T>(val vertices: PersistentSet<T> = persistentSetOf(), adjacency: PersistentMap<T, PersistentSet<T>> = persistentMapOf()) : Graph<T>

An immutable directed graph using persistent data structures. Updates return new instances that share structure with the original, providing O(log n) time complexity per operation.

Link copied to clipboard
data class VisitableOnceGraph<T>(graph: Graph<T>, visited: Set<T> = emptySet()) : Graph<T>

An immutable Graph decorator that allows visiting each vertex only once.

Properties

Link copied to clipboard

Converts a Graph into a VisitableOnceGraph which allows visiting each vertex only once.

Functions

Link copied to clipboard