is.degree.sequence (out.deg, in.deg = NULL)
is.graphical.degree.sequence (out.deg, in.deg = NULL)
NULL
or an integer vector. For undireted graphs,
it should be NULL
. For directed graphs it specifies the
in-degrees.is.degree.sequence
checks whether the given vertex degrees (in-
and out-degrees for directed graphs) can be realized by a graph. Note
that the graph does not have to be simple, it may contain loop and
multiple edges. For undirected graphs, it also checks whether the sum
of degrees is even. For directed graphs, the function checks whether
the lengths of the two degree vectors are equal and whether their sums
are also equal. These are known sufficient and necessary conditions
for a degree sequence to be valid. is.graphial.degree.sequence
determines whether the given vertex
degrees (in- and out-degrees for directed graphs) can be reliazed in a
simple graph, i.e. a graph without multiple or loop edges.
g <- erdos.renyi.game(100, 2/100)
is.degree.sequence(degree(g))
is.graphical.degree.sequence(degree(g))
Run the code above in your browser using DataCamp Workspace