submatrix - Write an OCaml program which checks whether the matrix A is contained in the matrix B -


despite not encountering major problems java, cannot regarding ocaml programming language. supposed create function submat 2 matrices, checks if matrix submatrix of matrix b, , if - returns true - val submat: int list list -> int list list -> bool = <fun>

i kindly appreciate help, since don't know how tackle problem.

this problem can solved using int array array or bigarray.array2 , applying conventional imperative programming approach.

another approach concatenate matrices int list , apply substring finding algorithm, e.g., knuth-morris-pratt (or invent own, if don't want fancy).


Comments

Popular posts from this blog

jquery - How do you format the date used in the popover widget title of FullCalendar? -

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -