Skip to content

Added Fenwick Trees #92

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

Merged
merged 6 commits into from
Mar 9, 2020
Merged

Conversation

aravind-karthikeyan
Copy link
Contributor

@aravind-karthikeyan aravind-karthikeyan commented Feb 21, 2020

Added Fenwick Trees
Closes #24

@codecov
Copy link

codecov bot commented Feb 21, 2020

Codecov Report

Merging #92 into master will increase coverage by 0.71%.
The diff coverage is 100%.

@@             Coverage Diff              @@
##            master       #92      +/-   ##
============================================
+ Coverage   97.385%   98.095%   +0.71%     
============================================
  Files           30        21       -9     
  Lines         1721      1575     -146     
============================================
- Hits          1676      1545     -131     
+ Misses          45        30      -15
Impacted Files Coverage Δ
pydatastructs/trees/__init__.py 100% <ø> (ø) ⬆️
pydatastructs/trees/binary_trees.py 96.894% <100%> (+0.456%) ⬆️
...astructs/miscellaneous_data_structures/__init__.py 100% <0%> (ø) ⬆️
pydatastructs/graphs/__init__.py 100% <0%> (ø) ⬆️
pydatastructs/linear_data_structures/__init__.py 100% <0%> (ø) ⬆️
pydatastructs/__init__.py 100% <0%> (ø) ⬆️
...datastructs/linear_data_structures/linked_lists.py 100% <0%> (ø) ⬆️
...tructs/trees/tests/test_space_partitioning_tree.py
pydatastructs/utils/tests/test_misc_util.py
...ydatastructs/graphs/tests/test_adjacency_matrix.py
... and 13 more

Impacted file tree graph

@@ -0,0 +1,34 @@
__all__ = ['FenwickTree']
class FenwickTree():
def __init__(self, array):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use __new__ to create and initialise objects. See other modules and files for examples.

from pydatastructs.trees import FenwickTree
from pydatastructs.utils.raises_util import raises
from copy import deepcopy
def test_FenwickTree():
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add empty line.

@czgdp1807
Copy link
Member

Please add doc strings to classes and methods. See other modules for examples.

@czgdp1807
Copy link
Member

Are you participating through GSSoC, 2020?

@aravind-karthikeyan
Copy link
Contributor Author

aravind-karthikeyan commented Feb 27, 2020

@czgdp1807 Made changes as you instructed

@aravind-karthikeyan
Copy link
Contributor Author

Are you participating through GSSoC, 2020?

No

@czgdp1807
Copy link
Member

Thanks. Some minor changes are required. Please enable Allow edit from maintainers in right hand side of the page. Will push some commits to finalise.

@czgdp1807 czgdp1807 added the hard label Feb 28, 2020
@aravind-karthikeyan
Copy link
Contributor Author

Thanks. Some minor changes are required. Please enable Allow edit from maintainers in right hand side of the page. Will push some commits to finalise.

Allowed edit from maintainers

@aravind-karthikeyan
Copy link
Contributor Author

Is there anything else need to be done?

@czgdp1807
Copy link
Member

No. I am a bit busy to make some final changes to your PR. I will push the changes whenever I will find some time.

@czgdp1807 czgdp1807 merged commit bd4e402 into codezonediitj:master Mar 9, 2020
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 this pull request may close these issues.

Add Fenwick Tree
2 participants