Liking cljdoc? Tell your friends :D

me.lomin.sinho.bipartite

Bipartite-matching primitives for structural subset reasoning.

Implements Kuhn's augmenting-paths algorithm — a graph traversal that finds the maximum number of schema clauses that can be paired without reuse. Used by me.lomin.sinho.matcher to check structural exhaustiveness in set and map matching.

This is purely graph-algorithmic and is not coinductive in the type-theory sense.

Bipartite-matching primitives for structural subset reasoning.

Implements Kuhn's augmenting-paths algorithm — a graph traversal that
finds the maximum number of schema clauses that can be paired without
reuse. Used by me.lomin.sinho.matcher to check structural exhaustiveness
in set and map matching.

This is purely graph-algorithmic and is not coinductive in the
type-theory sense.
raw docstring

build-cost-matrixclj/s

(build-cost-matrix cost-fn m n)

Build adjacency data for bipartite matching. Returns {:zero-adj (fn [i] -> seq of j with cost 0)}.

Build adjacency data for bipartite matching.
Returns {:zero-adj (fn [i] -> seq of j with cost 0)}.
sourceraw docstring

greedy-assignmentclj/s

(greedy-assignment sorted-pairs)

Greedy bipartite assignment from sorted pairs.

Greedy bipartite assignment from sorted pairs.
sourceraw docstring

max-bipartite-matchingclj/s

(max-bipartite-matching adj-fn m)

Find maximum bipartite matching, return the assignment map. adj-fn: (fn [left-idx]) -> seq of right indices with cost 0. m: number of left nodes. Returns: map of left-idx -> right-idx for matched pairs.

Find maximum bipartite matching, return the assignment map.
adj-fn: (fn [left-idx]) -> seq of right indices with cost 0.
m: number of left nodes.
Returns: map of left-idx -> right-idx for matched pairs.
sourceraw docstring

max-bipartite-matching-countclj/s

(max-bipartite-matching-count adj-fn m)

Find maximum bipartite matching size using augmenting paths. adj-fn: (fn [left-idx]) -> seq of right indices with cost 0. m: number of left nodes.

Find maximum bipartite matching size using augmenting paths.
adj-fn: (fn [left-idx]) -> seq of right indices with cost 0.
m: number of left nodes.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close