<< NARVAL_G_UCoordinates NARVAL NARVAL_G_VisParMod >>

NARVAL >> NARVAL > NARVAL_G_Union

NARVAL_G_Union

Merge two graphs in respect with a defined edge between two nodes.

Calling Sequence

[g] = NARVAL_G_Union(n1,g1,n2,g2)

Parameters

g1 :

first graph.

n1 :

node index.

g2 :

second graph.

n2 :

node index.

g :

output graph.

Description

NARVAL_G_Union merges the two graphs g1 and g2 in a single entity g. To achieve this fusion, a new edge is created between the node n1 of the graph g1 and the node n2 of the graph g2.

The graph g1={N1,N2,..,N19} is now connected to the graph g2={N20,N21,N22} in respect with the new edge between the nodes N15 and N20.

Examples

[g1]=NARVAL_G_MakeGraph('g1',4,[1 2 3 4],[2 3 4 1],[100 100 200 200],[100 200 200 100]);//generation of the first graph
[g2]=NARVAL_G_MakeGraph('g2',3,[1 2 3],[2 3 1], [300 350 400],[300 400 300]);//generation of the second graph
n1=3;//node index in g1
n2=1;//node index in g2
[g]=NARVAL_G_Union(n1,g1,n2,g2);//application of NARVAL_G_Union
ind=1;//window index
f=NARVAL_G_ShowGraph(g,ind);//graph visualization

Dependency

NARVAL_G_EdgeDataFields, NARVAL_G_NodeDataFields, NARVAL_G_MakeGraph, NARVAL_G_EdgeLength

Authors

Foued Melakessou

Contact

Dr. Foued Melakessou

Research Associate

Interdisciplinary Centre for Security, Reliability and Trust

Room F106

University of Luxembourg

6, rue Coudenhove Kalergi

L-1359 Luxembourg-Kirchberg

E-mail: foued.melakessou@uni.lu

Tel: (+352) 46 66 44 5346

Home Page


<< NARVAL_G_UCoordinates NARVAL NARVAL_G_VisParMod >>