matrixfunctions / GraphMatFun.jl

Computation graphs for matrix functions
MIT License
13 stars 0 forks source link

compress graph bug #23

Closed jarlebring closed 3 years ago

jarlebring commented 3 years ago

It seems an compression is not taking place as it should:

julia> g=gen_degopt_poly(Degopt([([0; 1],[0; 1])],[2 ;3; 4.0]))[1];
julia> compress_graph!(g)
Zero coeff can be removed: Bb2 because of coeff 1 is 0.0
Zero coeff can be removed: Ba2 because of coeff 1 is 0.0
julia> compress_graph!(g)
Zero coeff can be removed: Bb2 because of coeff 1 is 0.0
Zero coeff can be removed: Ba2 because of coeff 1 is 0.0
julia> g.operations[:Ba2]
:lincomb
julia> g.parents[:Ba2]
(:I, :A)
julia> g.coeffs[:Ba2]
(0.0, 1.0)