X-Git-Url: https://scm.cri.mines-paristech.fr/git/Faustine.git/blobdiff_plain/14e4f8cd6102d273c520c2d2e0168a5221a7daeb..c4ce4ce8d2dff5817b7caa758655465e34456368:/interpretor/beam.ml diff --git a/interpretor/beam.ml b/interpretor/beam.ml index cf5c003..0468e42 100644 --- a/interpretor/beam.ml +++ b/interpretor/beam.ml @@ -16,7 +16,7 @@ class beam : signal_type array -> beam_type = val signals = signals_init method get = signals - method length = Array.length signals + method width = Array.length signals method sub : int -> int -> beam_type = fun start -> @@ -37,16 +37,16 @@ class beam : signal_type array -> beam_type = method matching : int -> beam_type = fun size -> - if size = self#length then new beam self#get + if size = self#width then new beam self#get - else if (size > self#length) && (size mod self#length = 0) then + else if (size > self#width) && (size mod self#width = 0) then let () = self#add_memory 1 in let split_signals = Array.concat (Array.to_list - (Array.make (size/self#length) self#get)) in + (Array.make (size/self#width) self#get)) in new beam split_signals - else if (size < self#length) && (self#length mod size = 0) then + else if (size < self#width) && (self#width mod size = 0) then let rec merge_rec = fun (sa : signal_type array) -> fun (l : int) -> @@ -64,6 +64,7 @@ class beam : signal_type array -> beam_type = let signal_at = fun (t : time) -> fun (s : signal_type) -> s#at t in Array.map (signal_at t) self#get - method output : int -> (int list) * (float array list) = - + method output : int -> (int array) * (float array array) = + fun (length_max : int) -> + end