module Linexpr0:sig..end
type t
APRON Linear expressions of level 0
NOTE: Linear expressions are not totally ordered.
As of 0.9.15, they do not implement the polymorphic compare function to avoid confusion.
As a consequence, the polymorphic =, <=, etc. operators cannot be used.
Use equal and cmp instead.
val make : int option -> tCreate a linear expression. Its representation is sparse if None is provided, dense of size size if Some size is provided.
val of_list : int option -> (Coeff.t * Dim.t) list -> Coeff.t option -> tCombines Linexpr0.make and Linexpr0.set_list (see below)
val of_array : int option -> (Coeff.t * Dim.t) array -> Coeff.t option -> tCombines Linexpr0.make and Linexpr0.set_array (see below)
val minimize : t -> unitIn case of sparse representation, remove zero coefficients
val copy : t -> tCopy
val cmp : t -> t -> intComparison with lexicographic ordering using Coeff.cmp, terminating by constant. This is a partial ordrer; as Coeff.cmp it returns an integer between -3 and 3. It cannot be used when a total order is required (e.g., in Set.Make).
val equal : t -> t -> boolEquality comparison
val hash : t -> intHashing function
val get_size : t -> intGet the size of the linear expression (which may be sparse or dense)
val get_cst : t -> Coeff.tGet the constant
val get_coeff : t -> int -> Coeff.tGet the coefficient corresponding to the dimension
val set_list : t -> (Coeff.t * Dim.t) list -> Coeff.t option -> unitSet simultaneously a number of coefficients.
set_list expr [(c1,1); (c2,2)] (Some cst) assigns coefficients c1
to dimension 1, coefficient c2 to dimension 2, and coefficient cst
to the constant. If (Some cst) is replaced by None,
the constant coefficient is not assigned.
val set_array : t -> (Coeff.t * Dim.t) array -> Coeff.t option -> unitSet simultaneously a number of coefficients, as set_list.
val set_cst : t -> Coeff.t -> unitSet the constant
val set_coeff : t -> int -> Coeff.t -> unitSet the coefficient corresponding to the dimension
Iter the function on the pairs coefficient/dimension of the linear expression
val iter : (Coeff.t -> Dim.t -> unit) -> t -> unit
val print : (Dim.t -> string) -> Stdlib.Format.formatter -> t -> unitPrint a linear expression, using a function converting from dimensions to names