@@ -30,6 +30,23 @@ function _df_from_pair(list, pair)
30
30
df
31
31
end
32
32
33
+ """
34
+ describe_vertices(nw::Network, extras...; parameters=true, states=true, batch=nothing)
35
+
36
+ Creates a DataFrame containing information about the vertices in a Network.
37
+
38
+ # Arguments
39
+ - `nw::Network`: The network to describe
40
+ - `extras...`: Additional pairs of (key, function) to include as columns,
41
+ where the function gets the [`VertexModel`](@ref) as its only parameter
42
+ to extract a custom metadata field for example..
43
+ - `parameters=true`: Whether to include parameter values
44
+ - `states=true`: Whether to include state values
45
+ - `batch=nothing`: Optionally filter by specific batches
46
+
47
+ # Returns
48
+ A DataFrame with columns for vertex indices, names, batch numbers, and any parameter/state values.
49
+ """
33
50
function NetworkDynamics. describe_vertices (nw:: Network , extras... ; parameters= true , states= true , batch= nothing )
34
51
pairs = enumerate (nw. im. vertexm);
35
52
batches = map (idx -> findfirst (batch -> idx ∈ batch. indices, nw. vertexbatches), first .(pairs))
@@ -61,6 +78,23 @@ function NetworkDynamics.describe_vertices(nw::Network, extras...; parameters=tr
61
78
foldl ((a,b) -> DataFrames. leftjoin (a,b; on= :idx ), dfs)
62
79
end
63
80
81
+ """
82
+ describe_edges(nw::Network, extras...; parameters=true, states=true, batch=nothing)
83
+
84
+ Creates a DataFrame containing information about the edges in a Network.
85
+
86
+ # Arguments
87
+ - `nw::Network`: The network to describe
88
+ - `extras...`: Additional pairs of (key, function) to include as columns,
89
+ where the function gets the [`EdgeModel`](@ref) as its only parameter
90
+ to extract a custom metadata field for example..
91
+ - `parameters=true`: Whether to include parameter values
92
+ - `states=true`: Whether to include state values
93
+ - `batch=nothing`: Optionally filter by specific batches
94
+
95
+ # Returns
96
+ A DataFrame with columns for edge indices, source-destination pairs, names, batch numbers, and any parameter/state values.
97
+ """
64
98
function NetworkDynamics. describe_edges (nw:: Network , extras... ; parameters= true , states= true , batch= nothing )
65
99
pairs = enumerate (nw. im. edgem);
66
100
batches = map (idx -> findfirst (batch -> idx ∈ batch. indices, nw. layer. edgebatches), first .(pairs))
0 commit comments