Network network = new NetworkImpl();
Function f = new ConstantFunction(1, 1f);
// Function f = new SineFunction();
FunctionInput input = new FunctionInput("input", new Function[]{f}, Units.UNK);
network.addNode(input);
NEFEnsembleFactory ef = new NEFEnsembleFactoryImpl();
NEFEnsemble integrator = ef.make("integrator", 500, 1, "integrator1", true);
network.addNode(integrator);
integrator.collectSpikes(true);
Plotter.plot(integrator);
Plotter.plot(integrator, NEFEnsemble.X);
float tau = .05f;
Termination interm = integrator.addDecodedTermination("input", new float[][]{new float[]{tau}}, tau, false);
// Termination interm = integrator.addDecodedTermination("input", new float[][]{new float[]{1f}}, tau);
network.addProjection(input.getOrigin(FunctionInput.ORIGIN_NAME), interm);
Termination fbterm = integrator.addDecodedTermination("feedback", new float[][]{new float[]{1f}}, tau, false);
network.addProjection(integrator.getOrigin(NEFEnsemble.X), fbterm);
//System.out.println("Network creation: " + (System.currentTimeMillis() - start));