IsEulerian {rlemon} | R Documentation |
Check if Graph is Eulerian
Description
A directed graph is Eulerian if and only if it is connected and the number of incoming and outgoing edges are the same for each node. An undirected graph is Eulerian if and only if it is connected and the number of incident edges is even for each node.
Usage
IsEulerian(arcSources, arcTargets, numNodes)
Arguments
arcSources |
Vector corresponding to the source nodes of a graph's edges |
arcTargets |
Vector corresponding to the destination nodes of a graph's edges |
numNodes |
The number of nodes in the graph |
Details
See https://lemon.cs.elte.hu/pub/doc/1.3.1/a00616.html#gafb5a4961cac4d877006869fc4cb6ea1d for more information.
Value
TRUE if graph is Eulerian, FALSE otherwise
[Package rlemon version 0.2.1 Index]