szhorvat / IGraphM

IGraph/M is the igraph interface for Mathematica
http://szhorvat.net/mathematica/IGraphM
Other
90 stars 17 forks source link

Internal vs[] function does not detect non-existent list vertex #121

Closed szhorvat closed 2 years ago

szhorvat commented 2 years ago

The internal vs[] function does not detect that a vertex does not exist when passed a list of exiting vertices. This is because VertexIndex can take a list, even though this is undocumented:

In[20]:= g = Graph[{"a" <-> "b"}];

In[21]:= VertexIndex[g, {"a", "b"}]
Out[21]= {1, 2}