protected void normaliseWeights() {
        double sum;

        sum = 0;
        for (int i = 0; i < particleCount; i++) {
            sum += particles[0][i];
        }
        for (int i = 0; i < particleCount; i++) {
            particles[0][i] = particles[0][i] / sum;
        }
    }