anchor.diff:  init({ResetTrigger, ClusterTrigger}) ->
       ResetTriggerState = trigger:init(ResetTrigger, fun get_clustering_reset_interval/0, reset_clustering),
       ClusterTriggerState = trigger:init(ClusterTrigger, fun get_clustering_interval/0, start_clustering_shuffle),
  -    {inactive, msg_queue:new(), ResetTriggerState, ClusterTriggerState}.
  +    Radius = case config:read(dc_clustering_radius) of
  +        failed -> exit(dc_clustering_radius_not_set);
  +        R when R > 0 -> R;
  +        _Else -> exit(dc_clustering_radius_invalid)
  +    end,
  +    #state_inactive{
  +        queued_messages = msg_queue:new()
  +        , reset_trigger_state = ResetTriggerState
  +        , cluster_trigger_state = ClusterTriggerState
  +        , radius=Radius
  +    }
  +    .
   
   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   % Message Loop
  
positive.code: % Helpers
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  
  -spec cluster(centroids:centroids(), centroids:centroids()) -> centroids:centroids().
  cluster([], RemoteCentroids) -> RemoteCentroids;
  cluster(Centroids, RemoteCentroids) ->
      % TODO extract Radius into state
      Radius = case config:read(dc_clustering_radius) of
          failed -> exit(dc_clustering_radius_not_set);
          R when R > 0 -> R;
          _Else -> exit(dc_clustering_radius_invalid)
      end,
  
      %% TODO avoid ++
      NewCentroids = mathlib:aggloClustering(Centroids ++ RemoteCentroids, Radius),
      NormalizedCentroids = lists:map(fun (Centroid) ->
                  dc_centroids:set_relative_size(Centroid,
                      0.5 * dc_centroids:get_relative_size(Centroid))
                  end, NewCentroids),
      % XXX fails: 1 = lists:foldr(fun(S, Acc) -> Acc + S end, 0, NormalizedSizes),
      NormalizedCentroids.
  
  %% @doc Gets the clustering reset interval set in scalaris.cfg.
  
negative.code: %% @doc Message handler when the module is fully initialized.
  -spec on_active(Message::message(), State::state_active()) -> state_active();
           ({deactivate_clustering}, state_active()) -> {'$gen_component', [{on_handler, Handler::gen_component:handler()}], State::state_inactive()}.
  on_active({deactivate_clustering}
            , #state_active{
                            reset_trigger_state=ResetTriggerState
                            , cluster_trigger_state=ClusterTriggerState
                            , radius=R
                        }) ->
      log:log(info, "[ Clustering ~.0p ] deactivating...~n", [comm:this()]),
      StateInactive = #state_inactive{
          queued_messages = msg_queue:new()
          , reset_trigger_state = ResetTriggerState
          , cluster_trigger_state = ClusterTriggerState
          , radius=R
      },
      gen_component:change_handler(StateInactive, fun ?MODULE:on_inactive/2);
  
  % ignore activate_clustering messages in active state
  % note: remove this if the clustering process is to be deactivated on leave (see
  