projects
/
Faustine.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Refactoring faustine in beam.ml -> method output.
[Faustine.git]
/
interpretor
/
beam.ml
diff --git
a/interpretor/beam.ml
b/interpretor/beam.ml
index
cf5c003
..
0468e42
100644
(file)
--- 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
val signals = signals_init
method get = signals
- method
leng
th = Array.length signals
+ method
wid
th = Array.length signals
method sub : int -> int -> beam_type =
fun start ->
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 ->
method matching : int -> beam_type =
fun size ->
- if size = self#
leng
th then new beam self#get
+ if size = self#
wid
th then new beam self#get
- else if (size > self#
length) && (size mod self#leng
th = 0) then
+ else if (size > self#
width) && (size mod self#wid
th = 0) then
let () = self#add_memory 1 in
let split_signals =
Array.concat (Array.to_list
let () = self#add_memory 1 in
let split_signals =
Array.concat (Array.to_list
- (Array.make (size/self#
leng
th) self#get)) in
+ (Array.make (size/self#
wid
th) self#get)) in
new beam split_signals
new beam split_signals
- else if (size < self#
length) && (self#leng
th mod size = 0) then
+ else if (size < self#
width) && (self#wid
th mod size = 0) then
let rec merge_rec =
fun (sa : signal_type array) ->
fun (l : int) ->
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
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
end