/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
 ::(-X:numeric_List, ?Dom) is semidet
Succeeds if variable X has domain Dom; otherwise fails. If Dom, or either bound of Dom, is a variable (or missing), it will be unified with the default value depending on its type. Default domains are real(-1.0e+16, 1.0e+16) and integer(-72057594037927936, 72057594037927935). Examples:
?- X::real(-pi/2,pi/2).
X::real(-1.5707963267948968, 1.5707963267948968).

?- X::real, Y::integer.
X::real(-1.0e+16, 1.0e+16),
Y::integer(-72057594037927936, 72057594037927935).

?- Y::integer(1,_), Y::Dom.
Dom = integer(1, 72057594037927935),
Y::integer(1, 72057594037927935).

?- B::boolean.
B::boolean.

?- 42::Dom.
false.

Note that bounds can be defined using arithmetic expressions.

Alternatively, the first argument may be a list of variables:

?- [B1,B2,B3]::boolean.
B1::boolean,
B2::boolean,
B3::boolean.

?- length(Vs,3), Vs::real(-1,1).
Vs = [_A, _B, _C],
_A::real(-1, 1),
_B::real(-1, 1),
_C::real(-1, 1).