We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9749e37 commit 481cadaCopy full SHA for 481cada
src/structural_transformation/utils.jl
@@ -46,8 +46,9 @@ end
46
function check_consistency(state::TearingState, ag = nothing)
47
fullvars = state.fullvars
48
@unpack graph, var_to_diff = state.structure
49
- n_highest_vars = count(v -> length(outneighbors(var_to_diff, v)) == 0 &&
50
- (ag === nothing || !haskey(ag, v)),
+ n_highest_vars = count(v -> var_to_diff[v] === nothing &&
+ !isempty(𝑑neighbors(graph, v)) &&
51
+ (ag === nothing || !haskey(ag, v) || ag[v] != v),
52
vertices(var_to_diff))
53
neqs = nsrcs(graph)
54
is_balanced = n_highest_vars == neqs
0 commit comments