Class AbstractForEachUniNode<A>
- java.lang.Object
-
- ai.timefold.solver.constraint.streams.bavet.common.AbstractNode
-
- ai.timefold.solver.constraint.streams.bavet.uni.AbstractForEachUniNode<A>
-
- Type Parameters:
A-
- Direct Known Subclasses:
ForEachExcludingNullVarsUniNode,ForEachIncludingNullVarsUniNode
public abstract class AbstractForEachUniNode<A> extends AbstractNode
Filtering nodes are expensive. Considering that most streams start with a nullity check on genuine planning variables, it makes sense to create a specialized version of the node for this case (ForEachExcludingNullVarsUniNode), as opposed to forcing an extra filter node on the generic case (ForEachIncludingNullVarsUniNode).
-
-
Constructor Summary
Constructors Constructor Description AbstractForEachUniNode(Class<A> forEachClass, TupleLifecycle<UniTuple<A>> nextNodesTupleLifecycle, int outputStoreSize)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Class<A>getForEachClass()PropagatorgetPropagator()Instead of calling the propagation directly from here, we export the propagation queue and allowBavetConstraintSessionto call it.protected voidinnerUpdate(A a, UniTuple<A> tuple)voidinsert(A a)voidretract(A a)StringtoString()abstract voidupdate(A a)-
Methods inherited from class ai.timefold.solver.constraint.streams.bavet.common.AbstractNode
getLayerIndex, setId, setLayerIndex
-
-
-
-
Constructor Detail
-
AbstractForEachUniNode
public AbstractForEachUniNode(Class<A> forEachClass, TupleLifecycle<UniTuple<A>> nextNodesTupleLifecycle, int outputStoreSize)
-
-
Method Detail
-
insert
public void insert(A a)
-
update
public abstract void update(A a)
-
retract
public void retract(A a)
-
getPropagator
public Propagator getPropagator()
Description copied from class:AbstractNodeInstead of calling the propagation directly from here, we export the propagation queue and allowBavetConstraintSessionto call it. This is done with the idea thatPropagatoronly has two implementations (unlikeAbstractNodewith myriad implementations) and therefore JVM call site optimizations will kick in to make the method dispatch faster.- Specified by:
getPropagatorin classAbstractNode- Returns:
- never null; the
PropagationQueuein use by this node
-
toString
public final String toString()
- Overrides:
toStringin classAbstractNode
-
-