removeSelfLoops {RBGL}R Documentation

remove self loops in a graph

Description

remove self loops in a graph

Usage

removeSelfLoops(g)

Arguments

g one instance of the graph class

Details

If a given graph contains self-loop(s), removeSelfLoops removes them. This is for those functions that cannot handle graphs with self-loops.

Value

A new graph without self loops.

Author(s)

Li Long <li.long@isb-sib.ch>

References

See Also

Examples

g1 <- fromGXL(file(system.file("XML/dijkex.gxl",package="RBGL")))
g2 <- ugraph(g1)
removeSelfLoops(g2)

[Package RBGL version 1.12.0 Index]