class FuzzySet { private int shape; // 1:triangle; 2:trapezium; 3:isosceles trapezium private double tri[]; private double trapz[]; private double isotrapz[]; public FuzzySet(int shape, double[] pts) { this.shape = shape; if(shape==1 && pts.length==3) { tri = pts; } else if(shape==2 && pts.length==2) { trapz = pts; } else if(shape==3 && pts.length==4) { isotrapz = pts; } else System.err.println("shape points does not match"); } public double getTriMembership(double x) { if( x>=0 && x=tri[0] && x=tri[1] && xleft; false->right if( x>=0.0 && x=trapz[0] && x=isotrapz[0] && x=isotrapz[1] && x=isotrapz[2] && x