<< NL_G_DeleteEdges NL_G: Graph NL_G_Diameter >>

NARVAL >> NL_G: Graph > NL_G_DeleteNodes

NL_G_DeleteNodes

Delete a list of nodes from a graph.

Calling Sequence

[Go] = NL_G_DeleteNodes(G,L)

Arguments

G :

Graph.

L :

List of nodes.

:

Output graph.

Description

NL_G_DeleteNodes deletes the set of L nodes defined by their indexes from the graph G. The output graph is stored in .

Examples

[g]=NL_G_MakeGraph('g1',4,[1 2 3 4],[2 3 4 1],[100 100 900 900],[100 900 900 100]);//generation of a graph
g.node_name=['n1' 'n2' 'n3' 'n4'];
g.edge_name=['e1' 'e2' 'e3' 'e4'];
l=[1 2];//list of nodes to delete
[go]=NL_G_DeleteNodes(g,l);//application of NL_G_DeleteNodes
go.name='g2';
i1=1;
f=NL_G_ShowGraph(g,i1);//visualization of g
i2=2;
f2=NL_G_ShowGraph(go,i2);//visualization of go

Dependency

NL_G_DeleteEdges, NL_F_RemoveVecIndexes, NL_G_MakeGraph, NL_G_GraphEdgesLength

Report an issue
<< NL_G_DeleteEdges NL_G: Graph NL_G_Diameter >>