Visit

interface Visit<T, S>

One step of a graph traversal, as produced by a SearchStrategy: the node reached by the traversal, paired with the traversal's state at the time it was reached (e.g. the current depth for it.unibo.tuprolog.utils.graphs.BreadthFirst/it.unibo.tuprolog.utils.graphs.DepthFirst, both of which use an Int state). Graph.asSequence (and Graph.asIterable) yield a stream of Visits, one per traversed node. Build one via Visit.of, or the visitOf top-level shorthand.

Type Parameters

T

is the type of the payload carried by the visited node

S

is the type of the traversal-specific state carried alongside node

Inheritors

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
abstract val node: Node<T>

The node reached by this step of the traversal.

Link copied to clipboard
abstract val state: S

The traversal-specific state associated with reaching node (e.g. the depth at which it was found).