Refactoring of Signal class by adding a rate class.
[Faustine.git] / interpretor / types.ml
index f8aeeb8..620cde5 100644 (file)
@@ -91,6 +91,9 @@ class type rate_type =
   object
     method to_int : int
     method to_float : float 
+    method to_string : string
+    method num : int
+    method denom : int
     method equal : rate_type -> bool
     method mul : int -> rate_type
     method div : int -> rate_type
@@ -98,7 +101,7 @@ class type rate_type =
 
 class type signal_type = 
     object
-      method frequency : int
+      method frequency : rate_type
       method at : time -> value_type
       method add_memory : int -> unit
       method add : signal_type -> signal_type
@@ -141,7 +144,7 @@ class type beam_type =
       method matching : int -> beam_type
       method at : time -> value_type array
       method output : int -> float array array array
-      method frequency : int array
+      method frequency : rate_type array
     end;;
 
 
@@ -170,5 +173,5 @@ class type io_type =
     object
       method set : string -> string -> unit
       method read : string array -> beam_type
-      method write : int array -> float array array array -> string array
+      method write : rate_type array -> float array array array -> string array
     end;;