-
Notifications
You must be signed in to change notification settings - Fork 5
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
V0.5 RC0 #39
Conversation
This file contains 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
... Fix for issue #7 using single-character property names in vertex and edge descriptor objects in the JSON format.
... BFV/BFS visitors are now required to return a boolean flag indicating visitor continuation (true) or abort (false). Tests are required.
... same as BF*, visitors (excluding initializeVertex) are now required to return a boolean flag indicating if the search traversal should continue (true) or abort (false). In call BF* and DF* cases the intention is that the return result of the alorithm call is used to determine if the search completed. True indicates that the search completed. False indicates that it was aborted because a visitor returned false. It's on the client code to track whatever context is required to determine when/if to abort. And, to maintain whatever meta-state is required to disambiguate the true/false return code of the algorithm (e.g. at what point in the search did we abort? for what reason(s)? that's all on the derived client code; that stuff doesn't belong in jsgraph algorithms.
now toJSON/toObject and fromJSON/fromObject. Note that DirectedGraph may be contructed with either JSON or object exported using either toJSON/toObject. fromJSON/fromObject are incremental loaders that deserialize and then add to the existing contents of the DirectedGraph container.
... from the DFS algorithm implementation that I don't believe should ever be reacable. DFS loops over the set of root vertices in the graph and initiates a DFV from each. By definition if a vertex is not reachable from one of the root vertices (i.e. it has zero in-degree) then it's a root vertex. So there should never be any elements in the undiscovered vertex map. I replaced the loop over the contents of this map (that I contend has never run) with a thrown Error object.
... added notes (comments) to BFSV, DFS, DFV algorithms regarding function signature changes I'm planning to make them simpler to use in 99% of the cases, and clear to use in the 1% of the cases (i.e. my use cases) that are highly custom.
... this is a slipperly slope: for a number of reasons I want request/response everywhere but am trying to keep it as minimal as possible this pass. I've got a sub-library in Encapsule/jbus that I really need to spin out to automate conversion to request/response API but not this time.
... everything is currently all busted up.
... which turns out to be rather a lot more work than I had hoped. Oh well - every time I touch jsgraph I try to do a decent job so...
... working on associated test refactor (plus extension of test coverage) for BF* currently before moving on to DFV/DFS.
... with backing changes to DirectedGraph plus essentially working BFS? I am in the process of finishing off the BFV/BFS test regressions.
... BFV tests are now reworked and passing. Need to update BFS tests as well.
... This commit completes one pass through the BF* tests and algorithms after refactoring. Additional tests are required to confirm that BF* termination is working for all visitor methods. As well, new tests are required to confirm the nuances of the advanced uses of the signalStart flag and manual creation of the search context.
Chrisrus/v0.5 algorithm api - good.
... before I forget about it this was annoying me yesterday. It's one thing to have a function that tags its output with some identifier you don't care about (because presumably there's some other function that's going to look for it later for some reason). It's another to force humans to go look them up. So the watermark is just ignored on input now.
... a few other misc. odds and ends before finishing off BF*.
... Even w/single-character variable names the serialized representation isn't nearly as compact as it could be. However, I want to maintain separate lists for vertices and edges instead of the more compact matrix representation in order to make it simple to generate jsgraph graphs with simple JavaScript routines.
... Note that this should not be considered stable because it relies on DirectedGraph which is slated for a round of rework over the next several days. I want the algorithms refactored to request/response and termination, tested, and stable before destabilizing the core. Then I can break that, fix its unit tests, and then theoretically make only implementation changes to the algorithms to get get the tests to pass.
Chrisrus/v0.5 bfsv - Travis good
file renaming and refactoring of the algorithms.
request and response. Supposed to be simple. It's as simple as it can be I think.
Chrisrus/develop - Travis good as expected. Taking it to RC0.
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.
v0.5 release candidate 0 (v0.5.13)