All edges attached to given node in a (di)graph

1 visualización (últimos 30 días)
Roy Goodman
Roy Goodman el 6 de Feb. de 2017
Respondida: Christine Tobler el 21 de Feb. de 2017
I have a simple and, I imagine, common question about working with graphs. Is there a built-in way to find all the edges pointing into and out of a given node. I can use this
outgoing = findedge(G,1,successors(G,1));
incoming = findedge(G,1,predecessors(G,1));
but I would think there's something built in.
  1 comentario
Sindhu Priya
Sindhu Priya el 14 de Feb. de 2017
I am not aware if there is a built in function for finding the predecessor and successor edges of a digraph.
Regards,
Sindhu

Iniciar sesión para comentar.

Respuestas (1)

Christine Tobler
Christine Tobler el 21 de Feb. de 2017
There is currently no builtin for this, your lines with findedge are the simplest way to get the edge indices.

Categorías

Más información sobre Graph and Network Algorithms en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by