Skip to content

graph.empty(n=NULL) results in undefined vcount(g) #404

@clpippel

Description

@clpippel

L.S.

I happen to run into the following (simplified) R-code:

# allocate graph.empty with undefined vcount
library(igraph)
g <- graph.empty(n=NULL, directed=TRUE)
print(vcount(g))  # <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

sessionInfo()

The result is a graph with an uninitialized number of vertices, instead of as expected zero.

(screenshot included)

igraph-graph empty-vcount-nok
0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions