Skip to content
Snippets Groups Projects
Commit 336a1a4d authored by Nathan Rébiscoul's avatar Nathan Rébiscoul
Browse files

Add comment for udg_linear

parent 9bb45f3e
No related branches found
No related tags found
2 merge requests!9Update "Generate random graphs",!5WIP: Resolve "Generate random graphs"
Pipeline #26701 failed
...@@ -257,8 +257,16 @@ let (mkoptab : string array -> t -> unit) = ...@@ -257,8 +257,16 @@ let (mkoptab : string array -> t -> unit) =
mkopt args ["--progressive-prob";"-pp"] mkopt args ["--progressive-prob";"-pp"]
(Arg.Unit (fun () -> args.udg.proba <- LinearP)) (Arg.Unit (fun () -> args.udg.proba <- LinearP))
[(["...";"...";"...\n"], "UDG")]; [(["Uses a probability function for UDG that change probabilty according to the distance from the center,";
"using a linear function. Lower the distance is, greater the probability is.";
"This probability function will be used to know if an edge will be created when";
"two Unit Discs touch each other.\n"
], "UDG")];
(** [linear_proba r] gives a function that, for an input d (distance) outputs d/r.
If r is the Unit Disc radius and d the distance between two points,
it outputs a probability that is higher for a low d and lower for a high d. *)
mkopt args ["--dot_udg";"-du"]~arg:" <file-base-name>" mkopt args ["--dot_udg";"-du"]~arg:" <file-base-name>"
(Arg.String (fun f -> match args.action with (Arg.String (fun f -> match args.action with
| "UDG" -> args.dotUDG <- f | "UDG" -> args.dotUDG <- f
......
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