public Network(int inputNeurons, int hiddenLayers, int hiddenNeurons, int outputNeurons, boolean biased) {
		if (inputNeurons < 1 || outputNeurons < 1 || hiddenLayers < 0) {
			throw new IllegalArgumentException();
		}
		
		if (hiddenLayers > 0 && hiddenNeurons < 1) {
			throw new IllegalArgumentException();
		}
		
		inputs = inputNeurons;
		outputs = outputNeurons;
		hiddenL = hiddenLayers;
		hiddenN = hiddenNeurons;
		this.biased = biased;
		
		weightLayer = new WeightsLayer[hiddenLayers + 1];
		inputLayer = new NeuronLayer(inputNeurons);
		
		if(hiddenLayers != 0) { // There are hidden layers
			weightLayer[0] = new WeightsLayer(inputNeurons, hiddenNeurons, biased); // Between input and first hidden
			
			hiddenLayer = new NeuronLayer[hiddenLayers];
			for (int i = 0; i < hiddenLayers; i++) {
				hiddenLayer[i] = new NeuronLayer(hiddenNeurons);
			}
			
			// Create all weight layers
			// Between hidden layers
			for (int i = 1; i < hiddenLayers; i++) {
				weightLayer[i] = new WeightsLayer(hiddenNeurons, hiddenNeurons, biased);
			}
			
			for (int i = 0; i < hiddenLayers; i++) {
				weightLayer[i].setNextNeuronLayer(hiddenLayer[i]);
			}
			
			outputLayer = new NeuronLayer(outputNeurons);
			weightLayer[hiddenLayers] = new WeightsLayer(hiddenNeurons, outputNeurons, biased);
			weightLayer[hiddenLayers].setNextNeuronLayer(outputLayer);
			
			
		} else { // No hidden layers
			hiddenLayer = new NeuronLayer[0];
			weightLayer[0] = new WeightsLayer(inputNeurons, outputNeurons, biased);
			outputLayer = new NeuronLayer(outputNeurons);
			weightLayer[0].setNextNeuronLayer(outputLayer);
		}
	}