Description Usage Arguments Details Value Author(s) See Also Examples
A function to add an edge to a graph.
1 |
from |
The node the edge starts at |
to |
The node the edge goes to. |
graph |
The graph that the edge is being added to. |
weights |
A vector of weights, one for each edge. |
Both from
and to
can be vectors. They need not be the
same length (if not the standard rules for replicating the shorter one
are used). Edges are added to the graph between the supplied nodes.
The weights
are given for each edge.
The implementation is a bit too oriented towards the graphNEL
class and will likely change in the next release to accomodate more
general graph classes.
If the graph is undirected then the edge is bidirectional (and only needs to be added once). For directed graphs the edge is directional.
A new instance of a graph object with the same class as graph
but with the indicated edges added.
R. Gentleman
addNode
,removeEdge
,
removeNode
1 2 3 4 5 6 7 8 9 10 11 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.