@Override
	void vectorField(double t, double A[], double F[]) throws Exception {
		int i, j;
		int comp;
		double d, d2, d3;
		double TOL2 = this.paramTOL * this.paramTOL;

		for (i = 0; i < this.firstSpeedPos; i++) {
			F[i] = A[this.firstSpeedPos + i];
			F[this.firstSpeedPos + i] = 0.;
		}

		for (i = 1; i < this.bodies; i++) {
			d2 = d3 = 0D;
			for (j = i - 1; j >= 0; j--) {
				if (this.M[i] > this.paramTOL || this.M[j] > this.paramTOL) {
					d2 = Funcions.dist2(A, 3 * i, A, 3 * j);
					if (d2 < TOL2) {
						throw new Exception("Collision " + Integer.toString(i)
								+ " " + Integer.toString(j));
					}
					d = Math.sqrt(d2);
					d3 = d * d2;
					for (comp = 0; comp < 3; comp++) {
						double aux = (A[3 * j + comp] - A[3 * i + comp]) / d3;
						F[this.firstSpeedPos + 3 * i + comp] += this.M[j] * aux;
						F[this.firstSpeedPos + 3 * j + comp] -= this.M[i] * aux;
					}
				}
			}
		}
		for (i = 0; i < this.firstSpeedPos; i++) {
			F[this.firstSpeedPos + i] *= G;
		}
	}