package containers-data

  1. Overview
  2. Docs
A set of advanced datatypes for containers

Install

dune-project
 Dependency

Authors

Maintainers

Sources

containers-3.18.tbz
sha256=52eeff91ce42b52305e6aaa8a58b88ce8f0a5a984199e59ca7e2fd9ebabe61d7
sha512=dc7337e6cbc9850542c7c9228d3bcb4e4add57a55e2a2992f21fb4761b3e10a68ef1d57ca37a7f5b303fc875fe3df5ecb69dbf2930bfcd1561ce03f7ae83e24b

doc/containers-data/CCGraph/Traverse/index.html

Module CCGraph.TraverseSource

Sourcetype ('v, 'e) path = ('v * 'e * 'v) list
Sourceval generic : tbl:'v set -> bag:'v bag -> graph:('v, 'e) t -> 'v iter -> 'v iter_once

Traversal of the given graph, starting from a sequence of vertices, using the given bag to choose the next vertex to explore. Each vertex is visited at most once.

Sourceval generic_tag : tags:'v tag_set -> bag:'v bag -> graph:('v, 'e) t -> 'v iter -> 'v iter_once

One-shot traversal of the graph using a tag set and the given bag.

Sourceval dfs : tbl:'v set -> graph:('v, 'e) t -> 'v iter -> 'v iter_once
Sourceval dfs_tag : tags:'v tag_set -> graph:('v, 'e) t -> 'v iter -> 'v iter_once
Sourceval bfs : tbl:'v set -> graph:('v, 'e) t -> 'v iter -> 'v iter_once
Sourceval bfs_tag : tags:'v tag_set -> graph:('v, 'e) t -> 'v iter -> 'v iter_once
Sourceval dijkstra : tbl:'v set -> ?dist:('e -> int) -> graph:('v, 'e) t -> 'v iter -> ('v * int * ('v, 'e) path) iter_once

Dijkstra algorithm, traverses a graph in increasing distance order. Yields each vertex paired with its distance to the set of initial vertices (the smallest distance needed to reach the node from the initial vertices).

  • parameter dist

    distance from origin of the edge to destination, must be strictly positive. Default is 1 for every edge.

Sourceval dijkstra_tag : ?dist:('e -> int) -> tags:'v tag_set -> graph:('v, 'e) t -> 'v iter -> ('v * int * ('v, 'e) path) iter_once
Sourcemodule Event : sig ... end