protected void calculate(ValuesProvider valuesProvider, List<ConnectionCandidate> connections, NeuralNetwork nn) {
if (connections.size() > 0) {
List<Connections> chunk = new ArrayList<>();
for (int i = 0; i < connections.size(); i++) {
ConnectionCandidate c = connections.get(i);
chunk.add(c.connection);
if (i == connections.size() - 1 || connections.get(i + 1).target != c.target) {
ConnectionCalculator cc = getConnectionCalculator(c.target);
if (cc != null) {