Class AbstractMapNode<InTuple_ extends AbstractTuple,OutTuple_ extends AbstractTuple>
- java.lang.Object
-
- ai.timefold.solver.constraint.streams.bavet.common.AbstractNode
-
- ai.timefold.solver.constraint.streams.bavet.common.AbstractMapNode<InTuple_,OutTuple_>
-
- All Implemented Interfaces:
TupleLifecycle<InTuple_>
public abstract class AbstractMapNode<InTuple_ extends AbstractTuple,OutTuple_ extends AbstractTuple> extends AbstractNode implements TupleLifecycle<InTuple_>
-
-
Field Summary
Fields Modifier and Type Field Description protected intoutputStoreSize
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractMapNode(int inputStoreIndex, TupleLifecycle<OutTuple_> nextNodesTupleLifecycle, int outputStoreSize)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description PropagatorgetPropagator()Instead of calling the propagation directly from here, we export the propagation queue and allowBavetConstraintSessionto call it.voidinsert(InTuple_ tuple)protected abstract OutTuple_map(InTuple_ inTuple)protected abstract booleanremap(InTuple_ inTuple, OutTuple_ oldOutTuple)voidretract(InTuple_ tuple)voidupdate(InTuple_ tuple)-
Methods inherited from class ai.timefold.solver.constraint.streams.bavet.common.AbstractNode
getLayerIndex, setId, setLayerIndex, toString
-
-
-
-
Constructor Detail
-
AbstractMapNode
protected AbstractMapNode(int inputStoreIndex, TupleLifecycle<OutTuple_> nextNodesTupleLifecycle, int outputStoreSize)
-
-
Method Detail
-
insert
public final void insert(InTuple_ tuple)
- Specified by:
insertin interfaceTupleLifecycle<InTuple_ extends AbstractTuple>
-
update
public final void update(InTuple_ tuple)
- Specified by:
updatein interfaceTupleLifecycle<InTuple_ extends AbstractTuple>
-
remap
protected abstract boolean remap(InTuple_ inTuple, OutTuple_ oldOutTuple)
- Parameters:
inTuple- never null; the tuple to apply mappings onoldOutTuple- never null; the tuple that was previously mapped to the inTuple- Returns:
- true if oldOutTuple changed during remapping
-
retract
public final void retract(InTuple_ tuple)
- Specified by:
retractin interfaceTupleLifecycle<InTuple_ extends AbstractTuple>
-
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
-
-