From e5eead6950b9ae2eb2c54c9d9124377ffdfb1c6f Mon Sep 17 00:00:00 2001 From: Daniel Cerkoney Date: Wed, 18 Sep 2024 16:31:58 -0400 Subject: [PATCH] Bugfix in I/O for user-defined concrete graph types: add getter `properties` and setter `set_properties!` to AbstractGraph interface --- src/computational_graph/abstractgraph.jl | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/computational_graph/abstractgraph.jl b/src/computational_graph/abstractgraph.jl index 467447f8..9a55de76 100644 --- a/src/computational_graph/abstractgraph.jl +++ b/src/computational_graph/abstractgraph.jl @@ -89,6 +89,13 @@ function operator(g::AbstractGraph) end """ function weight(g::AbstractGraph) end +""" + function properties(g::AbstractGraph) + + Returns additional properties, if any, of the computational graph `g`. +""" +function properties(g::AbstractGraph) end + """ function subgraph(g::AbstractGraph, i=1) @@ -184,6 +191,13 @@ function set_weight!(g::AbstractGraph, weight) """ function set_weight!(g::AbstractGraph, weight) end +""" +function set_properties!(g::AbstractGraph, properties) + + Update the properties of graph `g` to `properties`. +""" +function set_properties!(g::AbstractGraph, properties) end + """ function set_subgraph!(g::AbstractGraph, subgraph::AbstractGraph, i=1)