Skip to content

Instantly share code, notes, and snippets.

@attatrol
Last active February 17, 2016 21:33
Show Gist options
  • Save attatrol/6956a87ba11963f9d4a4 to your computer and use it in GitHub Desktop.
Save attatrol/6956a87ba11963f9d4a4 to your computer and use it in GitHub Desktop.
epam Q5
package attatrol.fuzzy.fuzzyparser;
import java.util.Set;
import attatrol.exparser.ExpressionParser;
import attatrol.exparser.tokens.InfixOperation;
import attatrol.exparser.tokens.PrefixOperation;
import attatrol.fuzzy.FuzzySet;
public class FuzzyParser {
private static <T> PrefixOperation getFuzzyOp(Set<T> universal) {
PrefixOperation negate = new PrefixOperation() {
@Override
public Object calculate(Object arg)
{
final FuzzySet<T> fs = (FuzzySet<T>) arg;
return BasicFuzzySetOperations.negation(fs, universal);
}
};
return negate;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment