These are chat archives for symengine/symengine

16th
May 2016
Iris Lui
@irislq
May 16 2016 04:10
@isuruf Thanks for merging! I'll try to get some benchmarks on how much faster the polynomial operations are later and put them on the wiki
Isuru Fernando
@isuruf
May 16 2016 04:12
Great
Nishant Nikhil
@nishnik
May 16 2016 15:05
@isuruf there?
Isuru Fernando
@isuruf
May 16 2016 15:05
yes
Nishant Nikhil
@nishnik
May 16 2016 15:06
Well
For Finite Set to have multiple data type, I gave a thought over it. We can have vector of a union, or vector of std::exceptional::any
Using any will be better
Isuru Fernando
@isuruf
May 16 2016 15:09
What's the reason for not using a set_basic?
Nishant Nikhil
@nishnik
May 16 2016 15:11
On the lines of SymPy, I was thinking of having it for strings also. though if we limit it to basic, we are good to go
Isuru Fernando
@isuruf
May 16 2016 15:12
strings? What's the use case for strings?
Nishant Nikhil
@nishnik
May 16 2016 15:14
I don't know, but it was there in test_sets.py
Isuru Fernando
@isuruf
May 16 2016 15:14
Can you give me a link in github?
Isuru Fernando
@isuruf
May 16 2016 15:16
which line?
Nishant Nikhil
@nishnik
May 16 2016 15:16
Sorry I can't redirect to specific line as I am on mobile phone
assert FiniteSet('ham') + FiniteSet('eggs') == FiniteSet('ham', 'eggs')
Isuru Fernando
@isuruf
May 16 2016 15:18
In [9]: type(FiniteSet('ham').args[0])
Out[9]: sympy.core.symbol.Symbol
Nishant Nikhil
@nishnik
May 16 2016 15:19
Sorry. It got clear now, I will change it to set_basic
What should I do after this ?
I mean as you have
Told @srajangarg to shift all polynomial related Algorithms to end of summers , should I start on implementation of finite fields
Isuru Fernando
@isuruf
May 16 2016 15:24
I told @srajangarg, to shift improving polynomials with Rational or Integer coefficients
Nishant Nikhil
@nishnik
May 16 2016 15:27
Still, I think that as there are some changes going on in UniVariate polynomial, we should implement gcd, div a little late.
Isuru Fernando
@isuruf
May 16 2016 15:28
@srajangarg, are you here?
Srajan Garg
@srajangarg
May 16 2016 15:29
Yes
Once the UnivariateIntBaseis made, most of the capabilities that you'll need will probably become available
through FLINT/Piranha
But implementing them inSymEngine might take some time
Isuru Fernando
@isuruf
May 16 2016 15:32
@nishnik how are you going to implement finite fields?
Ondřej Čertík
@certik
May 16 2016 15:32
HI
Isuru Fernando
@isuruf
May 16 2016 15:33
As another polynomial type?
Nishant Nikhil
@nishnik
May 16 2016 15:33
Finite fields related Algorithms are there for dense polynomials.
Isuru Fernando
@isuruf
May 16 2016 15:35
@certik, we now have a UnivariateExprPolynomial which is a wrapper around map_int_Expr and is the storage class for UnivariatePolynomial like mpz_class is the storage for Integer
Nishant Nikhil
@nishnik
May 16 2016 15:35
And as we have sparse implementation, we will have to change them to dense polys, and then they are vector of coefficients
Isuru Fernando
@isuruf
May 16 2016 15:36
We need to figure out who is going to do what, so that one is not waiting for another
Sumith Kulal
@Sumith1896
May 16 2016 15:38
@nishnik You have vec_int intpoly_to_vec(RCP<const UnivariateIntPolynomial> &a); in your proposal, are you talking about such functions?
Srajan Garg
@srajangarg
May 16 2016 15:39
@isuruf Won't we have both UnivariateSparseIntSymEngine and UnivariateDenseIntSymEngine as derived classes from the base wrapper?
Plus, FLINT already deals with only dense representation
Isuru Fernando
@isuruf
May 16 2016 15:40
We could have them, I'm just not sure we need a dense representation right now
Nishant Nikhil
@nishnik
May 16 2016 15:40
Yeah. But apart from it, I
Isuru Fernando
@isuruf
May 16 2016 15:40
@nishnik, what's the reason for needing a dense representation?
Nishant Nikhil
@nishnik
May 16 2016 15:40
Think we can implement it on sparse poly's also
Densee
Using dense polys, we can have a vector representation and it becomes easier to implement the Algorithms
Isuru Fernando
@isuruf
May 16 2016 15:42
Do you have an example where it's easier to implement when it is dense?
Nishant Nikhil
@nishnik
May 16 2016 15:44
Like in shift operation, we can just point the start element to the next one and push a zero at begin for dense representaion
While in sparse representation, we will have to iterate over all them to decrease/increase the key of map.
Isuru Fernando
@isuruf
May 16 2016 15:47
Right.
We can start with a sparse representation for now
Srajan Garg
@srajangarg
May 16 2016 15:47
@isuruf Say when we implement UnivariateIntFlint, the vector inside the representation won't be exposed to us, right?
Ondřej Čertík
@certik
May 16 2016 15:47
We should ideally implement it so that we can use both sparse and dense. Otherwise I would suggest to start with the sparse one, I think it's overall faster.
Isuru Fernando
@isuruf
May 16 2016 15:49
@srajangarg, I don't understand
Nishant Nikhil
@nishnik
May 16 2016 15:50
Okay. I will start with the sparse representation.
Sumith Kulal
@Sumith1896
May 16 2016 15:50
I think he is trying to ask if @nishnik needs to access the vector for UnivariateIntPolynomialand we use FLINT for dense, will the vectors of the representation be accessible?
Isuru Fernando
@isuruf
May 16 2016 15:52
No, but we can have a shift operation defined for all types
Sumith Kulal
@Sumith1896
May 16 2016 15:55
Cool
Srajan Garg
@srajangarg
May 16 2016 15:55
Shift operations?
Nishant Nikhil
@nishnik
May 16 2016 15:56
But the algorithms will need the actual coefficients, the vector representation in case of dense polynomials
Srajan Garg
@srajangarg
May 16 2016 15:58
As in, the whole vector altogether?
I think a starting point for me would to start working on the Base class for the univariate polynomials. We would be needing this anyway in the future.
Nishant Nikhil
@nishnik
May 16 2016 16:00
Yes. The vector having respective coefficient at its ith place.
Srajan Garg
@srajangarg
May 16 2016 16:07
@isuruf what changes should I start making to the current class? And how should it be structured?
More specifically, should I follow the same structure that is in use for polynomials with symbolic coefficients? We need operators overloaded, yes?
Srajan Garg
@srajangarg
May 16 2016 16:38
Is anyone there?
Isuru Fernando
@isuruf
May 16 2016 16:38
Yes, sorry I was away for dinner