const shortestPath = new ShortestPath({
source: sourceNode,
sink: sinkNode,
directed: false,
costs: (edge: IEdge): number =>
edge.sourceNode!.layout.center.subtract(edge.targetNode!.layout.center)
.vectorLength
})
const shortestPathResult = shortestPath.run(graph)