<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link rel="stylesheet" href="style.css" type="text/css">
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<link rel="Start" href="index.html">
<link rel="previous" href="I_GSet.html">
<link rel="next" href="I_USet.html">
<link rel="Up" href="index.html">
<link title="Index of types" rel=Appendix href="index_types.html">
<link title="Index of values" rel=Appendix href="index_values.html">
<link title="Index of modules" rel=Appendix href="index_modules.html">
<link title="Index of module types" rel=Appendix href="index_module_types.html">
<link title="Crdt" rel="Chapter" href="Crdt.html">
<link title="I_IntVector" rel="Chapter" href="I_IntVector.html">
<link title="I_GCounter" rel="Chapter" href="I_GCounter.html">
<link title="I_PNCounter" rel="Chapter" href="I_PNCounter.html">
<link title="I_GSet" rel="Chapter" href="I_GSet.html">
<link title="I_ORSet" rel="Chapter" href="I_ORSet.html">
<link title="I_USet" rel="Chapter" href="I_USet.html">
<link title="Immutable_types" rel="Chapter" href="Immutable_types.html">
<link title="M_GCounter" rel="Chapter" href="M_GCounter.html">
<link title="M_GSet" rel="Chapter" href="M_GSet.html">
<link title="M_IntVector" rel="Chapter" href="M_IntVector.html">
<link title="M_ORSet" rel="Chapter" href="M_ORSet.html">
<link title="M_PNCounter" rel="Chapter" href="M_PNCounter.html">
<link title="M_USet" rel="Chapter" href="M_USet.html">
<link title="Mutable_types" rel="Chapter" href="Mutable_types.html"><title>I_ORSet</title>
</head>
<body>
<div class="navbar"><a class="pre" href="I_GSet.html" title="I_GSet">Previous</a>
&nbsp;<a class="up" href="index.html" title="Index">Up</a>
&nbsp;<a class="post" href="I_USet.html" title="I_USet">Next</a>
</div>
<h1>Module <a href="type_I_ORSet.html">I_ORSet</a></h1>

<pre><span class="keyword">module</span> I_ORSet: <code class="code"><span class="keyword">sig</span></code> <a href="I_ORSet.html">..</a> <code class="code"><span class="keyword">end</span></code></pre><div class="info module top">
Observed-Remove set.
<p>

    Supports <code class="code">add</code>, <code class="code">remove</code>, <code class="code">lookup</code> and <code class="code">merge</code> operations.
    See <a href="Immutable_types.RSet.html"><code class="code"><span class="constructor">Immutable_types</span>.<span class="constructor">RSet</span></code></a>. Contains two separate instances of
    a regular <code class="code"><span class="constructor">Map</span></code>, one for adding (<code class="code">add_s</code>) and the other for removing
    (<code class="code">remove_s</code>).
<p>

    <code class="code">add el t</code> adds <code class="code">(unique (), el)</code> to <code class="code">add_s</code>, where unique is the result of
    calling
    <a href="http://caml.inria.fr/pub/docs/manual-ocaml/libref/Random.html#VALbits">
    Random.bits</a>. This may or may not be enough entropy for your use case.
<p>

    <code class="code">remove el t</code> adds all <code class="code">{(u, el) | ∃ u : (u, el) ∈ add_s}</code> to <code class="code">remove_s</code>
<p>

    Both <code class="code">lookup</code> and <code class="code">value</code> operate on the set difference <code class="code">add_s \ remove_s</code>.
<p>

    <code class="code">merge a b</code> calls merges <code class="code">add_s_a</code> with <code class="code">add_s_b</code> and the same for <code class="code">b</code><br>
</div>
<hr width="100%">

<pre><span class="keyword">module</span> <a href="I_ORSet.Make.html">Make</a> <code class="code">(</code><code class="code"><span class="constructor">O</span></code><code class="code"> : </code><code class="type"><a href="Immutable_types.Comparable.html">Immutable_types.Comparable</a></code><code class="code">) </code>: <code class="type"><a href="Immutable_types.RSet.html">Immutable_types.RSet</a></code><code class="type">  with
  type elt = O.t</code></pre><div class="info">
Creates an add / remove set of elements satisfying
    <a href="Immutable_types.Comparable.html"><code class="code"><span class="constructor">Immutable_types</span>.<span class="constructor">Comparable</span></code></a>
</div>
</body></html>