コード例 #1
0
  public void setFramePartialTruth(
      TruthValue truthvalue, double posscore, double negscore, boolean ignorepolarityP) {
    {
      PartialMatchFrame self = this;

      {
        boolean flippolarityP = self.controlFrame.reversePolarityP && (!ignorepolarityP);

        if ((posscore == Stella.NULL_FLOAT) && (truthvalue != null)) {
          posscore = truthvalue.positiveScore;
        }
        if ((negscore == Stella.NULL_FLOAT) && (truthvalue != null)) {
          negscore = TruthValue.invertTruthValue(truthvalue).positiveScore;
        }
        if (flippolarityP) {
          {
            double aux = posscore;

            posscore = 0 - posscore;
            negscore = aux;
          }
        }
        self.positiveScore = posscore;
        self.negativeScore = negscore;
        KeyValueList.setDynamicSlotValue(
            ((QueryIterator) (Logic.$QUERYITERATOR$.get())).dynamicSlots,
            Logic.SYM_LOGIC_LATEST_POSITIVE_SCORE,
            FloatWrapper.wrapFloat(posscore),
            Stella.NULL_FLOAT_WRAPPER);
      }
    }
  }