Utilities for diagnosing solver failures — primarily 'No solutions' and infeasible constraint issues. Use this namespace to inspect the raw equations and domain before/during a solve attempt.
Utilities for diagnosing solver failures — primarily 'No solutions' and infeasible constraint issues. Use this namespace to inspect the raw equations and domain before/during a solve attempt.
Coerces a filter value to a string predicate fn. Accepts: string (exact match), regex (re-find), set (membership), or fn (used as-is).
Coerces a filter value to a string predicate fn. Accepts: string (exact match), regex (re-find), set (membership), or fn (used as-is).
(domains-from f eval-with-rules-result)Returns domain entries from eval-with-rules result whose variable name matches f, sorted by name. f can be a string (exact), regex (re-find), set (membership), or fn.
Returns domain entries from eval-with-rules result whose variable name matches f, sorted by name. f can be a string (exact), regex (re-find), set (membership), or fn.
(eqs-from f eval-with-rules-result)Returns equations from eval-with-rules result that contain at least one variable name matching f. f can be a string (exact), regex (re-find), set (membership), or fn.
Returns equations from eval-with-rules result that contain at least one variable name matching f. f can be a string (exact), regex (re-find), set (membership), or fn.
(equations-with-assignments assignments x)Recursively substitutes known variable assignments into an equation (or nested equation structure). Negated vars (prefixed with '!') are flipped: 1→0, 0→1. Unresolved vars are left as-is.
Recursively substitutes known variable assignments into an equation (or nested equation structure). Negated vars (prefixed with '!') are flipped: 1→0, 0→1. Unresolved vars are left as-is.
(eval-only-if equations)Removes equations whose :only-if conditions evaluate to false (0). Call after equations-with-assignments so conditions have been substituted.
Removes equations whose :only-if conditions evaluate to false (0). Call after equations-with-assignments so conditions have been substituted.
(eval-with-rules {:keys [domain equations] :as rules} additional-assignments)Creates simplified sets of rules and constraints that can then be used with
qdebug/eqs-from and qdebug/domains-from.
Returns a map with stripped down domain, fixed :assignments, and simplified equations.
Creates simplified sets of rules and constraints that can then be used with qdebug/eqs-from and qdebug/domains-from. Returns a map with stripped down `domain`, fixed `:assignments`, and simplified equations.
(seq1? x)Returns true if x is a sequential collection with exactly one element.
Returns true if x is a sequential collection with exactly one element.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |