anchor.diff:  
       ZeroCount = run_of_zeroes(RegisterValue) + 1,
   
  -    case array:get(Index, Hyper#hyper.registers) < ZeroCount of
  -        true ->
  -            Hyper#hyper{registers = array:set(Index, ZeroCount, Registers)};
  -        false ->
  -            Hyper
  +    case gb_trees:lookup(Index, Hyper#hyper.registers) of
  +        {value, Small} when Small < ZeroCount ->
  +            Hyper#hyper{registers = gb_trees:enter(Index, ZeroCount, Registers)};
  +        {value, Large} when ZeroCount =< Large ->
  +            Hyper;
  +        none ->
  +            Hyper#hyper{registers = gb_trees:enter(Index, ZeroCount, Registers)}
       end;
   
   insert(_Value, _Hyper) ->
  
positive.code:     {P, Card, Mean, P99, P1, trunc(pow(2, P))}.
  
  
  generate_unique(N) ->
      generate_unique(lists:usort(random_bytes(N)), N).
  
  
negative.code: union(#hyper{registers = LeftRegisters} = Left,
        #hyper{registers = RightRegisters} = Right)
    when Left#hyper.p =:= Right#hyper.p ->
      %% NewRegisters =
      %%     gb_trees:from_orddict(
      %%       orddict:merge(fun (_Index, L, R) -> max(L, R) end,
      %%                     gb_trees:to_list(LeftRegisters),
      %%                     gb_trees:to_list(RightRegisters))),
  
      NewRegisters = gb_fold(fun (Index, L, Registers) ->
                                     case gb_trees:lookup(Index, Registers) of
                                         {value, R} when R < L ->
                                             gb_trees:enter(Index, L, Registers);
                                         {value, _} ->
                                             Registers;
                                         none ->
                                             gb_trees:enter(Index, L, Registers)
                                     end
                             end, RightRegisters, LeftRegisters),
  
      Right#hyper{registers = NewRegisters}.
  
  
  gb_fold(F, A, {_, T}) when is_function(F, 3) ->
      gb_fold_1(F, A, T).
  
  gb_fold_1(F, Acc0, {Key, Value, Small, Big}) ->
      Acc1 = gb_fold_1(F, Acc0, Small),
      Acc = F(Key, Value, Acc1),
      gb_fold_1(F, Acc, Big);
  gb_fold_1(_, Acc, _) ->
      Acc.
  
  
  %% NOTE: use with caution, no guarantees on accuracy.
  