Commit 127c2df8 authored by Rémi's avatar Rémi
Browse files

Handle origin in get_addernode_by_value()

parent 48e36eb4
name = "AdderGraphs"
uuid = "818587fb-0c22-4279-a2b9-8b16b5360b71"
version = "0.2.4"
version = "0.2.5"
......@@ -77,6 +77,7 @@ export get_error_in
export set_error_in!
export are_data_paths_set
export are_errors_computed
export get_origin
export get_addernode_by_value
export read_addergraph
export write_addergraph
......
......@@ -44,7 +44,14 @@ function are_errors_computed(addergraph::AdderGraph)
return addergraph.errors_computed
end
function get_origin(addergraph::AdderGraph)
return addergraph.origin
end
function get_addernode_by_value(addergraph::AdderGraph, value::Int)
if get_value(get_origin(addergraph)) == value
return get_origin(addergraph)
end
for addernode in get_nodes(addergraph)
if get_value(addernode) == value
return addernode
......@@ -127,4 +134,3 @@ function write_addergraph(addergraph::AdderGraph)
adderstring *= "}"
return adderstring
end
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment