Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 18:56
    isuruf commented #1806
  • 16:41
    williamswhy starred symengine/symengine
  • 13:38
    cqc-alec opened #1806
  • Jun 10 08:15
    stromnov starred symengine/symengine
  • Jun 10 07:09

    github-actions[bot] on gh-pages

    deploy: 24c9d19b43eee3e4e76bbd3… (compare)

  • Jun 10 07:06

    lkeegan on master

    add sbml infix parsing and prin… rename `SymEngine::YYSTYPE` to … remove sbml_parser_stype: use P… and 14 more (compare)

  • Jun 10 07:06
    lkeegan closed #1785
  • Jun 08 18:30
    lkeegan synchronize #1785
  • Jun 08 14:31
    lkeegan synchronize #1785
  • Jun 08 07:47
    lkeegan commented #1785
  • Jun 08 07:07
    lkeegan synchronize #1785
  • Jun 07 19:22
    lkeegan synchronize #1785
  • Jun 07 18:53

    lkeegan on master

    add bison stack reallocation pa… use bison cpp API to support no… add google benchmark of parser and 1 more (compare)

  • Jun 07 18:53
    lkeegan closed #1805
  • Jun 07 18:53
    lkeegan closed #1804
  • Jun 07 14:27
    lkeegan commented #1805
  • Jun 07 14:21
    lkeegan opened #1805
  • Jun 07 14:19
    lkeegan labeled #1804
  • Jun 07 14:19
    lkeegan opened #1804
  • Jun 07 10:09
    rikardn commented #1785
Ondřej Čertík
@certik
sorry I didn't make it, my son didn't want to sleep and I managed to get to my computer now and I totally forgot about the meeting.
Enjoy your conference @sushant-hiray
Thanks for fixing the printing @thilinarmtb
Thilina Rathnayake
@thilinarmtb
It's okay @certik We can meet sometime later.
Thilina Rathnayake
@thilinarmtb

Hi @certik , @asmeurer, @sushant-hiray, @isuruf

I have a few problems about the API we should provide with gaussian elimination and gauss jordan elimination.

Both the algorithms clearly identify two Matrices, A anb b in Ax = b and operations are done on the augmented Matrix [A|b]. Ultimate goal of the algorithms is to solve the system Ax = b. So my question is, What should be our API to do this? I see two approaches towards this.

  1. gaussian_elimination(const DenseMatrix &A, DenseMatrix &B):
    This is the one I have used so far. Pros: User is able to find row echelon form of any matrix. Cons: Solving the system Ax = b will have to be carried in steps. First creating [A|b], call gaussian_elimination([A|b], B) and then solving the system using B.

  2. gaussian_elimination(const DensMatrix &A, const DenseMatrix &b, DenseMatrix &x):
    This will return the solutions of the system Ax = b as elements of vector x. So no extra steps. But if an user wants to find the row echelon form of A then he won't be able to do that through this API.

I would like to know your ideas regarding this.

Ondřej Čertík
@certik
This should be better discussed on a mailinglist. @asmeurer should we create a new mailinglist for csympy, or discuss this on the sympy list?
@thilinarmtb there needs to be API 2. for sure. Internally, this can be implemented in a number of ways. You can provide the API 1. if you think it's useful, and then just use it to solve 2.
Ondřej Čertík
@certik
You can also implement rref() for reduced row echelon form
Thilina Rathnayake
@thilinarmtb
Thanks Ondrej for the reply. Yes more discussion on this is better. I'll implement API 2 as well.
Aaron Meurer
@asmeurer
Regarding the mailing list, just do whatever you think is best.
I have no opinion whether CSymPy should be a separate mailing list.
Ondřej Čertík
@certik
@asmeurer ok. My feeling at the moment is that we'll use gitter or the sympy list for now, and if people start using csympy a lot with sympy, and if the related traffic is disrupting on the sympy list, then we can create a separate list.
@thilinarmtb, @sushant-hiray are you able to see the test runs at Shippable?
Ondřej Čertík
@certik
I know you need to login (until they fix Shippable/support#53), so just use your github credentials. But otherwise, are you able to see the test runs for each PR? Essentially I think only people with csympy commit access can see that, so I just want to make sure that's the case. The test runs are pretty quick (much faster than Travis on the sympy/csympy repo), so it should help with development. It's now fully compatible with Travis, i.e. the same .travis.yml is used for both. There was this horrible bug (Shippable/support#238) that caused me hours of debugging, but a workaround now works great. @asmeurer you might be interested in this too.
Thilina Rathnayake
@thilinarmtb
I didn't try it yet. I'll let you know after pushing new code.
Ondřej Čertík
@certik
@thilinarmtb can you click on https://www.shippable.com/projects/5367a2ea139eaadb02eddac2/builds/1807 and see if you can get to the test results?
Sushant Hiray
@sushant-hiray
i signedup via github and can access the builds!
shippable is quite fast!
Ondřej Čertík
@certik
Thanks @sushant-hiray, perfect.
Thilina Rathnayake
@thilinarmtb
Yes, I can see the test results. Everything is okay !!
Ondřej Čertík
@certik
@thilinarmtb thanks for working on the simplification issue. Why isn't it triggered by (2/x) * (x/2)?
Ondřej Čertík
@certik
(sympy/csympy#212)
Ondřej Čertík
@certik

I think I know, it's this part of Mul::dict_add_term():

        } else {
            // General case:
            it->second = add(it->second, exp);
            if (is_a<Integer>(*it->second) &&
                    rcp_static_cast<const Integer>(it->second)->is_zero()) {
                d.erase(it);
            }
        }

which checks that the coefficient is zero (after combining 2/x and 2/x), and removes it from the dictionary. So I think all that is needed is to check, that the combined coefficient and key is of the type 2^-5, i.e. that it can be represented as a Rational, and if so, remove it from the dict, and add it to the overall coefficient.

Jess Smith
@smithjessk
Hi, I'm new here. Does anyone know if integrals will soon be included in CSympy?
Ondřej Čertík
@certik
hi @smithjessk what kind of integrals do you need?
Jess Smith
@smithjessk
@certik relatively simple indefinite ones that can be handled by sympy. for example, integrating sin(x)
Ondřej Čertík
@certik
@smithjessk what is your application that sympy is too slow for this?
Jess Smith
@smithjessk
@certik i'd prefer to use sympy, but the application is for the iphone.
Ondřej Čertík
@certik
I thought that iphone runs python?
anyway, to answer your question, we can add some simpler integrals, but I don't want to reimplement the whole sympy. The goal of csympy is to deliver the speed.
Jess Smith
@smithjessk
@certik at least to my knowledge, there's no effective way to include Python code in an iOS application.
Ondřej Čertík
@certik
I see. How would you include a C++ application like csympy?
Jess Smith
@smithjessk
@certik do you mean reimplementing all of the sympy integrals module?
@certik you can ship c++ code inside of an iOS application. since it's MIT licensed, it can be ported without too much trouble. please correct me if I'm wrong here :)
Ondřej Čertík
@certik
(I don't want to reimplement the whole sympy integrals module, as it depends on good polynomial support and then it's highly nontrivial, i.e. that would be like a year of work or so.)
sympy is also BSD licensed
Jess Smith
@smithjessk
yes, but csympy is MIT.
what is lacking about the polynomial support now?
Ondřej Čertík
@certik
right. What is the problem with a BSD license?
I am genuinely curious.
Jess Smith
@smithjessk
there isn't a problem! i was just saying
Ondřej Čertík
@certik
I don't understand your argument, that thanks to MIT, it can be ported, but due to BSD, it can't be ported.
Jess Smith
@smithjessk
sorry for the confusion, that wasn't my argument.
Ondřej Čertík
@certik
I see.
As to polynomials, essentially nothing is implemented yet in csympy, but I plan to use https://github.com/bluescarni/piranha for good and fast polynomial support.
But for integrals, I think some factorization and other polynomial algorithms are needed, and those would have to be implemented.
Jess Smith
@smithjessk
alright.
i read something somewhere about converting Sympy to its C code and using that.
do you have any thoughts about that approach?
Ondřej Čertík
@certik
Is the goal to run sympy on platforms that don't run python?