Parameters
- unfixedLayer
- direction
Return Value
Returns true if some change was made to the layer and false otherwise.
direction == 0 -- use unfixedLayer - 1 and unfixedLayer + 1
direction > 0 -- use unfixedLayer - 1 (sweeping away from layer 0)
direction < 0 -- use unfixedLayer + 1 (sweepeing towards layer 0)
The idea is to calculate the median and barycenter for each node in the unfixedLayer, and to sort the nodes in the unfixedLayer by their median and barycenter values. Returns true if some change was made to the layer.