Solving network problems by embedding discrete structure in continuous space