These are chat archives for symengine/symengine

12th
May 2016
Charles Chen
@chenchfort
May 12 2016 01:42
How do we store a Rational object into Expression?
@isuruf
Isuru Fernando
@isuruf
May 12 2016 01:54
How are you constructing the Rational object?
Charles Chen
@chenchfort
May 12 2016 03:04
With a double passed to constructor
Charles Chen
@chenchfort
May 12 2016 03:17
*A double passed into rational_class then passed into Rational’s constructor.
Isuru Fernando
@isuruf
May 12 2016 04:04
Then Expression(rat) should work
Expression(RCP<const Basic>) is the method
Srajan Garg
@srajangarg
May 12 2016 04:42
@isuruf what was the reason for the 'hack' that SeriesCoeffInterface inherits from Number?
Isuru Fernando
@isuruf
May 12 2016 05:00
It was so that Series + Series works
Srajan Garg
@srajangarg
May 12 2016 06:45
Why do we have a UnivariateIntPolynomial::create method? It serves the same purpose as UnivariateIntPolynomial::from_vec method
Can it be removed?
Isuru Fernando
@isuruf
May 12 2016 06:49
Yes
Srajan Garg
@srajangarg
May 12 2016 06:52
I won't remove it from the current class. In the new class UnivariateIntBase for the three type of polynomials, I just won't add that method
Is that Ok?
Isuru Fernando
@isuruf
May 12 2016 06:53
Yes
Srajan Garg
@srajangarg
May 12 2016 07:09
Also, I think the from_vec and from_dict methods are not needed. They can be handled just by the external univariate_int_poly method
inline RCP<const UnivariateIntPolynomial>
univariate_int_polynomial(RCP<const Symbol> i, map_uint_mpz &&dict)
{
    return UnivariateIntPolynomial::from_dict(i, std::move(dict));
}
which is what it is basically doing right now too. I'll just make one more for vec_int too
Srajan Garg
@srajangarg
May 12 2016 12:37
@isuruf Any idea on the warning in the build, right now? (in master)
Isuru Fernando
@isuruf
May 12 2016 12:38
Which warning?
Srajan Garg
@srajangarg
May 12 2016 13:38
/home/garg/code/symengine/symengine/dense_matrix.cpp:186:0: warning: ignoring #pragma omp parallel [-Wunknown-pragmas]
 #pragma omp parallel for
 ^
/home/garg/code/symengine/symengine/dense_matrix.cpp:211:0: warning: ignoring #pragma omp parallel [-Wunknown-pragmas]
 #pragma omp parallel for
 ^
/home/garg/code/symengine/symengine/dense_matrix.cpp:235:0: warning: ignoring #pragma omp parallel [-Wunknown-pragmas]
 #pragma omp parallel for
 ^
/home/garg/code/symengine/symengine/dense_matrix.cpp:246:0: warning: ignoring #pragma omp parallel [-Wunknown-pragmas]
 #pragma omp parallel for
 ^
Isuru Fernando
@isuruf
May 12 2016 13:47
Sent a PR
Srajan Garg
@srajangarg
May 12 2016 14:52
@isuruf I'm trying to implement the UnivariateInt class as a child of a UnivariateIntBase class. I followed the file structure as well as the code structure to the series module very closely. But I'm getting a lot of link errors (while building tests). Is there something I am missing?
Most of them are 'multiple definition of some_univariate_int_function' type of errors
Srajan Garg
@srajangarg
May 12 2016 14:59
and those functions aren't even member functions of any class
Isuru Fernando
@isuruf
May 12 2016 16:50
If you have the implementation of a function in the header itself then the function has to be declared inline