Darwin Help

Back to Index

Edge

Class Edge - edge/arc description

Calling Sequence  Edge(Label,From,To)
Return Type  Edge
Selectors
NameTypeDescription

Label anythingthe label of the edge
From anythingthe first end point of the edge.
To anythingthe second end point of the edge.
Methods select, type
Synopsis The Edge data structure stores the information associated with an edge. Some algorithms assume that the Label field stores a numeric value representing a weight. The Edges are always directed, but if the graph is meant to be undirected, then the From/To are exchangeable and only one entry per Edge is needed.
Examples
> G := Graph( Edges( Edge(4,1,2), Edge(7,1,3), Edge(6,2,4),
		Edge(5,3,4) ), Nodes(1, 2, 3, 4) );
G := Graph(Edges(Edge(4,1,2),Edge(7,1,3),Edge(6,2,4),Edge(5,3,4)),Nodes(1,2,3,4))
> G[Edges, 1, Label];
4
See also BipartiteGraph,   Clique,   DrawGraph,   EdgeComplement,   Edges,   FindConnectedComponents,   Graph,   Graph_Rand,   InduceGraph,   MaxCut,   MaxEdgeWeightClique,   MST,   Nodes,   Path,   RegularGraph,   ShortestPath,   TetrahedronGraph,   VertexCover