public Layer(int numberOfNeurons, int numberOfInputs,
double lowerLimitForWeights, double upperLimitForWeights,
ActivationFunction af) {
activationFunction = af;
this.weightMatrix = new Matrix(numberOfNeurons, numberOfInputs);
lastWeightUpdateMatrix = new Matrix(weightMatrix.getRowDimension(),
weightMatrix.getColumnDimension());
penultimateWeightUpdateMatrix = new Matrix(weightMatrix
.getRowDimension(), weightMatrix.getColumnDimension());
this.biasVector = new Vector(numberOfNeurons);
lastBiasUpdateVector = new Vector(biasVector.getRowDimension());
penultimateBiasUpdateVector = new Vector(biasVector.getRowDimension());
initializeMatrix(weightMatrix, lowerLimitForWeights,
upperLimitForWeights);
initializeVector(biasVector, lowerLimitForWeights, upperLimitForWeights);
}