-
Notifications
You must be signed in to change notification settings - Fork 122
Chinese Postman Problem Algorithm #283
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
base: master
Are you sure you want to change the base?
Chinese Postman Problem Algorithm #283
Conversation
|
Awesome, I haven't looked at the PR yet but I'm very intrigued, I will have a look as soon as possible =) |
| int matrixSize = getMatrixSize(); | ||
| int[][] costMatrix = new int[matrixSize][matrixSize]; | ||
| VertexPair[][] pairMatrix = new VertexPair[matrixSize][matrixSize]; | ||
| findUnbalanced(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what happens here in the findUnbalanced() method, it looks like we process things without saving or acting upon the result, I might also be tired =)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can also see that "balance" the graph, if that would allow a path to be traversed several times, would be needed when we talk about traversing a model with the least amount of steps
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what happens here in the findUnbalanced() method, it looks like we process things without saving or acting upon the result, I might also be tired =)
This was meant to be where we first store negative and positive polarized vertices in their respective arrays neg[] and pos[], but I have realized that I should do that under polarize method, so I moved the operations there.
|
Could you add a unit test that show the algoritm in action? |
I have added a success and a fail test case, let me know if there is anything else you want me to add. |
Hello everyone,
This PR is my attempt in implementing the feature that is requested in issue #34. I would appreciate any suggestion on how to improve this implementation of Chinese Postman Problem Algorithm. Hopefully it can provide any meaningful contribution to GraphWalker.
Sincerely,
Onur Enginer