Class AbstractJoinNode<LeftTuple_ extends AbstractTuple,Right_,OutTuple_ extends AbstractTuple>
java.lang.Object
ai.timefold.solver.constraint.streams.bavet.common.AbstractNode
ai.timefold.solver.constraint.streams.bavet.common.AbstractJoinNode<LeftTuple_,Right_,OutTuple_>
- Type Parameters:
LeftTuple_-Right_-
- All Implemented Interfaces:
LeftTupleLifecycle<LeftTuple_>,RightTupleLifecycle<UniTuple<Right_>>
- Direct Known Subclasses:
AbstractIndexedJoinNode,AbstractUnindexedJoinNode
public abstract class AbstractJoinNode<LeftTuple_ extends AbstractTuple,Right_,OutTuple_ extends AbstractTuple>
extends AbstractNode
implements LeftTupleLifecycle<LeftTuple_>, RightTupleLifecycle<UniTuple<Right_>>
This class has two direct children:
AbstractIndexedJoinNode and AbstractUnindexedJoinNode.
The logic in either is identical, except that the latter removes all indexing work.
Therefore any time that one of the classes changes,
the other should be inspected if it could benefit from applying the change there too.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final intprotected final int -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractJoinNode(int inputStoreIndexLeftOutTupleList, int inputStoreIndexRightOutTupleList, TupleLifecycle<OutTuple_> nextNodesTupleLifecycle, boolean isFiltering, int outputStoreIndexLeftOutEntry, int outputStoreIndexRightOutEntry) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract OutTuple_createOutTuple(LeftTuple_ leftTuple, UniTuple<Right_> rightTuple) Instead of calling the propagation directly from here, we export the propagation queue and allowBavetConstraintSessionto call it.protected final voidinnerUpdateLeft(LeftTuple_ leftTuple, Consumer<Consumer<UniTuple<Right_>>> rightTupleConsumer) protected final voidinnerUpdateRight(UniTuple<Right_> rightTuple, Consumer<Consumer<LeftTuple_>> leftTupleConsumer) protected final voidinsertOutTuple(LeftTuple_ leftTuple, UniTuple<Right_> rightTuple) protected final voidinsertOutTupleFiltered(LeftTuple_ leftTuple, UniTuple<Right_> rightTuple) protected final voidretractOutTuple(OutTuple_ outTuple) protected abstract voidsetOutTupleLeftFacts(OutTuple_ outTuple, LeftTuple_ leftTuple) protected abstract voidsetOutTupleRightFact(OutTuple_ outTuple, UniTuple<Right_> rightTuple) protected abstract booleantestFiltering(LeftTuple_ leftTuple, UniTuple<Right_> rightTuple) Methods inherited from class ai.timefold.solver.constraint.streams.bavet.common.AbstractNode
getLayerIndex, setId, setLayerIndex, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface ai.timefold.solver.constraint.streams.bavet.common.tuple.LeftTupleLifecycle
insertLeft, retractLeft, updateLeftMethods inherited from interface ai.timefold.solver.constraint.streams.bavet.common.tuple.RightTupleLifecycle
insertRight, retractRight, updateRight
-
Field Details
-
inputStoreIndexLeftOutTupleList
protected final int inputStoreIndexLeftOutTupleList -
inputStoreIndexRightOutTupleList
protected final int inputStoreIndexRightOutTupleList
-
-
Constructor Details
-
AbstractJoinNode
protected AbstractJoinNode(int inputStoreIndexLeftOutTupleList, int inputStoreIndexRightOutTupleList, TupleLifecycle<OutTuple_> nextNodesTupleLifecycle, boolean isFiltering, int outputStoreIndexLeftOutEntry, int outputStoreIndexRightOutEntry)
-
-
Method Details
-
createOutTuple
-
setOutTupleLeftFacts
-
setOutTupleRightFact
-
testFiltering
-
insertOutTuple
-
insertOutTupleFiltered
-
innerUpdateLeft
protected final void innerUpdateLeft(LeftTuple_ leftTuple, Consumer<Consumer<UniTuple<Right_>>> rightTupleConsumer) -
innerUpdateRight
protected final void innerUpdateRight(UniTuple<Right_> rightTuple, Consumer<Consumer<LeftTuple_>> leftTupleConsumer) -
retractOutTuple
-
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
-