/usr/share/swi-prolog/pack/clpBNR/prolog/clpBNR.pl
All Application Manual Name SummaryHelp

  • prolog
    • clpBNR.pl -- clpBNR: Constraint Logic Programming over Continuous Domain of Reals
      • clpStatistics/0
      • clpStatistic/1
      • clpStatistics/1
      • list/1
      • interval/1
      • interval_degree/2
      • nb_setbounds/2
      • range/2
      • domain/2
      • delta/2
      • midpoint/2
      • median/2
      • lower_bound/1
      • upper_bound/1
      • ::/2
      • {}/1
      • watch/2
      • trace_clpBNR/1
 domain(?X:interval, ?Dom) is semidet
Succeeds if X is an interval and Dom unifies with the domain of X; otherwise fails. Dom is a compound term with a functor specifying the type (real or integer) and the arguments specifying the bounds. If X has a domain of integer(0,1), Dom will be boolean. Examples:
?- range(X,[2,3]), domain(X,Dom).
Dom = real(2, 3),
X::real(2, 3).

?- X::integer(0,1),domain(X,Dom).
Dom = boolean,
X::boolean.

?- domain(X,Dom).
false.

Note: unlike range/2, domain/2 will not change X.