summaryrefslogtreecommitdiff
path: root/src/wall.mli
diff options
context:
space:
mode:
authorJedidiah Barber <contact@jedbarber.id.au>2022-10-30 03:42:11 +1300
committerJedidiah Barber <contact@jedbarber.id.au>2022-10-30 03:42:11 +1300
commit95ebd2d6acfa744c5e93287cc6385f4f1359376e (patch)
tree87cea8951f3ef00b9ad53679c7fe70c208b0ec62 /src/wall.mli
parent3f290e0d6c3ef1435253095de2cf53016855840e (diff)
wallgen and wallsolve working, visualwall partially done, license added
Diffstat (limited to 'src/wall.mli')
-rw-r--r--src/wall.mli52
1 files changed, 52 insertions, 0 deletions
diff --git a/src/wall.mli b/src/wall.mli
new file mode 100644
index 0000000..59d8edb
--- /dev/null
+++ b/src/wall.mli
@@ -0,0 +1,52 @@
+
+
+(* Programmed by Jedidiah Barber *)
+(* Licensed under the Sunset License v1.0 *)
+
+
+module type Algebra =
+ sig
+ type t
+
+ val zero : t
+ val one : t
+
+ val add : t -> t -> t
+ val sub : t -> t -> t
+ val mul : t -> t -> t
+ val div : t -> t -> t
+
+ val to_string : t -> string
+ end
+
+
+
+module type S =
+ sig
+ type element
+ type wall
+
+ val create : dimx:int -> dimy:int -> init:element array -> wall
+
+ val x_length : wall -> int
+ val y_length : wall -> int
+
+ val has_value : wall -> x:int -> y:int -> bool
+
+ val get : wall -> x:int -> y:int -> element
+ val get_opt : wall -> x:int -> y:int -> element option
+
+ val last_nonzero_row : wall -> int
+
+ val to_string : wall -> string
+ val print : wall -> unit
+ val output : Stdlib.out_channel -> wall -> unit
+ val pp_print : Stdlib.Format.formatter -> wall -> unit
+ end
+
+
+
+module Make:
+ functor (A : Algebra) -> S with type element = A.t
+
+