projects
/
Faustine.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
14e4f8c
)
Refactoring faustine in beam.ml -> method output.
author
WANG
<wang@wang-OptiPlex-780.(none)>
Thu, 1 Aug 2013 16:01:05 +0000
(18:01 +0200)
committer
WANG
<wang@wang-OptiPlex-780.(none)>
Thu, 1 Aug 2013 16:01:05 +0000
(18:01 +0200)
interpretor/beam.ml
patch
|
blob
|
history
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