Commit 20b4c0e3 authored by POTTIER Francois's avatar POTTIER Francois

Rename [UnionFind.change] to [UnionFind.set].

parent 1e4a30d3
......@@ -296,7 +296,7 @@ let represented state =
(* Setters. *)
let represent state =
UnionFind.change (represented state) true
UnionFind.set (represented state) true
let represents states =
represent (Lr1.NodeSet.choose states)
......
......@@ -85,13 +85,13 @@ let rec find point =
| Link { link = Link _ } ->
find (repr point)
let rec change point v =
let rec set point v =
match point.link with
| Info info
| Link { link = Info info } ->
info.descriptor <- v
| Link { link = Link _ } ->
change (repr point) v
set (repr point) v
(** [union point1 point2] merges the equivalence classes associated
with [point1] and [point2] into a single class whose descriptor is
......
......@@ -39,5 +39,5 @@ val union: 'a point -> 'a point -> unit
belong to the same equivalence class. *)
val equivalent: 'a point -> 'a point -> bool
(** [change p d] updates the descriptor of [p] to [d]. *)
val change: 'a point -> 'a -> unit
(** [set p d] updates the descriptor of [p] to [d]. *)
val set: 'a point -> 'a -> unit
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment