/*******************************************************************************
* Copyright (c) 2010-2012, Tamas Szabo, Gabor Bergmann, Istvan Rath and Daniel Varro
* Copyright (c) 2023 The Refinery Authors
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-v20.html.
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/
package tools.refinery.interpreter.rete.single;
import tools.refinery.interpreter.rete.network.ReinitializedNode;
import tools.refinery.interpreter.rete.network.ReteContainer;
import tools.refinery.interpreter.rete.network.communication.Timestamp;
import tools.refinery.interpreter.rete.itc.alg.representative.RepresentativeElectionAlgorithm;
import tools.refinery.interpreter.rete.itc.alg.representative.RepresentativeObserver;
import tools.refinery.interpreter.rete.itc.graphimpl.Graph;
import tools.refinery.interpreter.matchers.tuple.Tuple;
import tools.refinery.interpreter.matchers.tuple.Tuples;
import tools.refinery.interpreter.matchers.util.Clearable;
import tools.refinery.interpreter.matchers.util.Direction;
import tools.refinery.interpreter.matchers.util.timeline.Timeline;
import java.util.Collection;
import java.util.Map;
public class RepresentativeElectionNode extends SingleInputNode implements Clearable, RepresentativeObserver,
ReinitializedNode {
private final RepresentativeElectionAlgorithm.Factory algorithmFactory;
private Graph