Skip to content

Commit

Permalink
printing docstrings fixed, code made more clean
Browse files Browse the repository at this point in the history
  • Loading branch information
esahon committed Aug 28, 2024
1 parent 8d008df commit 57cc3aa
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/printing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ Print node information. print_tables determines whether probability and utility
# Examples
```julia
print_node("H2", diagram)
```
"""
function print_node(node_name::String, diagram::InfluenceDiagram; print_tables::Bool=true)
if haskey(diagram.Nodes, node_name)
Expand Down Expand Up @@ -275,16 +276,13 @@ Print diagram. print_tables determines whether probability and utility values fo
# Examples
```julia
print_diagram(diagram)
```
"""
function print_diagram(diagram::InfluenceDiagram; print_tables::Bool=true)
println("An influence diagram")
println("")
println("An influence diagram\n")
println("Node names:")
println(diagram.Names)
println("")

println("Nodes:")
println("")
println(diagram.Names, "\n")
println("Nodes:\n")
for node in keys(diagram.Nodes)
print_node(node, diagram; print_tables)
end
Expand Down

0 comments on commit 57cc3aa

Please sign in to comment.