Library
Module
Module type
Parameter
Class
Class type
This file is an extension for the Generator1 module from the apron Library
Note : It only adds function, nothing is removed. Extensions are at the end of the documentation
type t = Apron.Generator1.t
val make : Apron.Linexpr1.t -> Apron.Generator0.typ -> t
Make a generator. Modifying later the linear expression (not advisable) modifies correspondingly the generator and conversely, except for changes of environements
val print : Format.formatter -> t -> unit
Print the generator
val get_typ : t -> Apron.Generator0.typ
Get the generator type
val iter : (Apron.Coeff.t -> Apron.Var.t -> unit) -> t -> unit
Iter the function on the pair coefficient/variable of the underlying linear expression
val set_typ : t -> Apron.Generator0.typ -> unit
Set the generator type
val set_list : t -> (Apron.Coeff.t * Apron.Var.t) list -> unit
Set simultaneously a number of coefficients.
set_list expr [(c1,"x"); (c2,"y")]
assigns coefficients c1
to variable "x"
and coefficient c2
to variable "y"
.
val set_array : t -> (Apron.Coeff.t * Apron.Var.t) array -> unit
Set simultaneously a number of coefficients, as set_list
.
val get_coeff : t -> Apron.Var.t -> Apron.Coeff.t
Get the coefficient of the variable in the underlying linear expression
val set_coeff : t -> Apron.Var.t -> Apron.Coeff.t -> unit
Set the coefficient of the variable in the underlying linear expression
val extend_environment : t -> Apron.Environment.t -> t
Change the environement of the generator for a super-environement. Raise Failure
if it is not the case
val extend_environment_with : t -> Apron.Environment.t -> unit
Side-effect version of the previous function
val array_make : Apron.Environment.t -> int -> Apron.Generator1.earray
Make an array of generators with the given size and defined on the given environement. The elements are initialized with the line 0.
val array_print :
?first:(unit, Format.formatter, unit) format ->
?sep:(unit, Format.formatter, unit) format ->
?last:(unit, Format.formatter, unit) format ->
Format.formatter ->
Apron.Generator1.earray ->
unit
Print an array of generators
val array_length : Apron.Generator1.earray -> int
Get the size of the array
val array_get : Apron.Generator1.earray -> int -> t
Get the element of the given index (which is not a copy)
val array_set : Apron.Generator1.earray -> int -> t -> unit
Set the element of the given index (without any copy). The array and the generator should be defined on the same environement; otherwise a Failure
exception is raised.
val array_extend_environment :
Apron.Generator1.earray ->
Apron.Environment.t ->
Apron.Generator1.earray
Change the environement of the array of generators for a super-environement. Raise Failure
if it is not the case
val array_extend_environment_with :
Apron.Generator1.earray ->
Apron.Environment.t ->
unit
Side-effect version of the previous function
val get_env : t -> Apron.Environment.t
Get the environement of the generator
val get_linexpr1 : t -> Apron.Linexpr1.t
Get the underlying linear expression. Modifying the linear expression (not advisable) modifies correspondingly the generator and conversely, except for changes of environements
val get_generator0 : t -> Apron.Generator0.t
Get the underlying generator of level 0. Modifying the generator of level 0 (not advisable) modifies correspondingly the generator and conversely, except for changes of environements
val to_float_array : Apron.Generator1.earray -> float array array
Converts a Generator1 into a float array array.
val of_rational_point : Apron.Environment.t -> Mpqf.t list -> t
returns a generator corresponding to a rational point
val of_float_point : Apron.Environment.t -> float list -> t
returns a generator corresponding to a float point
Higher-order functions utilities
val array_fold : ('a -> t -> 'a) -> 'a -> Apron.Generator1.earray -> 'a
fold function over generator.earay
val array_iter : (t -> unit) -> Apron.Generator1.earray -> unit
iter function over generator.earay
val array_for_all : (t -> bool) -> Apron.Generator1.earray -> bool
forall function over generator.earay
val array_exists : (t -> bool) -> Apron.Generator1.earray -> bool
exists function over generator.earay
val array_to_list : Apron.Generator1.earray -> t list
to list conversion
val array_of_list : t list -> Apron.Generator1.earray
of list build
val to_vertices2D : t -> Apron.Var.t -> Apron.Var.t -> float * float
val to_vertices2D_s : t -> string -> string -> float * float
val to_vertices3D :
t ->
Apron.Var.t ->
Apron.Var.t ->
Apron.Var.t ->
float * float * float
val to_vertices3D_s : t -> string -> string -> string -> float * float * float