Skip to content
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

Remove variable neighbors (factors) by default on deleteVariable #296

Closed
Affie opened this issue Feb 13, 2020 · 0 comments · Fixed by #371
Closed

Remove variable neighbors (factors) by default on deleteVariable #296

Affie opened this issue Feb 13, 2020 · 0 comments · Fixed by #371
Assignees
Labels
Milestone

Comments

@Affie
Copy link
Member

Affie commented Feb 13, 2020

If a variable is deleted from DFG object, then default is to delete surrounding factors also. This can
be avoided with a keyword argument.

If a factor is not deleted and a new variable is introduced, then a new factor must be created by one of the verbs and replace the current factor which has (by this time) a stale but immutable _variableOrderList.

One reason is that deleting and adding variables will not preserve the all important order. Another reason is that deleting both the edges in the graph and variables from this list undermines the test where one compares the two lists against each other -- currently used for orphan test. Third reason is when using the multhypo interface, then the number of variables is specific to that instance of the factor (as in all cases really) and therefore _variableOrderList must be immutable.

Originally posted by @dehann in #20 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants