Function[] functions = new Function[] { fi.parse("x0 < .2", 1),
new ConstantFunction(1, .5f), new ConstantFunction(1, .2f),
new ConstantFunction(1, .3f) };
FunctionInput in = new FunctionInput("input", functions, Units.UNK);
NEFEnsembleFactory ef = new NEFEnsembleFactoryImpl();
NEFEnsemble A = ef.make("A", 100, 1, "A", false);
NEFEnsemble B = ef.make("B", 100, 1, "B", false);
NEFEnsemble C = ef.make("C", 100, 1, "C", false);
NEFEnsemble D = ef.make("D", 100, 1, "D", false);
NEFEnsemble rule1a = ef.make("rule1a", 500, 2, "rule1a", false);
NEFEnsemble rule1b = ef.make("rule1b", 500, 2, "rule1b", false);
NEFEnsemble rule2 = ef.make("rule2", 200, 1, "rule2", false);
rule2.collectSpikes(true);
rule1a.addDecodedOrigin("OR", new Function[] { new MAX(2) },
Neuron.AXON);
rule1b.addDecodedOrigin("AND", new Function[] { new MIN(2) },
Neuron.AXON);
rule1a.doneOrigins();
rule1b.doneOrigins();
rule2.doneOrigins();
NEFEnsemble output = ef.make("output", 500, 5, "fuzzyoutput", false);
net.addNode(in);
net.addNode(A);
net.addNode(B);
net.addNode(C);