These are chat archives for symengine/symengine

22nd
Jun 2014
Thilina Rathnayake
@thilinarmtb
Jun 22 2014 09:14

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
Jun 22 2014 23:38
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
Jun 22 2014 23:46
You can also implement rref() for reduced row echelon form