You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+12-14Lines changed: 12 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,8 +48,6 @@ pkg> add MultilayerGraphs
48
48
49
49
## Usage
50
50
51
-
Here we are going to synthetically illustrate some of the main features of MultilayerGraphs.jl. For a more comprehensive exploration of the package functionalities we strongly recommend consulting the [documentation](https://juliagraphs.org/MultilayerGraphs.jl).
52
-
53
51
Let's begin by importing the necessary dependencies and setting the relevant constants.
54
52
55
53
```julia
@@ -99,7 +97,7 @@ Similar constructors, more flexible at the cost of ease of use, enable a finer t
99
97
# Create a simple directed value layer
100
98
n_vertices =rand(1:n_nodes) # Number of vertices
101
99
n_edges =rand(n_vertices:(n_vertices * (n_vertices -1) -1)) # Number of edges
102
-
default_vertex_metadata = v -> ("vertex_$(v)_metadata") # Vertex metadata
100
+
default_vertex_metadata = v -> ("vertex_$(v)_metadata",)# Vertex metadata
# Layers and interlayer can be accessed as properties using their names
179
-
multilayerdigraph.layer_simplevaldigraph
177
+
multilayerdigraph.layer_simple_directed_value
180
178
```
181
179
182
180
Then we proceed by showing how to add nodes, vertices and edges to a directed multilayer graph. The user may add vertices that do or do not represent nodes which are already present in the multilayer graph. In the latter case, we have to create a node first and then add the vertex representing such node to the multilayer graph. The vertex-level metadata are effectively considered only if the graph underlying the relevant layer or interlayer supports them, otherwise they are discarded. The same holds for edge-level metadata and/or weight.
# Layers and interlayer can be accessed as properties using their names
141
-
multilayerdigraph.layer_simplevaldigraph
141
+
multilayerdigraph.layer_simple_directed_value
142
142
```
143
143
144
144
Then we proceed by showing how to add nodes, vertices and edges to a directed multilayer graph. The user may add vertices that do or do not represent nodes which are already present in the multilayer graph. In the latter case, we have to create a node first and then add the vertex representing such node to the multilayer graph. The vertex-level metadata are effectively considered only if the graph underlying the relevant layer or interlayer supports them, otherwise they are discarded. The same holds for edge-level metadata and/or weight.
0 commit comments