<< NL_G_Spectrum NL_G: Graph NL_G_Star >>

NARVAL >> NL_G: Graph > NL_G_SplitEdge

NL_G_SplitEdge

Insert new nodes inside an edge of a graph.

Calling Sequence

[Go] = NL_G_SplitEdge(G,E,N)

Arguments

G :

Graph.

E :

Edge index.

N :

Quantity of new nodes.

:

Output graph.

Description

NL_G_SplitEdge inserts a set of N new nodes linealy distributed between the extremal nodes of the selected edge E of the graph G. The output graph is stored in .

Examples

[path]=NL_F_NLPath();//path to NARVAL module
path=path+'/demos/';//folder path
name='topo_20.topo';//file name
Lxmin=100;
Lxmax=900;
Lymin=100;
Lymax=900;
[g]=NL_G_LoadGraphNE(path,name,Lxmin,Lxmax,Lymin,Lymax);//graph loading
ind=1;//window index
f=NL_G_ShowGraphE(g,ind);//graph visualization
e=3;//edge index
ns=3;//quantity of new nodes
[go]=NL_G_SplitEdge(g,e,ns);//application of NL_G_SplitEdge
i2=2;//window index
f2=NL_G_ShowGraph(go,i2);//graph visualization

Dependency

NL_G_DeleteEdges, NL_G_GraphEdgesLength

Report an issue
<< NL_G_Spectrum NL_G: Graph NL_G_Star >>