//+++++++++++++++++++++++++++++++++++++++++++++++++++++ // File automatically generated by Xfuzzy - DO NOT EDIT //+++++++++++++++++++++++++++++++++++++++++++++++++++++ package pkg.xfl.binary; import xfuzzy.lang.*; public class dubois_prade extends Binary { public dubois_prade() { super("xfl","dubois_prade"); Parameter single[] = new Parameter[0]; setSingleParameters(single); } public double compute(double a, double b) { return (b==0? 1-a : (a==1? b : 1) ); } public double[] derivative(double a, double b) { double[] deriv = new double[2]; deriv[0] = (b==0? -1 : 0); deriv[1] = (a==1? 1 : 0); return deriv; } public boolean test () { return true; } public String getJavaCode() { String eol = System.getProperty("line.separator", "\n"); String code = ""; code += " return (b==0? 1-a : (a==1? b : 1) ); "+eol; return code; } public String getCCode() { String eol = System.getProperty("line.separator", "\n"); String code = ""; code += " return (b==0? 1-a : (a==1? b : 1) ); "+eol; return code; } public String getCppCode() { String eol = System.getProperty("line.separator", "\n"); String code = ""; code += " return (b==0? 1-a : (a==1? b : 1) ); "+eol; return code; } }