private ConcurrentBufferedUpdate(final Network network){
  this.network=network;
  currentAvailableProcessors=getAvailableConsumerProcessors();
  executors=Executors.newFixedThreadPool(currentAvailableProcessors);
  for (  Neuron n : network.getFlatNeuronList()) {
    neurons.add(n);
  }
  for (  NeuronGroup ng : network.getFlatNeuronGroupList()) {
    neurons.addAll(ng.getNeuronList());
  }
  taskSet=new CyclicTaskQueue(neurons,currentAvailableProcessors);
}

private ConcurrentBufferedUpdate ( final Network network ) { this . network = network ; currentAvailableProcessors = getAvailableConsumerProcessors ( ) ; executors = Executors . newFixedThreadPool ( currentAvailableProcessors ) ; for ( Neuron n : network . getFlatNeuronList ( ) ) { neurons . add ( n ) ; } for ( NeuronGroup ng : network . getFlatNeuronGroupList ( ) ) { neurons . addAll ( ng . getNeuronList ( ) ) ; } taskSet = new CyclicTaskQueue ( neurons , currentAvailableProcessors ) ; }
creates the consumer threads , in a quantity equal to the number of available processors , since the producer ' s job is small enough that having more threads than processors will not be problematic ( they are also not active at the same time at least half the time ) . also populates this classes copy of the neurons in the network .
