List of usage examples for com.google.common.math LinearTransformation mapping
public static LinearTransformationBuilder mapping(double x1, double y1)
From source file:de.muspellheim.datenverteiler.fuzzylib.FuzzySet.java
double zugehoerigkeit(double wert) { if (t1 <= wert && wert < t2) return LinearTransformation.mapping(t1, 0).and(t2, 1).transform(wert); else if (t2 <= wert && wert <= t3) return 1.0; else if (t3 < wert && wert <= t4) return LinearTransformation.mapping(t3, 1).and(t4, 0).transform(wert); return 0.0;//w w w.j ava 2s .c om }