diff options
author | Jedidiah Barber <contact@jedbarber.id.au> | 2022-10-30 03:42:11 +1300 |
---|---|---|
committer | Jedidiah Barber <contact@jedbarber.id.au> | 2022-10-30 03:42:11 +1300 |
commit | 95ebd2d6acfa744c5e93287cc6385f4f1359376e (patch) | |
tree | 87cea8951f3ef00b9ad53679c7fe70c208b0ec62 /src/poly.mli | |
parent | 3f290e0d6c3ef1435253095de2cf53016855840e (diff) |
wallgen and wallsolve working, visualwall partially done, license added
Diffstat (limited to 'src/poly.mli')
-rw-r--r-- | src/poly.mli | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/src/poly.mli b/src/poly.mli new file mode 100644 index 0000000..4837142 --- /dev/null +++ b/src/poly.mli @@ -0,0 +1,82 @@ + + +(* Programmed by Jedidiah Barber *) +(* Licensed under the Sunset License v1.0 *) + + +type t + + + +val zero : t + +val one : t + +val singleton : coeff:Z.t -> expnt:Z.t -> t + +val ( ~$ ) : Z.t * Z.t -> t + + + +(* These two functions produce polynomials of degree zero. *) + +val of_int : int -> t + +val of_zint : Z.t -> t + + + +(* The first values are the coefficients, the second values are the exponents. *) +(* Values given by to_* functions are in descending exponent order. *) + +val to_list : t -> (Z.t * Z.t) list + +val of_list : (Z.t * Z.t) list -> t + +val to_array : t -> (Z.t * Z.t) array + +val of_array : (Z.t * Z.t) array -> t + + + +val degree : t -> Z.t + +val get_coeff : expnt:Z.t -> t -> Z.t + + + +val to_string : t -> string + +val print : t -> unit + +val output : Stdlib.out_channel -> t -> unit + +val pp_print : Stdlib.Format.formatter -> t -> unit + + + +val neg : t -> t + +val add : t -> t -> t + +val sub : t -> t -> t + +val mul : t -> t -> t + +val div_rem : t -> t -> t * t + +val div : t -> t -> t + +val rem : t -> t -> t + + + +val ( + ) : t -> t -> t + +val ( - ) : t -> t -> t + +val ( * ) : t -> t -> t + +val ( / ) : t -> t -> t + + |