Project

General

Profile

Revision e8f55c25 src/mutation.ml

View differences:

src/mutation.ml
188 188
    let eshift = 10. ** (float_of_int shift) in
189 189
    let i = Random.int (1 + bound * (int_of_float eshift)) in
190 190
    let f = float_of_int i /. eshift in
191
    (Num.num_of_int i, shift, string_of_float f)
191
    Real.create (string_of_int i) shift (string_of_float f)
192 192
  else 
193 193
    r
194 194

  
......
224 224
let rdm_mutate_const_value c =
225 225
  match c with
226 226
  | Const_int i -> Const_int (rdm_mutate_int i)
227
  | Const_real (n, i, s) -> let (n', i', s') = rdm_mutate_real (n, i, s) in Const_real (n', i', s')
227
  | Const_real r -> Const_real (rdm_mutate_real r)
228 228
  | Const_array _
229 229
  | Const_string _
230 230
  | Const_modeid _

Also available in: Unified diff