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

Replace Node by TreeNode and GraphNode #34

Closed
czgdp1807 opened this issue Nov 18, 2019 · 12 comments · Fixed by #80
Closed

Replace Node by TreeNode and GraphNode #34

czgdp1807 opened this issue Nov 18, 2019 · 12 comments · Fixed by #80
Labels

Comments

@czgdp1807
Copy link
Member

czgdp1807 commented Nov 18, 2019

Description of the problem

Currently we have a generic Node class which basically has methods and data members for trees. However, when we will add graphs, the above Node class will not be compatible.
It would be better to use specific classes for, trees i.e., TreeNode(rename Node -> TreeNode) and a new GraphNode.
This issue aims at discussing the API for the latter.

Example of the problem

References/Other comments

@raajtilaksarma
Copy link
Contributor

Can I take this issue? The current class Node in https://github.com/codezonediitj/pydatastructs/blob/master/pydatastructs/utils/misc_util.py is to be changed to TreeNode right?

@czgdp1807
Copy link
Member Author

Yes. The other thing to be done is to discuss and finalise the API of GraphNode i.e., what data members and methods it should have. But we will do that later once Node is replaced by TreeNode across the modules.

@raajtilaksarma
Copy link
Contributor

Okay. On it. Can you add the KWOC label to this issue?

@czgdp1807
Copy link
Member Author

Let's discuss the API for GraphNode now. If you have anything suggest then please comment. Refer #17 and #13

@raajtilaksarma
Copy link
Contributor

So next we need to create a class GraphNode right?

@czgdp1807
Copy link
Member Author

Yes but before that we need to discuss its API.

@czgdp1807
Copy link
Member Author

@raajtilaksarma Are you working on it?

@raajtilaksarma
Copy link
Contributor

raajtilaksarma commented Dec 7, 2019 via email

@czgdp1807
Copy link
Member Author

By api do you mean
properties of the GraphNode like its methods and variables?

Yes, especially user facing methods and variables. Refer the issue and PRs, links to which I have shared in other comment.
Once you suggest your ideas, we will improve on it.

@raajtilaksarma
Copy link
Contributor

raajtilaksarma commented Dec 7, 2019 via email

@raajtilaksarma
Copy link
Contributor

raajtilaksarma commented Dec 7, 2019 via email

@czgdp1807
Copy link
Member Author

I don't think because both undirected and directed graph can be represented in terms of each other. For example if we use adjacency list or adjacency matrix then both can represent generic graphs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants