@Test public void testGetLayerUnits(){ for(int layerIndex = 0; layerIndex < NET_TOPOLOGY.length; layerIndex++){ List<Neuron> layer = neuralNet.getLayerUnits(layerIndex); assertEquals("Count of units of a layer is not as expected.", NET_TOPOLOGY[layerIndex], layer.size()); for(Neuron neuron : layer){ assertEquals("Neuron bias is not as expected.", BIAS, neuron.getBiasInput(), 0); if(layerIndex == 0){ assertEquals("Activation function of a neuron is not as expected.", ACT_FUNCT_INPUT_LAYER_CLASS, neuron.getActivationFunction().getClass()); } else{ assertEquals("Activation function of a neuron is not as expected.", ACT_FUNCT_CLASS, neuron.getActivationFunction().getClass()); } } } }
public List<Neuron> getLayerUnits(int layerIndex) { return Collections.unmodifiableList(layers.get(layerIndex)); }
BasicNeuralNet implements NeuralNet, Serializable { public List<Neuron> getLayerUnits(int layerIndex) { return Collections.unmodifiableList(layers.get(layerIndex)); } }
BasicNeuralNet implements NeuralNet, Serializable { public List<Neuron> getLayerUnits(int layerIndex) { return Collections.unmodifiableList(layers.get(layerIndex)); } BasicNeuralNet(int[] netTopology, double biasInput,
            Class<? extends ActivationFunction> activationFunction, Random random); }
BasicNeuralNet implements NeuralNet, Serializable { public List<Neuron> getLayerUnits(int layerIndex) { return Collections.unmodifiableList(layers.get(layerIndex)); } BasicNeuralNet(int[] netTopology, double biasInput,
            Class<? extends ActivationFunction> activationFunction, Random random); List<Neuron> getLayerUnits(int layerIndex); int getLayersCount(); double[] feedForward(final double[] inputPattern); double[] getOutput(); void reset(); int getNetInputSize(); int getNetOutputSize(); }
BasicNeuralNet implements NeuralNet, Serializable { public List<Neuron> getLayerUnits(int layerIndex) { return Collections.unmodifiableList(layers.get(layerIndex)); } BasicNeuralNet(int[] netTopology, double biasInput,
            Class<? extends ActivationFunction> activationFunction, Random random); List<Neuron> getLayerUnits(int layerIndex); int getLayersCount(); double[] feedForward(final double[] inputPattern); double[] getOutput(); void reset(); int getNetInputSize(); int getNetOutputSize();  }