-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor graph copy functions #300
Comments
related to #250 |
agree, |
Current stateI don't quite get the there are currently 5 subgraph functions comment, but lets look at all related functions: Currently we have
We then have 2 "IIF" functions, but I think its mostly because of a misunderstanding.
function buildCliqSubgraph!(dfg::AbstractDFG,
cliqSubFg::AbstractDFG,
frontals::Vector{Symbol},
separators::Vector{Symbol};
solvable::Int=0)
allvars = union(frontals,separators)
#get list of factors to possibly add, ie. frontal neighbors
addfac = Symbol[]
for sym in frontals
union!(addfac, getNeighbors(dfg,sym))
end
#filter to only the factors in the clique
allfacs = Symbol[]
for sym in addfac
vos = getVariableOrder(dfg, sym)
if vos ⊆ allvars
union!(allfacs, [sym])
end
end
# add all the factors and variables to the clique subgraph
deepcopyGraph!(cliqSubFg, dfg, union(allvars, allfacs))
return cliqSubFg
end SummaryI would suggest and will implement if there are no objections:
|
Look at draft of
copyGraph
functions in attic/sandbox.jlThe idea is to have only one function to be called by functions such as
buildSubgraphFromLabels
Will at least look at it for v0.6.0 and decide if it should be added.
The text was updated successfully, but these errors were encountered: