Liking cljdoc? Tell your friends :D

advent-utils.graph


adjacenciesclj

(adjacencies graph)
source

all-pathsclj

(all-paths g v & {:keys [excludes]})

Find all the paths from a vertex reaching a leaf vertex or a vertex with more than one untraversed edges

Find all the paths from a vertex reaching a leaf vertex or a vertex with more than one
untraversed edges
sourceraw docstring

degreeclj

(degree g v)

The degree of a vertex is the number of edges it has

The degree of a vertex is the number of edges it has
sourceraw docstring

dijkstraclj

(dijkstra graph start finish & {:keys [limit]})

Executes Dijkstra's algorithm to identify the shortest path between the start and finish vertices

Executes Dijkstra's algorithm to identify the shortest path between the start and finish vertices
sourceraw docstring

dijkstra-retraceclj

(dijkstra-retrace prev-steps finish)
source

dijkstra-updateclj

(dijkstra-update graph vertex {:keys [dist prev queue] :as state} neighbor)
source

entries-in-setclj

(entries-in-set s m)
source

entries-not-in-setclj

(entries-not-in-set s m)
source

Graphcljprotocol

distanceclj

(distance this v1 v2)

The distance (or edge weight) between two vertices

The distance (or edge weight) between two vertices

edgesclj

(edges this v)

A collection of the edges for the given vertex in the graph

A collection of the edges for the given vertex in the graph

rewired-without-vertexclj

(rewired-without-vertex this v)

Produces a new graph, re-wired to preserve the transitive edges through the removed vertex

Produces a new graph, re-wired to preserve the transitive edges through the removed vertex

vertexclj

(vertex this v)

Any data/information/label associated with the given vertex in the graph

Any data/information/label associated with the given vertex in the graph

verticesclj

(vertices this)

A collection of all the vertices in the graph

A collection of all the vertices in the graph

without-vertexclj

(without-vertex this v)

Produces a new graph with the vertex removed

Produces a new graph with the vertex removed
source

junction?clj

(junction? g v)

Whether a vertex is a junction (meaning that it has more than two edges)

Whether a vertex is a junction (meaning that it has more than two edges)
sourceraw docstring

LabeledMapGraphclj

source

leaf?clj

(leaf? g v)

Whether a vertex is a leaf vertex (meaning that it has at most one edge)

Whether a vertex is a leaf vertex (meaning that it has at most one edge)
sourceraw docstring

MapGraphclj

source

path-distanceclj

(path-distance g path)

Computes the distance along a path (an ordered collection of vertices)

Computes the distance along a path (an ordered collection of vertices)
sourceraw docstring

prunedclj

(pruned graph exclude-set)

Prunes the single branches from a graph, excluding any vertices in the exclude-set

Prunes the single branches from a graph, excluding any vertices in the exclude-set
sourceraw docstring

reachableclj

(reachable graph start stop-cond)
source

shortest-distanceclj

(shortest-distance graph start finish)
source

single-pathclj

(single-path g v & {:keys [exclude]})

Return the only possible path traversal from the start vertex (presumed to be a leaf vertex) until reaching another leaf vertex or a vertex with more than one un-traversed edge

Return the only possible path traversal from the start vertex (presumed to be a leaf vertex)
until reaching another leaf vertex or a vertex with more than one un-traversed edge
sourceraw docstring

single-path-2clj

(single-path-2 g v s stop-at)

Return the only possible path traversal from the start vertex (presumed to be a leaf vertex) until reaching another leaf vertex or a vertex with more than one un-traversed edge

Return the only possible path traversal from the start vertex (presumed to be a leaf vertex)
until reaching another leaf vertex or a vertex with more than one un-traversed edge
sourceraw docstring

summarize-pathclj

(summarize-path g path)
source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close