Package expressions

Examples of expressions.FuzzyMultiExpression


  // This is the completion for rules as defined in the ICLP paper
  public FuzzyExpression createCompletion () {
    ArrayList<FuzzyExpression> args = new ArrayList<FuzzyExpression>();
    args.add(convertBodyExpression());
    args.add(convertToFuzzyExpression());
    return new FuzzyMultiExpression(args,getRuleTNorm());
  }
View Full Code Here


    // of the body operator to the body elements:
    ArrayList<FuzzyExpression> bodyExpArgs = new ArrayList<FuzzyExpression>();
    Iterator<B> it = getBodyElements().iterator();
    while (it.hasNext())
      bodyExpArgs.add(it.next().convertToFuzzyExpression());
    return new FuzzyMultiExpression(bodyExpArgs,getBodyOperator());
  }
View Full Code Here

  public FuzzyExpression convertToFuzzyExpression() {
    ArrayList<FuzzyExpression> args = new ArrayList();
    args.add(convertBodyExpression());
    args.add(getHead().convertToFuzzyExpression());
    return new FuzzyMultiExpression(args,getBodyOperator());
  }
View Full Code Here

  public FuzzyExpression convertToFuzzyExpression() {
    ArrayList<FuzzyExpression> args = new ArrayList<FuzzyExpression>();
    args.add(convertBodyExpression());
    args.add(getHead().convertToFuzzyExpression());
    return new FuzzyMultiExpression(args,getRuleImplicator());
  }
View Full Code Here

  public FuzzyExpression convertToFuzzyExpression () {
    ArrayList<FuzzyExpression> args = new ArrayList<FuzzyExpression>();
    args.add(convertBodyExpression());
    args.add(getHead().convertToFuzzyExpression());
    return new FuzzyMultiExpression(args,getBodyOperator());
  }
View Full Code Here

            if (r.getHead() instanceof GroundLiteral) {
                GroundLiteral l = (GroundLiteral) r.getHead();
                ArrayList<FuzzyExpression> args = new ArrayList<FuzzyExpression>();
                args.add(r.convertBodyExpression());
                args.add(new FuzzyConstantExpression(rho.getValue(r)));
                FuzzyExpression support = new FuzzyMultiExpression(args, r.getRuleTNorm());
                if (litMap.containsKey(l)) {
                    // Use the maximum directly in the expression associated.
                    litMap.put(l, new FuzzyBinaryExpression(litMap.get(l), support, new SM()));
                } else {
                    litMap.put(l, support);
View Full Code Here

  public FuzzyExpression convertToFuzzyExpression() {
    ArrayList<FuzzyExpression> args = new ArrayList();
    args.add(convertBodyExpression());
    args.add(getHead().convertToFuzzyExpression());
    return new FuzzyMultiExpression(args,getBodyOperator());
  }
View Full Code Here

        // denotes the body of rule r and /\_r is the t-norm associated
        // with r
        ArrayList<FuzzyExpression> args = new ArrayList<FuzzyExpression>();
        args.add(r.convertBodyExpression());
        args.add(r.convertToFuzzyExpression());
        FuzzyExpression ruleBodyCompletion = new FuzzyMultiExpression(args, r.getRuleTNorm());


        if (ruleMap.containsKey(l)) {
          // Add the body completion of the new rule to the body completion of the other rules
          // with this literal in the head using the minimum
View Full Code Here

    // 2.a Create antecedent: max(l1,...,ln) for l in loop
    ArrayList<FuzzyExpression> antList = new ArrayList<FuzzyExpression>();
    for (GroundLiteral l : loop) {
      antList.add(new FuzzyVariableExpression(l.toString()));
    }
    FuzzyExpression ant = new FuzzyMultiExpression(antList, new SM());
    // 2.b Create consequent: max(B1,...,Bn) for l <- Bi in R^{+}(P,L)
    ArrayList<FuzzyExpression> consList = new ArrayList<FuzzyExpression>();
    // Add a zero for elements that never occur in the head of a rule
    consList.add(new FuzzyConstantExpression(0.0));
    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

  public FuzzyExpression convertToFuzzyExpression () {
    ArrayList<FuzzyExpression> args = new ArrayList<FuzzyExpression>();
    args.add(convertBodyExpression());
    args.add(getHead().convertToFuzzyExpression());
    return new FuzzyMultiExpression(args,getBodyOperator());
  }
View Full Code Here

TOP

Related Classes of expressions.FuzzyMultiExpression

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.