2023-08-29 12:57:46 +02:00
|
|
|
"""
|
|
|
|
show(io::IO, ops::PossibleOperations)
|
|
|
|
|
|
|
|
Print a string representation of the set of possible operations to io.
|
|
|
|
"""
|
2023-08-23 12:51:25 +02:00
|
|
|
function show(io::IO, ops::PossibleOperations)
|
|
|
|
print(io, length(ops.nodeFusions))
|
|
|
|
println(io, " Node Fusions: ")
|
|
|
|
for nf in ops.nodeFusions
|
|
|
|
println(io, " - ", nf)
|
|
|
|
end
|
|
|
|
print(io, length(ops.nodeReductions))
|
|
|
|
println(io, " Node Reductions: ")
|
|
|
|
for nr in ops.nodeReductions
|
|
|
|
println(io, " - ", nr)
|
|
|
|
end
|
|
|
|
print(io, length(ops.nodeSplits))
|
|
|
|
println(io, " Node Splits: ")
|
|
|
|
for ns in ops.nodeSplits
|
|
|
|
println(io, " - ", ns)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2023-08-29 12:57:46 +02:00
|
|
|
"""
|
|
|
|
show(io::IO, op::NodeReduction)
|
|
|
|
|
|
|
|
Print a string representation of the node reduction to io.
|
|
|
|
"""
|
2023-08-23 12:51:25 +02:00
|
|
|
function show(io::IO, op::NodeReduction)
|
|
|
|
print(io, "NR: ")
|
|
|
|
print(io, length(op.input))
|
|
|
|
print(io, "x")
|
2023-11-21 01:48:59 +01:00
|
|
|
return print(io, task(op.input[1]))
|
2023-08-23 12:51:25 +02:00
|
|
|
end
|
|
|
|
|
2023-08-29 12:57:46 +02:00
|
|
|
"""
|
|
|
|
show(io::IO, op::NodeSplit)
|
|
|
|
|
|
|
|
Print a string representation of the node split to io.
|
|
|
|
"""
|
2023-08-23 12:51:25 +02:00
|
|
|
function show(io::IO, op::NodeSplit)
|
|
|
|
print(io, "NS: ")
|
2023-11-21 01:48:59 +01:00
|
|
|
return print(io, task(op.input))
|
2023-08-23 12:51:25 +02:00
|
|
|
end
|
|
|
|
|
2023-08-29 12:57:46 +02:00
|
|
|
"""
|
|
|
|
show(io::IO, op::NodeFusion)
|
|
|
|
|
|
|
|
Print a string representation of the node fusion to io.
|
|
|
|
"""
|
2023-08-23 12:51:25 +02:00
|
|
|
function show(io::IO, op::NodeFusion)
|
|
|
|
print(io, "NF: ")
|
2023-11-21 01:48:59 +01:00
|
|
|
print(io, task(op.input[1]))
|
2023-08-23 12:51:25 +02:00
|
|
|
print(io, "->")
|
2023-11-21 01:48:59 +01:00
|
|
|
print(io, task(op.input[2]))
|
2023-08-23 12:51:25 +02:00
|
|
|
print(io, "->")
|
2023-11-21 01:48:59 +01:00
|
|
|
return print(io, task(op.input[3]))
|
2023-08-23 12:51:25 +02:00
|
|
|
end
|