CPSolver.Variable.View (Fixpoint v0.10.2)

View is a variable with attached mapper function. mapper is a bijection of the domain of original variable to the domain of the view

Summary

Functions

Configures (ax + b) view on variable x. mapper_fun maps view values back to the source variable; returns nil if there is no mapping.

Types

t()

@type t() :: %CPSolver.Variable.View{
  mapper: function(),
  variable: CPSolver.Variable.t()
}

Functions

contains?(view, value)

domain(view)

fix(view, value)

fixed?(view)

max(view)

min(view)

new(variable, a, b)

@spec new(CPSolver.Variable.t(), neg_integer() | pos_integer(), integer()) :: t()

Configures (ax + b) view on variable x. mapper_fun maps view values back to the source variable; returns nil if there is no mapping.

remove(view, value)

removeAbove(view, value)

removeBelow(view, value)

size(view)