<< NARVAL_G_UCoordinates NARVAL NARVAL_G_VisParMod >>

NARVAL >> NARVAL > NARVAL_G_Union

NARVAL_G_Union

Merge two graphs in respect with a defined edge.

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 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.

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;
n2=1;
[g]=NARVAL_G_Union(n1,g1,n2,g2);//application of NARVAL_G_Union
ind=1;
f=NARVAL_G_ShowGraph(g,ind);
g

Dependency

NARVAL_G_EdgeDataFields, NARVAL_G_NodeDataFields, NARVAL_G_MakeGraph, NARVAL_G_EdgeLength

Author

http://wwwen.uni.lu/interdisciplinary_centre_for_security_reliability_and_trust

Contact

<< NARVAL_G_UCoordinates NARVAL NARVAL_G_VisParMod >>