this.weightsInitialStep = new int[series];
this.weightsStep = new int[series];
int totalInputSize = 0, totalWeightSize = 0, i = 0;
for (java.util.Map.Entry<GraphConnections, Integer> e : inputConnections.entrySet()) {
Matrix cg = e.getKey().getConnectionGraph();
inputStartPositions[i] = totalInputSize;
totalInputSize += e.getValue();
weightStartPositions[i] = totalWeightSize;
totalWeightSize += e.getKey().getConnectionGraph().getElements().length;
// depending on the direction of the calculation
if (e.getKey().getOutputLayer() == targetLayer) {
weightsDimension[i] = cg.getColumns();
weightsInitialStep[i] = cg.getColumns();
weightsStep[i] = 1;
} else {
weightsDimension[i] = cg.getRows();
weightsInitialStep[i] = 1;
weightsStep[i] = cg.getColumns();
}
i++;
}