<< NARVAL_G_GraphDegDistWD NARVAL NARVAL_G_GraphSize >>

NARVAL >> NARVAL > NARVAL_G_GraphInit

NARVAL_G_GraphInit

Initialization of a graph.

Calling Sequence

[g]=NARVAL_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)

Parameters

name :

graph name.

Lx :

graph area x-limit.

Ly :

graph area y-limit.

n :

graph size.

tail :

links tail vector.

head :

links head vector.

node_name :

nodes name vector.

node_x :

vector of nodes x-coordinates.

node_y :

vector of nodes y-coordinates.

node_color :

vector of nodes color.

node_diam :

vector of nodes diameter.

node_border :

vector of nodes border.

node_font_size :

vector of nodes name font size.

edge_name :

vector of eddes name.

edge_color :

vector of eddes color.

edge_width :

vector of eddes width.

edge_font_size :

vector of edges name font size.

edge_length :

vector of edges length.

edge_weight :

vector of edges weight.

default_node_diam :

default node diameter value.

default_node_border :

default node border value.

default_edge_width :

default edge width value.

default_font_size :

default font size value.

g :

graph.

Description

NARVAL_G_GraphInit initializes the graph g defined by n nodes with x-coordinates node_x and y-coordinates node_y. The starting (respectivelly finishing) node of each link is stored in head (respectivelly tail).

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_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]=NARVAL_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 NARVAL_G_GraphInit
[g]=NARVAL_G_EdgeLength(g);//Weight the graph
g.name
g.node_number
g.head
g.tail
g.node_x
g.node_y
g.node_color
g.node_border
g.edge_color
g.edge_width
g.edge_length
g.edge_weight

Author

http://wwwen.uni.lu/interdisciplinary_centre_for_security_reliability_and_trust

Contact

<< NARVAL_G_GraphDegDistWD NARVAL NARVAL_G_GraphSize >>