Skip to content

Commit

Permalink
Docstring updates
Browse files Browse the repository at this point in the history
  • Loading branch information
ConnectedSystems committed Dec 31, 2024
1 parent 8e6d6ce commit 894ef33
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/Nodes/Node.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ Base.@kwdef mutable struct GenericNode{A<:AbstractFloat} <: NetworkNode
end


"""Create node of a given type."""
"""
create_node(node::Type{<:NetworkNode}, name::String, area::Float64)
Create node of a given type.
"""
function create_node(node::Type{<:NetworkNode}, name::String, area::Float64)
return node{Param, Float64}(; name=name, area=area)
end
Expand Down Expand Up @@ -69,7 +73,11 @@ function param_info(node::NetworkNode; kwargs...)::Tuple
end


"""Retrieve network node_id for a given gauge (by name)."""
"""
get_node_id(mg::MetaDiGraph, node_name::String)::Int64
Retrieve network node_id for a given gauge (by name).
"""
function get_node_id(mg::MetaDiGraph, node_name::String)::Int64
v = collect(MetaGraphs.filter_vertices(mg, :name, node_name))

Expand Down

0 comments on commit 894ef33

Please sign in to comment.