Structure-preserving hierarchical decompositions