Module CLPR

Library for constraint programming with arithmetic constraints over reals.

Summary of exported operations:

(+.) :: Float -> Float -> Float   
Addition on floats in arithmetic constraints.
(-.) :: Float -> Float -> Float   
Subtraction on floats in arithmetic constraints.
(*.) :: Float -> Float -> Float   
Multiplication on floats in arithmetic constraints.
(/.) :: Float -> Float -> Float   
Division on floats in arithmetic constraints.
(<.) :: Float -> Float -> Bool   
"Less than" constraint on floats.
(>.) :: Float -> Float -> Bool   
"Greater than" constraint on floats.
(<=.) :: Float -> Float -> Bool   
"Less than or equal" constraint on floats.
(>=.) :: Float -> Float -> Bool   
"Greater than or equal" constraint on floats.
i2f :: Int -> Float   
Conversion function from integers to floats.
minimumFor :: (a -> Bool) -> (a -> Float) -> a   
Computes the minimum with respect to a given constraint.
minimize :: (a -> Bool) -> (a -> Float) -> a -> Bool   
Minimization constraint.
maximumFor :: (a -> Bool) -> (a -> Float) -> a   
Computes the maximum with respect to a given constraint.
maximize :: (a -> Bool) -> (a -> Float) -> a -> Bool   
Maximization constraint.

Exported operations:

(+.) :: Float -> Float -> Float   

Addition on floats in arithmetic constraints.

Further infos:
  • defined as left-associative infix operator with precedence 6

(-.) :: Float -> Float -> Float   

Subtraction on floats in arithmetic constraints.

Further infos:
  • defined as left-associative infix operator with precedence 6

(*.) :: Float -> Float -> Float   

Multiplication on floats in arithmetic constraints.

Further infos:
  • defined as left-associative infix operator with precedence 7

(/.) :: Float -> Float -> Float   

Division on floats in arithmetic constraints.

Further infos:
  • defined as left-associative infix operator with precedence 7

(<.) :: Float -> Float -> Bool   

"Less than" constraint on floats.

Further infos:
  • defined as non-associative infix operator with precedence 4

(>.) :: Float -> Float -> Bool   

"Greater than" constraint on floats.

Further infos:
  • defined as non-associative infix operator with precedence 4

(<=.) :: Float -> Float -> Bool   

"Less than or equal" constraint on floats.

Further infos:
  • defined as non-associative infix operator with precedence 4

(>=.) :: Float -> Float -> Bool   

"Greater than or equal" constraint on floats.

Further infos:
  • defined as non-associative infix operator with precedence 4

i2f :: Int -> Float   

Conversion function from integers to floats. Rigid in the first argument, i.e., suspends until the first argument is ground.

minimumFor :: (a -> Bool) -> (a -> Float) -> a   

Computes the minimum with respect to a given constraint. (minimumFor g f) evaluates to x if (g x) is satisfied and (f x) is minimal. The evaluation fails if such a minimal value does not exist. The evaluation suspends if it contains unbound non-local variables.

Further infos:
  • externally defined

minimize :: (a -> Bool) -> (a -> Float) -> a -> Bool   

Minimization constraint. (minimize g f x) is satisfied if (g x) is satisfied and (f x) is minimal. The evaluation suspends if it contains unbound non-local variables.

maximumFor :: (a -> Bool) -> (a -> Float) -> a   

Computes the maximum with respect to a given constraint. (maximumFor g f) evaluates to x if (g x) is satisfied and (f x) is maximal. The evaluation fails if such a maximal value does not exist. The evaluation suspends if it contains unbound non-local variables.

Further infos:
  • externally defined

maximize :: (a -> Bool) -> (a -> Float) -> a -> Bool   

Maximization constraint. (maximize g f x) is satisfied if (g x) is satisfied and (f x) is maximal. The evaluation suspends if it contains unbound non-local variables.