GSoC'24 Week 2
[May 12 - May 19]
C++ backend for Node, TreeNode and ArrayForTrees
Coding info
In my second week of GSoC, I have worked on coding up the C++ backend for 3 classes: Node, TreeNode and ArrayForTrees. The backend follows the structure in their Python implementations. These C++ classes’ objects can now be called in the Binary Trees class.
Relevant PRs:
I worked on the PR: #556
Important commits include:
There have been a large number of commits, these involve addition of C++ backend for Node class, TreeNode class (which has Node as it’s base class) and ArrayForTrees class (which has DynamicOneDimensionalArray as it’s base class). Other commits fix errors and segfaults encountered and have code quality corrections.
Here is the progress tracker for the next few weeks: #554
In the following week, I will test all the code in this PR. It will be tested against the existing test cases and I will add more tests, covering edge cases that might occur. I will also add code to redirect control to this C++ backend (from Python), when the necessary backend parameter is passed.
Learnings/Difficulties
I learned how to define the “parent class and child class” structure in Python-C API, inheritance from the super class and making objects of a class using Python-C API.
I am grateful to my mentor, Gagandeep Singh, for encouraging me and resolving the issues I faced.
See you next week with more updates! :)
Enjoy Reading This Article?
Here are some more articles you might like to read next: