adds an edge or an arc between two nodes
g1 = add_edge(i,j,g) g1 = add_edge(ij,g)
vector of integers, number of start nodes
vector of integers, number of end nodes
2 by n matrix of integers, first row contains the start node numbers, second row contains the end node numbers.
:a graph list (see graph_data_structure).
graph list of the new graph with the added edges
add_edge(i,j,g)
returns the graph g1
with a new edges connecting node number
i(k)
to node number j(k)
. If the graph is directed, the edge is an arc.
The number of edges plus 1 is taken as the name of the new edge.
add_edge(ij,g)
returns the graph g1
with a new edges connecting node number
ij(1,k)
to node number ij(2,k)
. If the graph is directed, the edge is an arc.
The number of edges plus 1 is taken as the name of the new edge.