<< NL_G_GraphDegreeDistPlot NL_G: Graph NL_G_GraphInit >>

NARVAL >> NL_G: Graph > NL_G_GraphEdgesLength

NL_G_GraphEdgesLength

Weight a graph.

Calling Sequence

[Go] = NL_G_GraphEdgesLength(G)

Arguments

G :

Graph.

:

Output graph.

Description

NL_G_GraphEdgesLength transforms the graph G into the weighted graph where the Euclidian distance between the extreme nodes of all edges is used. These weights are stored in Go.edge_length. They are needed during the paths performance between graph entities.

Examples

name='network';// graph name
n=3;//graph parameters
tail=[2 3 3];
head=[1 1 2];
node_x=[100 700 200];
node_y=[200 800 600];
[g]=NL_G_MakeGraph(name,n,tail,head,node_x,node_y);//creation of a graph
[go]=NL_G_GraphEdgesLength(g);//application of NL_G_GraphEdgesLength
go.edge_length

Dependency

NL_G_EdgesLength

Report an issue
<< NL_G_GraphDegreeDistPlot NL_G: Graph NL_G_GraphInit >>