
integral_t(?X, ?Epsilon, +MC)

   Tentative value implementation of approximate integrality

Arguments
   X                   Tentative variables
   Epsilon             Allowed deviation from integrality
   MC                  A monitored_constraint descriptor

Type
   library(tentative_constraints)

Description

	
    	Tentative value implementation of approximate integrality constraint.
	
	The violatedness of the constraint is 0 if X's value is within
	tolerance Epsilon of the nearest integers, 1 otherwise.
	
	The following declaration is in effect, meaning that integral_t/3
	is used whenever integral/2 is added to a constraint set:
	
	:- integral_t/3 tent_implements integral/2.
	
	
    

Modes and Determinism
   integral_t(?, ?, +) is det

Examples
   
    ?- X tent_set 3.2, CS :~ integral(X, 0.1).
    X = X{3.2 -> 0}
    CS = constraint_set(TotalVio{1 -> 0}, ...)
    There is 1 delayed goal.
    Yes (0.00s cpu)

    ?- X tent_set 3.2, CS :~ integral(X, 0.1), X tent_set 3.01.
    X = X{3.01 -> 0}
    CS = constraint_set(TotalVio{0 -> 0}, ...)
    There is 1 delayed goal.
    Yes (0.00s cpu)
    

See Also
   eq_t / 3, neq_t / 3, tentative : tent_implements / 2
