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

V0.5 RC0 #39

Merged
merged 163 commits into from
Jul 15, 2015
Merged

V0.5 RC0 #39

merged 163 commits into from
Jul 15, 2015

Conversation

ChrisRus
Copy link
Member

v0.5 release candidate 0 (v0.5.13)

Chris Russell added 30 commits June 23, 2015 13:52
... 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.
... 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.
@ChrisRus ChrisRus self-assigned this Jul 15, 2015
@ChrisRus ChrisRus added this to the v0.5 milestone Jul 15, 2015
ChrisRus pushed a commit that referenced this pull request Jul 15, 2015
@ChrisRus ChrisRus merged commit a9f0f00 into master Jul 15, 2015
@ChrisRus ChrisRus deleted the v0.5-RC0 branch July 16, 2015 00:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant