<< NL_G_GraphEdgesLength NL_G: Graph NL_G_GraphRadius >>

NARVAL >> NL_G: Graph > NL_G_GraphInit

NL_G_GraphInit

Initialization of a graph.

Calling Sequence

[G] = NARVAL_G_GraphInit(Name,Lx,Ly,N,T,H,Nn,Nx,Ny,Nc,Nd,Nb,Nf,En,Ec,Ew,Ef,El,Et,DNd,DNb,DEw,Df)

Arguments

Name :

Graph name.

:

Graph area x-limit.

:

Graph area y-limit.

N :

Number of nodes.

T :

Links' tail vector.

H :

Links' head vector.

:

Nodes' name vector.

:

Vector of nodes x-coordinates.

:

Vector of nodes y-coordinates.

:

Vector of nodes' color.

:

Vector of nodes' diameter.

:

Vector of nodes' border.

:

Vector of nodes' name font size.

:

Vector of edges' name.

:

Vector of edges' color.

:

Vector of edges' width.

:

Vector of edges' name font size.

:

Vector of edges' length.

:

Vector of edges' weight.

:

Default node diameter value.

:

Default node border value.

:

Default edge width value.

:

Default font size value.

G :

Graph.

Description

NL_G_GraphInit initializes the graph G composed by N nodes defined by their x-coordinates and y-coordinates . The starting (respectivelly ending) node of each link is stored in (respectivelly ).

Examples

name='network';//parameters
Lx=1000;
Ly=1000;
node_number=3;
tail=[2 3 3];
head=[1 1 2];
node_x=[100 700 200];
node_y=[200 800 600];
node_name=[];
node_color=[];
node_diam=[];
node_border=[];
node_font_size=[];
edge_name=[];
edge_color=[];
edge_width=[];
edge_font_size=[];
edge_length=[];
edge_weight=[];
default_node_diam=30;
default_node_border=5;
default_edge_width=1;
default_font_size=10;
[g]=NL_G_GraphInit(name,Lx,Ly,node_number,tail,head,node_name,node_x,node_y,node_color,node_diam,..
node_border,node_font_size,edge_name,edge_color,edge_width,edge_font_size,edge_length,edge_weight,..
default_node_diam,default_node_border,default_edge_width,default_font_size)//application of NL_G_GraphInit

Report an issue
<< NL_G_GraphEdgesLength NL_G: Graph NL_G_GraphRadius >>