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
Add functions to compute Schultz and Gutman Index #3709
Conversation
Hello @jangwon-yie! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
Comment last updated at 2019-11-07 11:57:18 UTC |
The Schultz index, and Gutman index (second type of schultz index) are related to the Wiener Index and Kirchoff Index (https://hrcak.srce.hr/132323). All four (and others) are used as markers of chemicals based on the molecular network of atoms connected by chemical bonds. The functions provided here can be improved and updated. The file structure, doc_strings and tests seem pretty good. I think they should be moved into the module |
10b73b7
to
e151202
Compare
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'll go ahead and approve this -- mostly to let you know that it is ready to be reviewed.
Do we want these functions? Is this the right place?
The functions seem useful and appropriate for NX. |
These measures involve both distances between nodes and the degree of the nodes. Can you say why you tink they should all be contained within the ditance_measures.py module? |
IMO adding these actually motivates keeping a separate module for the related indices. From the user perspective it should be a moot point as users are encouraged to call indices from the top level namespace rather than go spelunking through the package hierarchy. In other words, it's largely an implementation detail that shouldn't hold anything up in this PR! |
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 took the liberty of pushing up a few minor docstring tweaks, but otherwise LGTM. Thanks @jangwon-yie !
I'm certainly no expert, but I'm in favor of adding these indices - they're straightforward computations and seem to be generic measures of graph properties!
* Add implementaions of Schultz index of first, second kind and their unit tests * Add schultz.rst and update __init__.py * remove an ambiguous variable * move new functions to wiener.py clean up references and docs * Minor docstring touchups. --------- Co-authored-by: Dan Schult <dschult@colgate.edu> Co-authored-by: Ross Barnowski <rossbar@caltech.edu>
It contains implementations of first, second kinds of Schultz index and their unit cases. Please give me any comments so that it will be merged to the main branch. Thanks.