Skip to content

Commit edd0b91

Browse files
committed
document vertex creation
1 parent ef62f95 commit edd0b91

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/metagraph.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,9 @@ julia> colors = MetaGraph(Graph(), VertexMeta = Int, EdgeMeta = Symbol, gprops =
7878
Meta graph based on a {0, 0} undirected simple Int64 graph with vertices indexed by Symbol(s), Int64(s) vertex metadata, Symbol(s) edge metadata, "special" as graph metadata, and default weight 1.0
7979
```
8080
81-
Use `setindex!` to add a new vertex with the given metadata.
81+
Use `setindex!` to add a new vertex with the given metadata. If a vertex with the given
82+
index does not exist, it will be created automatically; otherwise, `setindex!` will modify
83+
the metadata for the existing vertex.
8284
8385
```jldoctest example
8486
julia> colors[:red] = 1;

0 commit comments

Comments
 (0)