function computeNodeDepths(nodes, edges, height, nodeGap, iterations) {
	        var nodesByBreadth = nest()
	            .key(function (d) {
	                return d.getLayout().x;
	            })
	            .sortKeys(ascending)
	            .entries(nodes)
	            .map(function (d) {
	                return d.values;
	            });

	        initializeNodeDepth(nodes, nodesByBreadth, edges, height, nodeGap);
	        resolveCollisions(nodesByBreadth, nodeGap, height);

	        for (var alpha = 1; iterations > 0; iterations--) {
	            // 0.99 is a experience parameter, ensure that each iterations of
	            // changes as small as possible.
	            alpha *= 0.99;
	            relaxRightToLeft(nodesByBreadth, alpha);
	            resolveCollisions(nodesByBreadth, nodeGap, height);
	            relaxLeftToRight(nodesByBreadth, alpha);
	            resolveCollisions(nodesByBreadth, nodeGap, height);
	        }
	    }
transform the Map Object to multidimensional Array
@param {Object} map
@param {number} depth