Module Symbolic.Linear_exprs

Parameters

module Var : SYMBOL
module Const : SYMBOL

Signature

type factor
type linexpr
exception NON_LINEAR of Var.t NEL.t
exception NOT_SCALAR of [ `Vars of Var.t NEL.t | `Consts of Const.t NEL.t ]
val pp_factor : factor Pretty.printer
val pp_linexpr : linexpr Pretty.printer
val int : int -> factor
val var : Var.t -> factor
val const : Const.t -> linexpr
val factor : factor -> linexpr
val zero : linexpr
val add : linexpr -> linexpr -> linexpr
val sub : linexpr -> linexpr -> linexpr
val mult : linexpr -> by:factor -> linexpr
val as_int : linexpr -> int