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

Add ImplicitArray #457

Open
czgdp1807 opened this issue Dec 9, 2021 · 6 comments
Open

Add ImplicitArray #457

czgdp1807 opened this issue Dec 9, 2021 · 6 comments

Comments

@czgdp1807
Copy link
Member

Description of the problem

As of now in OneDimensionalArray and subclasses we store all the data explicitly in memory. ImplicitArray will just store a function object. This function object will return values for different indices. That way the memory requirement will be reduced to a constant. This will be useful for cases where search algorithms don't need an explicit array but a range and some values associated with that range.

Example of the problem

References/Other comments

@hassanrahim26
Copy link

Hey, @czgdp1807 I want to work on this issue. Can you please tell me ways to get started?

@czgdp1807
Copy link
Member Author

Sure go ahead. Well it's about adding new classes (ImplicitArray, OneDimensionalImplicitArray) in arrays.py with same interface (methods in simpler terms) as Array, OneDimensionalArray. There is a lot of code in arrays.py which you can go through and follow the same pattern for adding implicit arrays.

@hassanrahim26
Copy link

hassanrahim26 commented Dec 9, 2021

So, do I've to create a new class like this:-

class ImplicitArray(Array):
    pass

class OneDimensionalImplicitArray(ImplicitArray, OneDimensionalArray):
    "Here I've to declare the functions of this class"

@czgdp1807
Copy link
Member Author

Yeah exactly. In fact, the classes you have inherited seems about right.

@hassanrahim26
Copy link

Alright then. I'll work on this issue and I'll create a PR for this.

@NIveX2169
Copy link

hi can you assign me this issue under GSSOC23 .

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

No branches or pull requests

3 participants