Undirected graph conversion to tree

前端 未结 2 2125
逝去的感伤
逝去的感伤 2021-02-09 02:42

Given an undirected graph in which each node has a Cartesian coordinate in space that has the general shape of a tree, is there an algorithm to convert the graph into a tree, an

2条回答
  •  心在旅途
    2021-02-09 03:41

    A simple solution would be to define a 2d rectangle around the red node or the center of your node and compute each node with a moore curve. A moore curve is a space-filling curve, more over a special version of a hilbert curve where the start and end vertex is the same and the coordinate is in the middle of the 2d rectangle. In generell your problem looks like a discrete addressing space problem.

提交回复
热议问题