graph theory – Finding a tree with adjacency matrix near a given matrix

For defining a distance between trees, one can code them into $mathbb{R}^n$ and use norms in $mathbb{R}^n$ as distance. (For example we can use adjacency matrices as a tool for this coding) After that a natural question is given a point in $mathbb{R}^n$ how can we find a tree whose coding is as near as possible to this point. Is there any coding/encoding functions for trees or general graphs which can be used efficiently/approximately for this problem?

Note: Any comments or clues about keywords and areas related to this question are welcome.