Improve algo#84
Closed
shravandoda wants to merge 3 commits intoHTTP-APIs:developfrom
shravandoda:improveAlgo
Closed
Improve algo#84shravandoda wants to merge 3 commits intoHTTP-APIs:developfrom shravandoda:improveAlgo
shravandoda wants to merge 3 commits intoHTTP-APIs:developfrom
shravandoda:improveAlgo
Conversation
Contributor
|
Related to #72 |
sandeepsajan0
suggested changes
Mar 2, 2019
| alias="Entrypoint", | ||
| properties=entrypoint_properties) | ||
| self.redis_graph.add_node(entrypoint_node) | ||
| redis_connection.set("EntryPoint", entrypoint_properties) |
Contributor
There was a problem hiding this comment.
@shravandoda classes_objects and collection-endpoints also have the same error.
I think @PrajwalM2212 also working on the same issue in PR #73. So, Please ask him.
hydra_agent/classes_objects.py
Outdated
| break | ||
| break | ||
| node_alias[str(endpoint)] = class_object_node | ||
| endpoint_property_list[endpoint] = property_list |
Contributor
There was a problem hiding this comment.
Repetition of this line. see line 232.
Contributor
Author
There was a problem hiding this comment.
@sandeepsajan0, I think I should close this PR (as @Mec-iS stated in #83)
Contributor
There was a problem hiding this comment.
@shravandoda You can close it. And try to do it in a better way as @Mec-iS suggest.
Member
|
Closing as requested |
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.
Fixes #83
This implementation works by creating a dictionary local to the
endpointclassesmethod. The dictionary has aliases of the nodes as keys and the corresponding graph nodes as values. Then it uses another methodconnect_nodeswhich takes in the dictionary as well as theendpoint_property_listas argument and adds edges between the nodes. This way it does not have to traverse through the whole graph (which containscollectionEndpointsas well while the dictionary only contains concernedclassEndpoints). Although the space complexity of this method is greater than the current implementation but the time complexity is reduced (thanks to python's dictionary.get() method's average case time complexity of O(1)).@Mec-iS @sandeepsajan0 kindly review.