Module Apron.Linexpr1

module Linexpr1: sig .. end

type t = {
   mutable linexpr0 :Apron.Linexpr0.t;
   mutable env :Apron.Environment.t;
}
val make : ?sparse:bool -> Apron.Environment.t -> t
Build a linear expression defined on the given argument, which is sparse by default.
val minimize : t -> unit
In case of sparse representation, remove zero coefficients
val copy : t -> t
Copy
val print : Format.formatter -> t -> unit
Print the linear expression
val set_list : t ->
(Apron.Coeff.t * Apron.Var.t) list -> Apron.Coeff.t option -> unit
Set simultaneously a number of coefficients.

set_list expr [(c1,"x"); (c2,"y")] (Some cst) assigns coefficients c1 to variable "x", coefficient c2 to variable "y", and coefficient cst to the constant. If (Some cst) is replaced by None, the constant coefficient is not assigned.

val set_array : t ->
(Apron.Coeff.t * Apron.Var.t) array -> Apron.Coeff.t option -> unit
Set simultaneously a number of coefficients, as set_list.
val iter : (Apron.Coeff.t -> Apron.Var.t -> unit) -> t -> unit
Iter the function on the pair coefficient/variable of the linear expression
val get_cst : t -> Apron.Coeff.t
Get the constant
val set_cst : t -> Apron.Coeff.t -> unit
Set the constant
val get_coeff : t -> Apron.Var.t -> Apron.Coeff.t
Get the coefficient of the variable
val set_coeff : t -> Apron.Var.t -> Apron.Coeff.t -> unit
Set the coefficient of the variable
val extend_environment : t -> Apron.Environment.t -> t
Change the environment of the expression for a super-environement. Raise Failure if it is not the case
val extend_environment_with : t -> Apron.Environment.t -> unit
Side-effet version of the previous function
val is_integer : t -> bool
Does the linear expression depend only on integer variables ?
val is_real : t -> bool
Does the linear expression depend only on real variables ?
val get_linexpr0 : t -> Apron.Linexpr0.t
Get the underlying expression of level 0 (which is not a copy).
val get_env : t -> Apron.Environment.t
Get the environement of the expression