Re: [sympy] Numbering in init_printing(latex_mode='equation')

2024-01-18 Thread Glenn Ramsey
Hi Matthias, Aaron, All, It works. I've hacked something together to add a \label{...} inside the equation environment. It is called like this: init_printing(latex_mode="equation", label="quadratic") display(ex2) Now the equation can be referenced using \ref{quadratic} or \eqref{quadratic}

Re: [sympy] Contribution to SymPy Projects + Polynomials representation ideas

2024-01-18 Thread Σπύρος Μαγγιώρος
Yes, so the addition of polynomials using an array is linear O(n), i just have to iterate through one of them and update the coefficients. The catch is that, if the polynomial has exponents close to each other, then the array wins, as it requires less time complexity and both the array and the

Re: [sympy] Contribution to SymPy Projects + Polynomials representation ideas

2024-01-18 Thread Sangyub Lee
I have some questions following the results because the benchmarks of AVL implementation seems like having high variance, and also figure 3,4 looks like there AVL implementation is slower, which doesn’t seem like having explanation On Thursday, January 18, 2024 at 4:25:38 PM UTC+3 Sangyub Lee

Re: [sympy] Contribution to SymPy Projects + Polynomials representation ideas

2024-01-18 Thread Spiros Maggioros
I understand, it was just an idea that i wanted to share. I used c++ to run the examples and created csv files to after plot the graph using matplotlib. So yes, i did not use python at all, i know the reasons as well. Thanks for your time! I'm getting used to the library now and will try to fix

Re: [sympy] Contribution to SymPy Projects + Polynomials representation ideas

2024-01-18 Thread Sangyub Lee
I’d like to see experiments done in Python implementation. Similarly as noted above, Python objects can’t take advantage of data structures very well, because Python objects have relatively high overhead, because they use __dict__ implementation under the hood. I have seen many issues that

Re: [sympy] Contribution to SymPy Projects + Polynomials representation ideas

2024-01-18 Thread Sangyub Lee
Do you have any link to publication or draft about your paper? On Wednesday, January 17, 2024 at 10:45:35 PM UTC+3 Spiros Maggioros wrote: > I understand, hash-table(unordered_map in c++) is the only data structures > that beats the tree representation in c++, there's drawbacks though, as you