API Reference Fixpoint v0.10.2
Modules
Solver API.
Kuhn's algorithm to find maximum matching in bipartite graph. https://cp-algorithms.com/graph/kuhn_maximum_bipartite_matching.html
Absolute value constraint. Costraints y to be |x|
Constraints c
to be the number of occurencies of y
in array
.
Element constrains variables y and z such that: array[x] = y
Element2d constrains variables z, x and y such that: array2d[x][y] = z
ElementVar constrains list of variables array
, variables x
and y
such that:
array[x] = y
Half-reified (implication) constraint. Extends constraint C to constraint R(C, b), where 'b' is a boolean variable, and b is fixed to true if C holds
Constraints two arrays of variables f
and inv_f
to represent an inverse function.
That is, for all i = 1..n, where n is a size of x:
inv_f[f[i]] == i
and:
f[inv_f[i]] == i
Inverse half-reified (inverse implication) constraint. Extends constraint C to constraint R(C, b), where 'b' is a boolean variable, and C holds if b is fixed to true.
ElementVar constrains list of variables array
, variables x
and y
such that:
array[x] = y
Reified (equivalence) constraint. Extends constraint C to constraint R(C, b), where 'b' is a boolean variable, and C holds iff b is fixed to true
Constraint store is a key-value store, where key
is a variable id,
and value
is a implementation-dependent structure that allows to
update and keep track of variables' domains.
The 'knapsack' problem is mathematically formulated in the following way. Given n items to choose from, each item i ∈ 0 ...n − 1 has a value v[i] and a weight w[i]. The knapsack has a limited capacity K. Let x[i] be a variable that is 1 if you choose to take item i and 0 if you leave item i behind. Then the knapsack problem is formalized as the following optimization problem
The classic "cryptarithmetic" (https://en.wikipedia.org/wiki/Verbal_arithmetic) problem. Solve the following (each letter is a separate digit)
The domain-consistent propagator for AllDifferent constraint, based on bipartite maximum matching.
The forward-checking propagator for AllDifferent constraint.
The propagator for 'circuit' constraint.
The constraint graph connects propagators and their variables. The edge between a propagator and a variable represents a notification the propagator receives upon variable's domain change.
The propagator for Element2D constraint. array2d[row_index][col_index] = value
The propagator for Element constraint. array[index] = value, where array is an array of variables.
The propagator for 'or' constraint. Takes the list of boolean variables. Constraints to have at least one variable to be resolved to true.
The propagator for reification constraints.
The propagator for Sum constraint. Sum(y, x) constrains y to be a sum of variables in the list x.
The propagator for Sum constraint. Sum(y, x) constrains y to be a sum of variables in the list x.
Bisect the domain.
Accumulated failure count variable selector (https://www.gecode.org/doc-latest/MPG.pdf, p.8.5.2)
Action (activity-based) variable selector (https://www.gecode.org/doc-latest/MPG.pdf, p.8.5.3)
Conflict-history based variable selector (https://www.gecode.org/doc-latest/MPG.pdf, p.8.5.4)
Computation space. The concept is taken from Chapter 12, "Concepts, Techniques, and Models of Computer Programming" by Peter Van Roy and Seif Haridi.
Algorithms for finding maximum matching on graphs.
View is a variable with attached mapper
function.
mapper
is a bijection of the domain of original variable to the domain of the view