Package ca.nengo.model.impl

Examples of ca.nengo.model.impl.EnsembleImpl


            float[][] weights = new float[neurons.length][];
            for (int i = 0; i < neurons.length; i++) {
                neurons[i] = factory.make("neuron"+i);
                weights[i] = new float[]{1};
            }
            EnsembleImpl ensemble = new EnsembleImpl("ensemble", neurons);
            ensemble.addTermination("input", weights, .005f, false);
            ensemble.collectSpikes(true);
            network.addNode(ensemble);

            FunctionInput input = new FunctionInput("input", new Function[]{new PiecewiseConstantFunction(new float[]{0.2f}, new float[]{0, 0.5f})}, Units.UNK);
            network.addNode(input);

            network.addProjection(input.getOrigin(FunctionInput.ORIGIN_NAME), ensemble.getTermination("input"));

//          Probe vProbe = network.getSimulator().addProbe("ensemble", 0, "V", true);
//          Probe nProbe = network.getSimulator().addProbe("ensemble", 0, "N", true);
//          Probe iProbe = network.getSimulator().addProbe("ensemble", 0, "I", true);
            Probe rProbe = network.getSimulator().addProbe("ensemble", "rate", true);
View Full Code Here

TOP

Related Classes of ca.nengo.model.impl.EnsembleImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.