Returns the number of edges going out from this node.. The
Edge and EdgeCount property provide access to all the edges leading from, or out of, this node.
Namespace: GGraph
Delphi
|
public
property EdgeCount: Integer read GetEdgeCount;
|
Property Value
Type: Integer
The following example prints the names of all the nodes that Node1 points to (assumes directed graph):
Delphi
|
var
i: Integer;
begin
if Node1.Graph.Directed then
for i := 0 to Node1.EdgeCount - 1 do
ListBox1.Items.Add( '--> ' + Node1.Edge[i].ToNode.Caption )
else
for i := 0 to Node1.EdgeCount - 1 do
if Node1.Edge[i].FromNode = Self then
ListBox1.Items.Add( '--> ' + Node1.Edge[i].ToNode.Caption )
else
ListBox1.Items.Add( '--> ' + Node1.Edge[i].FromNode.Caption )
end;
|