public abstract class BavetAbstractTriConstraintStream<Solution_,A,B,C> extends BavetAbstractConstraintStream<Solution_> implements TriConstraintStream<A,B,C>
Modifier and Type | Field and Description |
---|---|
protected List<BavetAbstractTriConstraintStream<Solution_,A,B,C>> |
childStreamList |
constraintFactory
Constructor and Description |
---|
BavetAbstractTriConstraintStream(BavetConstraintFactory<Solution_> constraintFactory) |
buildConstraint, buildConstraintConfigurable, buildConstraintWeightExtractor, buildConstraintWeightExtractor, getConstraintFactory, getFromStreamList, validateConstraintId
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
penalize, penalizeBigDecimal, penalizeConfigurable, penalizeConfigurableBigDecimal, penalizeConfigurableLong, penalizeLong, reward, rewardBigDecimal, rewardConfigurable, rewardConfigurableBigDecimal, rewardConfigurableLong, rewardLong
getConstraintFactory, penalize, penalizeConfigurable, reward, rewardConfigurable
public BavetAbstractTriConstraintStream(BavetConstraintFactory<Solution_> constraintFactory)
protected void addChildStream(BavetAbstractTriConstraintStream<Solution_,A,B,C> childStream)
public BavetAbstractTriConstraintStream<Solution_,A,B,C> filter(TriPredicate<A,B,C> predicate)
TriConstraintStream
TriPredicate
and match if TriPredicate.test(Object, Object, Object)
returns true.
Important: This is slower and less scalable than BiConstraintStream#join(UniConstraintStream, TriJoiner[])
with a proper TriJoiner
predicate (such as Joiners.equal(BiFunction, Function)
,
because the latter applies hashing and/or indexing, so it doesn't create every combination just to filter it out.
filter
in interface TriConstraintStream<A,B,C>
predicate
- never nullpublic Constraint penalize(String constraintPackage, String constraintName, Score<?> constraintWeight)
ConstraintStream
ConstraintStream.penalize(String, Score)
.penalize
in interface ConstraintStream
constraintPackage
- never nullconstraintName
- never nullconstraintWeight
- never nullpublic Constraint penalize(String constraintPackage, String constraintName, Score<?> constraintWeight, ToIntTriFunction<A,B,C> matchWeigher)
TriConstraintStream
penalize
in interface TriConstraintStream<A,B,C>
constraintPackage
- never nullconstraintName
- never nullconstraintWeight
- never nullmatchWeigher
- never nullpublic Constraint penalizeLong(String constraintPackage, String constraintName, Score<?> constraintWeight, ToLongTriFunction<A,B,C> matchWeigher)
TriConstraintStream
penalizeLong
in interface TriConstraintStream<A,B,C>
constraintPackage
- never nullconstraintName
- never nullconstraintWeight
- never nullmatchWeigher
- never nullpublic Constraint penalizeBigDecimal(String constraintPackage, String constraintName, Score<?> constraintWeight, TriFunction<A,B,C,BigDecimal> matchWeigher)
TriConstraintStream
penalizeBigDecimal
in interface TriConstraintStream<A,B,C>
constraintPackage
- never nullconstraintName
- never nullconstraintWeight
- never nullmatchWeigher
- never nullpublic Constraint penalizeConfigurable(String constraintPackage, String constraintName)
ConstraintStream
ConstraintStream.penalizeConfigurable(String)
.penalizeConfigurable
in interface ConstraintStream
constraintPackage
- never nullconstraintName
- never nullpublic Constraint penalizeConfigurable(String constraintPackage, String constraintName, ToIntTriFunction<A,B,C> matchWeigher)
TriConstraintStream
penalizeConfigurable
in interface TriConstraintStream<A,B,C>
constraintPackage
- never nullconstraintName
- never nullmatchWeigher
- never nullpublic Constraint penalizeConfigurableLong(String constraintPackage, String constraintName, ToLongTriFunction<A,B,C> matchWeigher)
TriConstraintStream
penalizeConfigurableLong
in interface TriConstraintStream<A,B,C>
constraintPackage
- never nullconstraintName
- never nullmatchWeigher
- never nullpublic Constraint penalizeConfigurableBigDecimal(String constraintPackage, String constraintName, TriFunction<A,B,C,BigDecimal> matchWeigher)
TriConstraintStream
penalizeConfigurableBigDecimal
in interface TriConstraintStream<A,B,C>
constraintPackage
- never nullconstraintName
- never nullmatchWeigher
- never nullpublic Constraint reward(String constraintPackage, String constraintName, Score<?> constraintWeight)
ConstraintStream
ConstraintStream.reward(String, Score)
.reward
in interface ConstraintStream
constraintPackage
- never nullconstraintName
- never nullconstraintWeight
- never nullpublic Constraint reward(String constraintPackage, String constraintName, Score<?> constraintWeight, ToIntTriFunction<A,B,C> matchWeigher)
TriConstraintStream
TriConstraintStream.reward(String, Score, ToIntTriFunction)
.reward
in interface TriConstraintStream<A,B,C>
constraintPackage
- never nullconstraintName
- never nullmatchWeigher
- never nullpublic Constraint rewardLong(String constraintPackage, String constraintName, Score<?> constraintWeight, ToLongTriFunction<A,B,C> matchWeigher)
TriConstraintStream
rewardLong
in interface TriConstraintStream<A,B,C>
constraintPackage
- never nullconstraintName
- never nullmatchWeigher
- never nullpublic Constraint rewardBigDecimal(String constraintPackage, String constraintName, Score<?> constraintWeight, TriFunction<A,B,C,BigDecimal> matchWeigher)
TriConstraintStream
rewardBigDecimal
in interface TriConstraintStream<A,B,C>
constraintPackage
- never nullconstraintName
- never nullmatchWeigher
- never nullpublic Constraint rewardConfigurable(String constraintPackage, String constraintName)
ConstraintStream
ConstraintStream.rewardConfigurable(String)
.rewardConfigurable
in interface ConstraintStream
constraintPackage
- never nullconstraintName
- never nullpublic Constraint rewardConfigurable(String constraintPackage, String constraintName, ToIntTriFunction<A,B,C> matchWeigher)
TriConstraintStream
rewardConfigurable
in interface TriConstraintStream<A,B,C>
constraintPackage
- never nullconstraintName
- never nullmatchWeigher
- never nullpublic Constraint rewardConfigurableLong(String constraintPackage, String constraintName, ToLongTriFunction<A,B,C> matchWeigher)
TriConstraintStream
rewardConfigurableLong
in interface TriConstraintStream<A,B,C>
constraintPackage
- never nullconstraintName
- never nullmatchWeigher
- never nullpublic Constraint rewardConfigurableBigDecimal(String constraintPackage, String constraintName, TriFunction<A,B,C,BigDecimal> matchWeigher)
TriConstraintStream
rewardConfigurableBigDecimal
in interface TriConstraintStream<A,B,C>
constraintPackage
- never nullconstraintName
- never nullmatchWeigher
- never nullpublic BavetAbstractTriNode<A,B,C> createNodeChain(BavetNodeBuildPolicy<Solution_> buildPolicy, Score<?> constraintWeight, int nodeOrder, BavetAbstractTriNode<A,B,C> parentNode)
protected BavetAbstractTriNode<A,B,C> processNode(BavetNodeBuildPolicy<Solution_> buildPolicy, int nodeOrder, BavetAbstractTriNode<A,B,C> parentNode, BavetAbstractTriNode<A,B,C> node)
protected void createChildNodeChains(BavetNodeBuildPolicy<Solution_> buildPolicy, Score<?> constraintWeight, int nodeOrder, BavetAbstractTriNode<A,B,C> node)
protected abstract BavetAbstractTriNode<A,B,C> createNode(BavetNodeBuildPolicy<Solution_> buildPolicy, Score<?> constraintWeight, int nodeOrder, BavetAbstractTriNode<A,B,C> parentNode)
Copyright © 2006–2019 JBoss by Red Hat. All rights reserved.