codezonediitj / pydatastructs

A python package for data structures and algorithms
https://pydatastructs.readthedocs.io/en/stable/
Other
199 stars 269 forks source link

Nd Fenwick tree(BIT) #495

Open AbdelrahmanKhaledd opened 2 years ago

AbdelrahmanKhaledd commented 2 years ago

I added BIT-2D issue #377 i will add descriptions to code for doc. i have a problem , i can't import the BIT2D from test files after i added BIT2d allready in binary_trees.py ,despite reinstalling the library after editing.

czgdp1807 commented 2 years ago

Is it possible to generalise BIT further to n dimensions? You might need to brainstorm to figure out the implementation.

AbdelrahmanKhaledd commented 2 years ago

Alright , i will read about it ant try ,but the main problem as i said new classes doesn't included in the library so i can't make tests, is there any place i can discuss my problem?

czgdp1807 commented 2 years ago

You have to include your class in __all__ lists at the correct places for accessing it via imports. In your editor look where, BinaryIndexedTree is mentioned in the project. That should help.

AbdelrahmanKhaledd commented 2 years ago

I finished 2d version , now i can add n dimensions version after thinking about its implementation. shall i make a new pull requrst for it or just rename this one ?

czgdp1807 commented 2 years ago

Do it in this PR.

AbdelrahmanKhaledd commented 2 years ago

I added it and make tests and everything alrought . please, review code.

AbdelrahmanKhaledd commented 2 years ago

Remove 2d one and leave general one if you want.

czgdp1807 commented 2 years ago

The structure looks good. I will review it on Sunday or next Sunday most probably. Feel free to work on other things meanwhile.