Skip to content
Snippets Groups Projects
Commit 1f6fd7d0 authored by Emile Guillaume's avatar Emile Guillaume
Browse files

Some change for make working salut OracleGen and add the read initial value in topologie in unison

parent f6063a0d
No related branches found
No related tags found
No related merge requests found
Pipeline #105483 failed
(* Time-stamp: <2022-07-12 11:01:25 emile> *)
open Algo open Algo
let d = max_degree() let d = max_degree()
...@@ -6,11 +8,14 @@ type t = { ...@@ -6,11 +8,14 @@ type t = {
isRoot:bool; isRoot:bool;
alpha:int; alpha:int;
par:int par:int
} }
(*let boolVint (b:bool):int =
if b then 1 else 0*)
let (to_string: (t -> string)) = let (to_string: (t -> string)) =
fun s -> fun s ->
Printf.sprintf "alpha=%d" s.alpha Printf.sprintf "isRoot=%b alpha=%d par=%d" s.isRoot s.alpha s.par
let (of_string: (string -> t) option) = let (of_string: (string -> t) option) =
Some (fun s -> Some (fun s ->
...@@ -21,4 +26,4 @@ let (copy : ('v -> 'v)) = fun x -> x ...@@ -21,4 +26,4 @@ let (copy : ('v -> 'v)) = fun x -> x
let actions = ["change_alpha"] let actions = ["change_alpha"]
let k = 2 let k = 2
type t = int type t = int
let to_string = (fun s -> Printf.sprintf "c=%i" s) let to_string = (fun s -> Printf.sprintf "c=%i" s)
let of_string = None
let (of_string: (string -> t) option) =
Some (fun s ->
let res = Scanf.sscanf s "c=%d" (fun i -> i ) in
res
)
let copy x = x let copy x = x
let actions = ["g"] let actions = ["g"]
let potential = None let potential = None
......
(* Time-stamp: <modified the 05/03/2020 (at 21:38) by Erwan Jahier> *) (* Time-stamp: <2022-07-18 15:47:53 emile> *)
open Algo open Algo
(* let m=10 (* max 2 (1+2*diameter ()) *) *) (* let m=10 (* max 2 (1+2*diameter ()) *) *)
let diameter = Algo.diameter () let diameter = Algo.diameter ()
let m = max 2 (2*diameter-1) let m = max 2 (2*diameter-1)
let (init_state: int -> string -> 'v) = let (init_state: int -> string -> 'v) =
fun _ _ -> fun _ _ ->
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment