0

Calculating dijkstra shortest path after hiding some edges, the algorithm still includes those edges.

cy.remove(someEdges) gets the right result: the shortest path is rerouted around those missing edges.

Would it be possible, and make sense, to get that same effect with edges which have been hidden?

paul shannon
  • 355
  • 5
  • 15

1 Answers1

1

Most functions and algorithms can be called on subgraphs such that the function only considers the subgraph (i.e. calling collection).

If you call cy.elements(':visible').dijkstra(), for example, only visible elements will be considered.

maxkfranz
  • 11,896
  • 1
  • 27
  • 36