Add GraphProperties and property caching
This commit is contained in:
@@ -41,9 +41,9 @@ function gen_plot(filepath)
|
||||
i = i - 1
|
||||
end
|
||||
|
||||
props = graph_properties(g)
|
||||
props = get_properties(g)
|
||||
push!(x, props.data)
|
||||
push!(y, props.compute_effort)
|
||||
push!(y, props.computeEffort)
|
||||
end
|
||||
|
||||
println("\rDone.")
|
||||
|
@@ -44,9 +44,9 @@ function gen_plot(filepath)
|
||||
|
||||
|
||||
|
||||
props = graph_properties(g)
|
||||
props = get_properties(g)
|
||||
x0 = props.data
|
||||
y0 = props.compute_effort
|
||||
y0 = props.computeEffort
|
||||
|
||||
x = Vector{Float64}()
|
||||
y = Vector{Float64}()
|
||||
@@ -55,9 +55,9 @@ function gen_plot(filepath)
|
||||
opt = get_operations(g)
|
||||
for op in opt.nodeFusions
|
||||
push_operation!(g, op)
|
||||
props = graph_properties(g)
|
||||
props = get_properties(g)
|
||||
push!(x, props.data)
|
||||
push!(y, props.compute_effort)
|
||||
push!(y, props.computeEffort)
|
||||
pop_operation!(g)
|
||||
|
||||
push!(
|
||||
@@ -65,15 +65,15 @@ function gen_plot(filepath)
|
||||
"NF: (" *
|
||||
string(props.data) *
|
||||
", " *
|
||||
string(props.compute_effort) *
|
||||
string(props.computeEffort) *
|
||||
")",
|
||||
)
|
||||
end
|
||||
for op in opt.nodeReductions
|
||||
push_operation!(g, op)
|
||||
props = graph_properties(g)
|
||||
props = get_properties(g)
|
||||
push!(x, props.data)
|
||||
push!(y, props.compute_effort)
|
||||
push!(y, props.computeEffort)
|
||||
pop_operation!(g)
|
||||
|
||||
push!(
|
||||
@@ -81,15 +81,15 @@ function gen_plot(filepath)
|
||||
"NR: (" *
|
||||
string(props.data) *
|
||||
", " *
|
||||
string(props.compute_effort) *
|
||||
string(props.computeEffort) *
|
||||
")",
|
||||
)
|
||||
end
|
||||
for op in opt.nodeSplits
|
||||
push_operation!(g, op)
|
||||
props = graph_properties(g)
|
||||
props = get_properties(g)
|
||||
push!(x, props.data)
|
||||
push!(y, props.compute_effort)
|
||||
push!(y, props.computeEffort)
|
||||
pop_operation!(g)
|
||||
|
||||
push!(
|
||||
@@ -97,7 +97,7 @@ function gen_plot(filepath)
|
||||
"NS: (" *
|
||||
string(props.data) *
|
||||
", " *
|
||||
string(props.compute_effort) *
|
||||
string(props.computeEffort) *
|
||||
")",
|
||||
)
|
||||
end
|
||||
|
@@ -3,7 +3,7 @@ function test_random_walk(g::DAG, n::Int64)
|
||||
# the purpose here is to do "random" operations and reverse them again and validate that the graph stays the same and doesn't diverge
|
||||
reset_graph!(g)
|
||||
|
||||
properties = graph_properties(g)
|
||||
properties = get_properties(g)
|
||||
|
||||
for i in 1:n
|
||||
# choose push or pop
|
||||
|
Reference in New Issue
Block a user