These are chat archives for symengine/symengine

8th
May 2016
Srajan Garg
@srajangarg
May 08 2016 13:52

@isuruf I was thinking over the implementation of the interface with the other libraries. I think there are two ways to go about it. First, there is a single UnivaraiateIntPolynomial class, and the user decides on creation which internal "implementation" will the said polynomial use. Then, the functions like add_poly and mul_poly will just have internal checks to see which type of implementations the polynomials use, and do the necessary manipulation.

Second, is to create separate UnivariateInt classes like, UnivariateIntSymEngine, UnivariateIntPiranha and so on. Thus a user can explicitly decide to use whichever he wants. Plus, the methods like add_poly and mul_poly can be overloaded to deal with different polynomial types accordingly.

Any suggestions you have as to how I should start off?

Isuru Fernando
@isuruf
May 08 2016 13:54
I would go with the second option
For some applications, FLINT will be good and for others piranha is good. Advantage is that the user can choose the option at runtime
Srajan Garg
@srajangarg
May 08 2016 14:05
Currently the series expansion uses the second approach right? With different classes for different internal implementations?
Isuru Fernando
@isuruf
May 08 2016 14:05
Yes
Srajan Garg
@srajangarg
May 08 2016 14:06
Okay, I'll sketch a rough structure of the classes, and discuss further with you. If you are free can you look at the ks2 PR, I have attached some benchmarking results/graphs.
Isuru Fernando
@isuruf
May 08 2016 14:11
The PR looks good at first glance, but I didn't have time to go through the algorithm properly.
You should add the benchmark to benchmarks/CMakeLists.txt for it to compile with other benchmarks
Also, add a comment about the source of the algorithm