Hi. I've seen what you have done and it's amazing!!! I still have a lot to learn. What I did was much simpler, but still I'll try to incorporate what I did in your code, though it would be a slow process since I'm actually working on cosmology, not exactly on computer programming.
I'll start studying what you already have in order to contribute to the Sympy organization. Thanks again. 2011/3/9, Øyvind Jensen <jensen.oyv...@gmail.com>: > Alexander, > > Brian expressed everything very well, and I am sure that your > contributions will be very much appreciated! > > I worked on the tensor module[0] during the summer. At the moment, it > doesn't really deserve its name: We have implemented indexed objects > and implicit summation, but concepts like co- and contra-variance are > still missing. I don't have much hands on experience with index > gymnastics, so I decided it was better to delay those features. > However, I tried to make the implementation suitable for an extension to > such functionality. What I had in mind was that variance could be > implented in subclasses of the Idx class. Either like the GiNaCC VarIdx > class[1], or perhaps with separate classes ContraVarIdx and CoVarIdx. > > If you implement your tensor objects based on IndexedBase, Indexed, Idx > and subclasses, an immediate benefit is that the code printers will be > able to produce low-level code for the contractions, e.g: > >>>> n, m = symbols('n m', integer=True) >>>> A, x, y = map(IndexedBase, 'Axy') >>>> i = Idx('i', n) >>>> j = Idx('j', m) >>>> print ccode(A[i, j]*x[j], assign_to=y[i]) > for (int i=0; i<n; i++){ > y[i] = 0; > } > for (int i=0; i<n; i++){ > for (int j=0; j<m; j++){ > y[i] = A[j + i*m]*x[j] + y[i]; > } > } > > Do you think it will be possible to integrate your stuff easily? If > there are difficulties I am sure the people here at the Sympy list will > be willing to help. > > Cheers, > Øyvind > > [0] https://github.com/sympy/sympy/tree/master/sympy/tensor > [1] http://www.ginac.de/reference/classGiNaC_1_1varidx.html > > > > -- > You received this message because you are subscribed to the Google Groups > "sympy" group. > To post to this group, send email to sympy@googlegroups.com. > To unsubscribe from this group, send email to > sympy+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/sympy?hl=en. > > -- Alexander Gallego C. Instituto de Física, Facultad de Ciencias Exactas Y Naturales. Universidad de Antioquia. -- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to sympy@googlegroups.com. To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.