Class AbstractGroupNode<InTuple_ extends AbstractTuple,OutTuple_ extends AbstractTuple,GroupKey_,ResultContainer_,Result_>
java.lang.Object
ai.timefold.solver.constraint.streams.bavet.common.AbstractNode
ai.timefold.solver.constraint.streams.bavet.common.AbstractGroupNode<InTuple_,OutTuple_,GroupKey_,ResultContainer_,Result_>
- All Implemented Interfaces:
TupleLifecycle<InTuple_>
public abstract class AbstractGroupNode<InTuple_ extends AbstractTuple,OutTuple_ extends AbstractTuple,GroupKey_,ResultContainer_,Result_>
extends AbstractNode
implements TupleLifecycle<InTuple_>
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractGroupNode(int groupStoreIndex, int undoStoreIndex, Function<InTuple_, GroupKey_> groupKeyFunction, Supplier<ResultContainer_> supplier, Function<ResultContainer_, Result_> finisher, TupleLifecycle<OutTuple_> nextNodesTupleLifecycle, EnvironmentMode environmentMode) protectedAbstractGroupNode(int groupStoreIndex, Function<InTuple_, GroupKey_> groupKeyFunction, TupleLifecycle<OutTuple_> nextNodesTupleLifecycle, EnvironmentMode environmentMode) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract Runnableaccumulate(ResultContainer_ resultContainer, InTuple_ tuple) protected abstract OutTuple_createOutTuple(GroupKey_ groupKey) Instead of calling the propagation directly from here, we export the propagation queue and allowBavetConstraintSessionto call it.final voidfinal voidfinal voidprotected abstract voidupdateOutTupleToResult(OutTuple_ outTuple, Result_ result) Methods inherited from class ai.timefold.solver.constraint.streams.bavet.common.AbstractNode
getLayerIndex, setId, setLayerIndex, toString
-
Constructor Details
-
AbstractGroupNode
protected AbstractGroupNode(int groupStoreIndex, int undoStoreIndex, Function<InTuple_, GroupKey_> groupKeyFunction, Supplier<ResultContainer_> supplier, Function<ResultContainer_, Result_> finisher, TupleLifecycle<OutTuple_> nextNodesTupleLifecycle, EnvironmentMode environmentMode) -
AbstractGroupNode
protected AbstractGroupNode(int groupStoreIndex, Function<InTuple_, GroupKey_> groupKeyFunction, TupleLifecycle<OutTuple_> nextNodesTupleLifecycle, EnvironmentMode environmentMode)
-
-
Method Details
-
insert
- Specified by:
insertin interfaceTupleLifecycle<InTuple_ extends AbstractTuple>
-
update
- Specified by:
updatein interfaceTupleLifecycle<InTuple_ extends AbstractTuple>
-
retract
- Specified by:
retractin interfaceTupleLifecycle<InTuple_ extends AbstractTuple>
-
accumulate
-
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
-
createOutTuple
- Parameters:
groupKey- null if the node only has one group- Returns:
- never null
-
updateOutTupleToResult
-