Add documentation to every function and automatic doc html building (#6)
Reviewed-on: Rubydragon/MetagraphOptimization.jl#6 Co-authored-by: Anton Reinhard <anton.reinhard@proton.me> Co-committed-by: Anton Reinhard <anton.reinhard@proton.me>
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
"""
|
||||
show(io::IO, diff::Diff)
|
||||
|
||||
Pretty-print a [`Diff`](@ref). Called via print, println and co.
|
||||
"""
|
||||
function show(io::IO, diff::Diff)
|
||||
print(io, "Nodes: ")
|
||||
print(io, length(diff.addedNodes) + length(diff.removedNodes))
|
||||
|
@@ -1,4 +1,9 @@
|
||||
# return a namedtuple of the lengths of the added/removed nodes/edges
|
||||
"""
|
||||
length(diff::Diff)
|
||||
|
||||
Return a named tuple of the lengths of the added/removed nodes/edges.
|
||||
The fields are `.addedNodes`, `.addedEdges`, `.removedNodes` and `.removedEdges`.
|
||||
"""
|
||||
function length(diff::Diff)
|
||||
return (
|
||||
addedNodes = length(diff.addedNodes),
|
||||
|
@@ -1,3 +1,8 @@
|
||||
"""
|
||||
Diff
|
||||
|
||||
A named tuple representing a difference of added and removed nodes and edges on a [`DAG`](@ref).
|
||||
"""
|
||||
const Diff = NamedTuple{
|
||||
(:addedNodes, :removedNodes, :addedEdges, :removedEdges),
|
||||
Tuple{Vector{Node}, Vector{Node}, Vector{Edge}, Vector{Edge}},
|
||||
|
Reference in New Issue
Block a user