@SuppressWarnings("unchecked")
	private WeightedEdge[] bucketSortMSTEdges() {
		// initialize buckets
		LinkedList<WeightedEdge>[] buckets =
			new LinkedList[msb(WeightedEdge.MAXIMUM_EDGE_WEIGHT)];
		
		for (int i = 0; i < buckets.length; i++) {
			buckets[i] = new LinkedList<WeightedEdge>();
		}
		
		// bucket edges
		for (int v = 0; v < m.getNumberOfVertices(); v++) {
			for (WeightedEdge e : m.getIncidentEdges(v)) {
				if (e.getSource() < e.getTarget()) {
					buckets[msb(e.getWeight())].add(e);
				}
			}
		}
		
		// create sorted edge array
		WeightedEdge[] a = new WeightedEdge[m.getNumberOfEdges() / 2];
		int j = 0;
		
		for (int i = 0; i < buckets.length; i++) {
			for (WeightedEdge e : buckets[i]) {
				a[j] = e;
				j++;
			}
		}
		
		return a;
	}