SUBJECT: A proposal for Commons numbers (NUMBERS-186) Hi Alex,
I am Sumanth and new to Open source development. I would like to start by participating in GSOC 22. I came across your NUMBERS-186 GSOC mini project idea and took an initial stab at it If I understand the wish list correctly, we need to implement an efficient Complex List collection that supports all operations defined in the Complex class In my first attempt, I have implemented a ComplexList that is backed by two primitive double arrays for real and imaginary parts. The backing arrays grow as needed similar to the ArrayList<Complex> implementation and supports all operations of the List<Complex> interface I have added methods for operations from the Complex class with the following variations for each operation a) Operation for a single complex number at given index b) Operation for range of complex numbers with startIndex and length ComplexList applies all the operations in place modifying the backing arrays as per the requirement. I have also added support for an ImmutableComplexList that returns a copy of the List for each of the operations. My partial implementation (with TODOs for many operations) is available here. https://github.com/sumanth-rajkumar/commons-numbers/blob/sumanth-gsoc-22/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/ComplexList.java I would like to re-use the implementations from Complex class. For some of the simpler operations I exposed the private static methods from Complex class. However, in order to fully reuse all operations, the Complex class will require more refactoring... Am I on the right track? Will it be ok to refactor the Complex class to allow reuse of operation methods between Complex and ComplexList classes or should I just copy the implementations to List class? I have also added a sample unit test for ComplexList similar to the existing ComplexTest. Based on feedback, I plan to complete all the TODO implementations & comments, add full unit test coverage and any other tasks required to raise a PR Further, if there is interest, I also plan to extend the ComplexList for higher dimensions (2D, 3D, 4D etc..) -Sumanth [1] https://issues.apache.org/jira/browse/NUMBERS-186 [2] https://markmail.org/message/n4zpcxh7d7knq5tb?q=NUMBERS-186+list:org%2Eapache%2Ecommons%2Edev/ I have posted two ideas for GSoC mini projects under: > > https://issues.apache.org/jira/browse/STATISTICS-54 > https://issues.apache.org/jira/browse/NUMBERS-186 > > Alex > >