Examples of MembershipFunctionPieceWiseLinear


Examples of net.sourceforge.jFuzzyLogic.membership.MembershipFunctionPieceWiseLinear

        x[i] = parseDouble(point); // Parse and add each point
        y[i] = parseDouble(point.getNextSibling());
        Gpr.debug(debug, "Parsed point " + i + " x=" + x[i] + ", y=" + y[i]);
      } else throw new RuntimeException("Unknown (or unimplemented) option : " + leaveName);
    }
    return new MembershipFunctionPieceWiseLinear(x, y);
  }
View Full Code Here

Examples of net.sourceforge.jFuzzyLogic.membership.MembershipFunctionPieceWiseLinear

    //       TERM excellent := (6, 0) (9, 1);
    //    END_FUZZIFY

    Value poorX[] = { new Value(0), new Value(4) };
    Value poorY[] = { new Value(1), new Value(0) };
    MembershipFunction poor = new MembershipFunctionPieceWiseLinear(poorX, poorY);

    MembershipFunction good = new MembershipFunctionTrapetzoidal(new Value(1), new Value(4), new Value(6), new Value(9));

    Value exX[] = { new Value(6), new Value(9), new Value(10) };
    Value exY[] = { new Value(0), new Value(1), new Value(1) };
    MembershipFunction excellent = new MembershipFunctionPieceWiseLinear(exX, exY);

    LinguisticTerm ltPoor = new LinguisticTerm("poor", poor);
    LinguisticTerm ltGood = new LinguisticTerm("good", good);
    LinguisticTerm ltExcellent = new LinguisticTerm("excellent", excellent);

    service.add(ltPoor);
    service.add(ltGood);
    service.add(ltExcellent);

    //    FUZZIFY food
    //       TERM rancid := (0, 1) (1, 1) (3,0) ;
    //       TERM delicious := (7,0) (9,1) (10,1);
    //    END_FUZZIFY

    Value ranX[] = { new Value(0), new Value(1), new Value(3) };
    Value ranY[] = { new Value(1), new Value(1), new Value(0) };
    MembershipFunction rancid = new MembershipFunctionPieceWiseLinear(ranX, ranY);

    Value delX[] = { new Value(7), new Value(9), new Value(10) };
    Value delY[] = { new Value(0), new Value(1), new Value(1) };
    MembershipFunction delicious = new MembershipFunctionPieceWiseLinear(delX, delY);

    LinguisticTerm ltRancid = new LinguisticTerm("rancid", rancid);
    LinguisticTerm ltDelicious = new LinguisticTerm("delicious", delicious);

    food.add(ltRancid);
View Full Code Here

Examples of net.sourceforge.jFuzzyLogic.membership.MembershipFunctionPieceWiseLinear

        y[childNum - 1] = new Value(child.getChild(1), this);
        if( debug ) Gpr.debug("\t\tParsed point " + childNum + " x=" + x[childNum - 1] + ", y=" + y[childNum - 1]);
        if( (y[childNum - 1].getValue() < 0) || (y[childNum - 1].getValue() > 1) ) throw new RuntimeException("\n\tError parsing line " + child.getLine() + " character " + child.getCharPositionInLine() + ": Membership function out of range (should be between 0 and 1). Value: '" + y[childNum - 1] + "'\n\tTree: " + child.toStringTree());
      } else throw new RuntimeException("Unknown (or unimplemented) option : " + leaveName);
    }
    return new MembershipFunctionPieceWiseLinear(x, y);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.