Refactor TracePath to return a struct with relevant data#935
Open
AndresFerCervell wants to merge 4 commits into
Open
Refactor TracePath to return a struct with relevant data#935AndresFerCervell wants to merge 4 commits into
AndresFerCervell wants to merge 4 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issues closed by this PR
None. Related to #492 and #876
Description of the changes in this PR
This PR adds a return structure in
TracePath(src/solvers/logit/path.[cc/h]).The struct has the following fields:
I intended to pass that error upstream by returning an empty list in
nfglogitandefglogit. However, it raises an exception in the Python API, so I have decided to remove it for now.Therefore, this PR does not solve the problem of warning the user about not having found NE, but it keeps the struct that will be of use in the future.
If it is a priority to warn the C++ users when the NE is not found, a check could be easily implemented in
logit.cc. Otherwise, I would wait untilpath.ccis abstracted to make all the changes together in Python too.Suggestions are welcome!
How to review this PR
-Review the TracePathResult struct definition in path.h and the updated return statements in path.cc.