3 Description: beam definition and operations
5 Created: 21/07/2013 Modified: 21/07/2013
8 exception Beam_matching of string;;
12 class beam : signal_type array -> beam_type =
13 fun (sa_init : signal_type array) ->
16 val l = Array.length sa
22 method sub : int -> int -> beam_type =
25 new beam (Array.sub self#get start len)
27 method append : beam_type -> beam_type =
29 new beam (Array.append self#get b)
31 method matching : int -> beam_type
33 if size = self#length then self
34 else if size > self#length && size mod self#length = 0 then
36 else if size < self#length && self#length mod size = 0 then
38 else raise (Beam_matching "matching size error")