*/
protected void rankMedianPosition(int rankValue,
mxGraphHierarchyModel model, int nextRankValue)
{
mxGraphHierarchyRank rankSet = model.ranks.get(new Integer(rankValue));
Object[] rank = rankSet.toArray();
// Form an array of the order in which the cells are to be processed
// , the order is given by the weighted sum of the in or out edges,
// depending on whether we're travelling up or down the hierarchy.
WeightedCellSorter[] weightedValues = new WeightedCellSorter[rank.length];
Map<mxGraphAbstractHierarchyCell, WeightedCellSorter> cellMap = new Hashtable<mxGraphAbstractHierarchyCell, WeightedCellSorter>(