private void initMatrices() {
		this.size = graph.getVertexes().size();
		this.trans = new MatrixArray(this.size, this.size, NULL_DOUBLE);
		this.dist = new MatrixArray(this.size, this.size);
		
		// the distance from each vertice to itself is zero.
		// the distance to all other vertices is initialized with INFINITY
		for (int i = 1; i <= this.size; i++)
			for (int j = 1; j <= this.size; j++)
				if (i == j) {
					dist.insert(i, j, 0);
				} else {
					dist.insert(i, j, INF);
				}
		
		// update the distances in the matrix
		// so that the weights at the edges are the elements
		// of the matrix
		for (Long eId : graph.getEdges()) {
			int srcID = (int) graph.getSource(eId);
			int destID = (int) graph.getTarget(eId);
			accessCount += 2;
			// plus 1 rechnen, weil die IDs nullbasiert sind,
			// und die Matrix 1 basiert ist

			dist.insert(srcID + 1, destID + 1,
					graph.getValE(eId, cmpByAttribute));
		}
	}