PropertyValue can only set a single property of a single vertex, as far as I know. How do I set a property for multiple vertices simultaneously?
In the documentation, they recommend using
Do to set multiple properties, but I've heard that
Do is not the most efficient way to do things in Mathematica. Are there any alternatives?
EDIT : The only approach seems to make several calls to
PropertyValue (which is faster), one call for each distinct vertex property I want to set. From the answers so far it seems that there is no Mathematica equivalent to
PropertyValue that sets several properties of distinct vertices at once. But I'd still hope that something could be done directly on the
Graph object, bypassing