org.optaplanner.core.impl.score.stream.bavet.tri

## Class BavetAbstractTriConstraintStream<Solution_,A,B,C>

- java.lang.Object
- - org.optaplanner.core.impl.score.stream.common.AbstractConstraintStream<Solution_>
  - - org.optaplanner.core.impl.score.stream.bavet.common.BavetAbstractConstraintStream<Solution_>
    - - org.optaplanner.core.impl.score.stream.bavet.tri.BavetAbstractTriConstraintStream<Solution_,A,B,C>

- All Implemented Interfaces:
    ConstraintStream, TriConstraintStream<A,B,C>, InnerTriConstraintStream<A,B,C>
  Direct Known Subclasses:
    BavetFilterTriConstraintStream, BavetJoinTriConstraintStream, BavetScoringTriConstraintStream

      public abstract class BavetAbstractTriConstraintStream<Solution_,A,B,C>
      extends BavetAbstractConstraintStream<Solution_>
      implements InnerTriConstraintStream<A,B,C>

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected List<BavetAbstractTriConstraintStream<Solution_,A,B,C>>` | `childStreamList`

    - ### Fields inherited from class org.optaplanner.core.impl.score.stream.bavet.common.BavetAbstractConstraintStream

      `constraintFactory`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BavetAbstractTriConstraintStream(BavetConstraintFactory<Solution_> constraintFactory)`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `addChildStream(BavetAbstractTriConstraintStream<Solution_,A,B,C> childStream)`
    `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)`
    `BavetAbstractTriNode<A,B,C>` | `createNodeChain(BavetNodeBuildPolicy<Solution_> buildPolicy, Score<?> constraintWeight, int nodeOrder, BavetAbstractTriNode<A,B,C> parentNode)`
    `BavetAbstractTriConstraintStream<Solution_,A,B,C>` | `filter(TriPredicate<A,B,C> predicate)` Exhaustively test each tuple of facts against the `TriPredicate` and match if `TriPredicate.test(Object, Object, Object)` returns true.
    `Constraint` | `impactScore(String constraintPackage, String constraintName, Score<?> constraintWeight, boolean positive)`
    `Constraint` | `impactScore(String constraintPackage, String constraintName, Score<?> constraintWeight, ToIntTriFunction<A,B,C> matchWeigher, boolean positive)`
    `Constraint` | `impactScoreBigDecimal(String constraintPackage, String constraintName, Score<?> constraintWeight, TriFunction<A,B,C,BigDecimal> matchWeigher, boolean positive)`
    `Constraint` | `impactScoreConfigurable(String constraintPackage, String constraintName, boolean positive)`
    `Constraint` | `impactScoreConfigurable(String constraintPackage, String constraintName, ToIntTriFunction<A,B,C> matchWeigher, boolean positive)`
    `Constraint` | `impactScoreConfigurableBigDecimal(String constraintPackage, String constraintName, TriFunction<A,B,C,BigDecimal> matchWeigher, boolean positive)`
    `Constraint` | `impactScoreConfigurableLong(String constraintPackage, String constraintName, ToLongTriFunction<A,B,C> matchWeigher, boolean positive)`
    `Constraint` | `impactScoreLong(String constraintPackage, String constraintName, Score<?> constraintWeight, ToLongTriFunction<A,B,C> matchWeigher, boolean positive)`
    `protected BavetAbstractTriNode<A,B,C>` | `processNode(BavetNodeBuildPolicy<Solution_> buildPolicy, int nodeOrder, BavetAbstractTriNode<A,B,C> parentNode, BavetAbstractTriNode<A,B,C> node)`

    - ### Methods inherited from class org.optaplanner.core.impl.score.stream.bavet.common.BavetAbstractConstraintStream

      `buildConstraint, buildConstraintConfigurable, getConstraintFactory, getFromStreamList`

    - ### Methods inherited from class org.optaplanner.core.impl.score.stream.common.AbstractConstraintStream

      `buildConstraintWeightExtractor, buildConstraintWeightExtractor, penalize, penalizeConfigurable, reward, rewardConfigurable, validateConstraintId`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface org.optaplanner.core.impl.score.stream.tri.InnerTriConstraintStream

      `penalize, penalizeBigDecimal, penalizeConfigurable, penalizeConfigurableBigDecimal, penalizeConfigurableLong, penalizeLong, reward, rewardBigDecimal, rewardConfigurable, rewardConfigurableBigDecimal, rewardConfigurableLong, rewardLong`

    - ### Methods inherited from interface org.optaplanner.core.api.score.stream.tri.TriConstraintStream

      `penalize, penalizeBigDecimal, penalizeConfigurable, penalizeConfigurableBigDecimal, penalizeConfigurableLong, penalizeLong, reward, rewardBigDecimal, rewardConfigurable, rewardConfigurableBigDecimal, rewardConfigurableLong, rewardLong`

    - ### Methods inherited from interface org.optaplanner.core.api.score.stream.ConstraintStream

      `getConstraintFactory, penalize, penalize, penalizeConfigurable, penalizeConfigurable, reward, reward, rewardConfigurable, rewardConfigurable`

- - ### Field Detail

    - #### childStreamList

          protected final List<BavetAbstractTriConstraintStream<Solution_,A,B,C>> childStreamList

  - ### Constructor Detail

    - #### BavetAbstractTriConstraintStream

          public BavetAbstractTriConstraintStream(BavetConstraintFactory<Solution_> constraintFactory)

  - ### Method Detail

    - #### addChildStream

          protected void addChildStream(BavetAbstractTriConstraintStream<Solution_,A,B,C> childStream)

    - #### filter

          public BavetAbstractTriConstraintStream<Solution_,A,B,C> filter(TriPredicate<A,B,C> predicate)

      Description copied from interface: `TriConstraintStream`
      Exhaustively test each tuple of facts against the `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.

      Specified by:
        `filter` in interface `TriConstraintStream<A,B,C>`
      Parameters:
        `predicate` - never null
      Returns:
        never null

    - #### impactScore

          public final Constraint impactScore(String constraintPackage,
                                              String constraintName,
                                              Score<?> constraintWeight,
                                              boolean positive)

      Specified by:
        `impactScore` in class `AbstractConstraintStream<Solution_>`

    - #### impactScore

          public final Constraint impactScore(String constraintPackage,
                                              String constraintName,
                                              Score<?> constraintWeight,
                                              ToIntTriFunction<A,B,C> matchWeigher,
                                              boolean positive)

      Specified by:
        `impactScore` in interface `InnerTriConstraintStream<A,B,C>`

    - #### impactScoreLong

          public final Constraint impactScoreLong(String constraintPackage,
                                                  String constraintName,
                                                  Score<?> constraintWeight,
                                                  ToLongTriFunction<A,B,C> matchWeigher,
                                                  boolean positive)

      Specified by:
        `impactScoreLong` in interface `InnerTriConstraintStream<A,B,C>`

    - #### impactScoreBigDecimal

          public final Constraint impactScoreBigDecimal(String constraintPackage,
                                                        String constraintName,
                                                        Score<?> constraintWeight,
                                                        TriFunction<A,B,C,BigDecimal> matchWeigher,
                                                        boolean positive)

      Specified by:
        `impactScoreBigDecimal` in interface `InnerTriConstraintStream<A,B,C>`

    - #### impactScoreConfigurable

          public final Constraint impactScoreConfigurable(String constraintPackage,
                                                          String constraintName,
                                                          boolean positive)

      Specified by:
        `impactScoreConfigurable` in class `AbstractConstraintStream<Solution_>`

    - #### impactScoreConfigurable

          public final Constraint impactScoreConfigurable(String constraintPackage,
                                                          String constraintName,
                                                          ToIntTriFunction<A,B,C> matchWeigher,
                                                          boolean positive)

      Specified by:
        `impactScoreConfigurable` in interface `InnerTriConstraintStream<A,B,C>`

    - #### impactScoreConfigurableLong

          public final Constraint impactScoreConfigurableLong(String constraintPackage,
                                                              String constraintName,
                                                              ToLongTriFunction<A,B,C> matchWeigher,
                                                              boolean positive)

      Specified by:
        `impactScoreConfigurableLong` in interface `InnerTriConstraintStream<A,B,C>`

    - #### impactScoreConfigurableBigDecimal

          public final Constraint impactScoreConfigurableBigDecimal(String constraintPackage,
                                                                    String constraintName,
                                                                    TriFunction<A,B,C,BigDecimal> matchWeigher,
                                                                    boolean positive)

      Specified by:
        `impactScoreConfigurableBigDecimal` in interface `InnerTriConstraintStream<A,B,C>`

    - #### createNodeChain

          public BavetAbstractTriNode<A,B,C> createNodeChain(BavetNodeBuildPolicy<Solution_> buildPolicy,
                                                             Score<?> constraintWeight,
                                                             int nodeOrder,
                                                             BavetAbstractTriNode<A,B,C> parentNode)

    - #### processNode

          protected BavetAbstractTriNode<A,B,C> processNode(BavetNodeBuildPolicy<Solution_> buildPolicy,
                                                            int nodeOrder,
                                                            BavetAbstractTriNode<A,B,C> parentNode,
                                                            BavetAbstractTriNode<A,B,C> node)

    - #### createChildNodeChains

          protected void createChildNodeChains(BavetNodeBuildPolicy<Solution_> buildPolicy,
                                               Score<?> constraintWeight,
                                               int nodeOrder,
                                               BavetAbstractTriNode<A,B,C> node)

    - #### createNode

          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.