Next: Lat-Flat, Previous: Lat-Card, Up: Lattice functors
The domain lattice encodes constants from a finite domain as integers.
Before encoding, the list of atoms is sorted lexically using
Value.'<'
.
The select function uses the selection constraint for Oz finite domain variables to select one value from the list of values.
The make variable function creates an Oz finite domain variable ranging over the domain of the lattice.
The count function returns:
o(fd: 1 fs: 0)
Below, we show the additional interface features of this lattice:
constants: As card: CardI dSpec: DSpec a2I: A2I i2A: I2A
The constants
feature corresponds to the list of atoms which
constitute the finite domain, sorted lexically.
The card
feature corresponds to an integer denoting the
cardinality of the finite domain.
The dSpec
feature corresponds to the finite domain specification
of the finite domain.
The a2I
feature corresponds to a function from Oz atoms in the
finite domain to their corresponding Oz integers.
The i2A
feature corresponds to a function from Oz integers in the
finite domain to their corresponding Oz atoms.