Package fuzzysat

Examples of fuzzysat.FuzzyLiteral


    // such that H(r_i) = a for i = 1..n, hence we add them as two implications.
    for (GroundLiteral l : ruleMap.keySet()) {
      FuzzyExpression litExp = l.convertToFuzzyExpression();
      FuzzyExpression bodyExp = ruleMap.get(l);
      // Add the first implication of the equivalence
      literalList.add(new FuzzyLiteral(1.0, 1.0, new FuzzyBinaryExpression(litExp, bodyExp, new IW())));
      // The second implication of the equivalence
      literalList.add(new FuzzyLiteral(1.0, 1.0, new FuzzyBinaryExpression(bodyExp, litExp, new IW())));


    } // Finally add l = 0 for each non-naf literal occurring nowhere in a rule head.
    // TODO: untested!
    for (GroundLiteral l : getLiterals()) {
      if (l.isNaf()) {
        l = new GroundLiteral(l.getPredicate(), l.isNegated(), false, null);
      }


      if (!ruleMap.containsKey(l)) // We'll add IW(l,0) = 1, which is equivalent to l = 0 as IW(l,0) = 1-l
      {
        literalList.add(new FuzzyLiteral(1.0, 1.0, new FuzzyBinaryExpression(
            l.convertToFuzzyExpression(), new FuzzyConstantExpression(0), new IW())));
      }


    }
View Full Code Here


    for (GroundRule r : rMinus) {
      consList.add(r.convertBodyExpression());
    }
    FuzzyExpression cons = new FuzzyMultiExpression(consList, new SM());
    return new FuzzyClause(
        new FuzzyLiteral(1.0, 1.0, new FuzzyBinaryExpression(ant, cons, new IW())));
  }
View Full Code Here

        // the loop should be zero.
        consExp = new FuzzyConstantExpression(0.0);


      }
      return new FuzzyLiteral(1.0, 1.0, new FuzzyBinaryExpression(antecExp, consExp, new IW()));


    } else {
      // If there is no loop, this method shouldn't have been called, so
      // we return an easy literal.
      return new FuzzyLiteral(0.0, 0.0, new FuzzyConstantExpression(0.0));


    }

  }
View Full Code Here

    return new FuzzyMultiExpression(args,getBodyOperator());
  }

  @Override
  public FuzzyLiteral convertToFuzzyLiteral(Double lowerBound) {
    return new FuzzyLiteral(lowerBound,1.0,convertToFuzzyExpression());
  }
View Full Code Here

TOP

Related Classes of fuzzysat.FuzzyLiteral

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.