Class SimpleDoubleScoreHolder

    • Field Detail

      • matchExecutorByNumberMap

        protected final Map<org.kie.api.definition.rule.Rule,​BiConsumer<org.kie.api.runtime.rule.RuleContext,​Double>> matchExecutorByNumberMap
        Deprecated.
      • score

        protected double score
        Deprecated.
    • Constructor Detail

      • SimpleDoubleScoreHolder

        public SimpleDoubleScoreHolder​(boolean constraintMatchEnabled)
        Deprecated.
    • Method Detail

      • getScore

        public double getScore()
        Deprecated.
      • penalize

        public void penalize​(org.kie.api.runtime.rule.RuleContext kcontext)
        Deprecated.
        Penalize a match by the ConstraintWeight negated.
        Parameters:
        kcontext - never null, the magic variable in DRL
      • penalize

        public void penalize​(org.kie.api.runtime.rule.RuleContext kcontext,
                             double weightMultiplier)
        Deprecated.
        Penalize a match by the ConstraintWeight negated and multiplied with the weightMultiplier for all score levels.
        Parameters:
        kcontext - never null, the magic variable in DRL
        weightMultiplier - at least 0
      • reward

        public void reward​(org.kie.api.runtime.rule.RuleContext kcontext)
        Deprecated.
        Reward a match by the ConstraintWeight.
        Parameters:
        kcontext - never null, the magic variable in DRL
      • reward

        public void reward​(org.kie.api.runtime.rule.RuleContext kcontext,
                           double weightMultiplier)
        Deprecated.
        Reward a match by the ConstraintWeight multiplied with the weightMultiplier for all score levels.
        Parameters:
        kcontext - never null, the magic variable in DRL
        weightMultiplier - at least 0
      • addConstraintMatch

        public void addConstraintMatch​(org.kie.api.runtime.rule.RuleContext kcontext,
                                       double weight)
        Deprecated.
        Parameters:
        kcontext - never null, the magic variable in DRL
        weight - higher is better, negative for a penalty, positive for a reward