diff options
author | Sébastien Dailly <sebastien@chimrod.com> | 2020-12-23 19:11:31 +0100 |
---|---|---|
committer | Sébastien Dailly <sebastien@chimrod.com> | 2020-12-23 19:11:31 +0100 |
commit | ec812521b31471ce9ac3d9bdf1288b1569defbc8 (patch) | |
tree | d384c959b9e9bb2a04141ab56077026fe6e7c7f3 /shapes/matrix/EltsI.ml | |
parent | 6354358caa1dfbf2fe1d481f6ac5fba3775938fc (diff) |
Add svg output
Diffstat (limited to 'shapes/matrix/EltsI.ml')
-rwxr-xr-x | shapes/matrix/EltsI.ml | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/shapes/matrix/EltsI.ml b/shapes/matrix/EltsI.ml new file mode 100755 index 0000000..fcfdb50 --- /dev/null +++ b/shapes/matrix/EltsI.ml @@ -0,0 +1,28 @@ +module type ORDERED_AND_OPERATIONAL = +sig + + (* Exception for from_string. Is raised when from_string is passed something + * that is not an elt *) + exception NonElt + + type t + + (* The zero element *) + val zero : t + + (* The one element *) + val one: t + + (* ts must be comparable *) + val compare : t -> t -> Order.order + + (* Basic mathematical operations must be possible *) + val add: t -> t -> t + + val subtract: t -> t -> t + + val multiply: t -> t -> t + + val divide: t -> t -> t + +end |