The benefit of sets is that everyone can understand it but it still has enough complex elements (ProductSet, EmptySet) to capture the complexity of a lot of the more challenging systems (though probably not quite as challenging as tensors.)
On Fri, Apr 11, 2014 at 9:05 AM, Matthew Rocklin <[email protected]> wrote: > Well, sets *is* in the core. Interval, Union, and FiniteSet are all used > in various parts. Fortunately though I think we refactor without changing > functionality. So far I've just replaced a custom double dispatch system > with multipledispatch. > > > On Fri, Apr 11, 2014 at 8:46 AM, Aaron Meurer <[email protected]> wrote: > >> Oh, that's even better. Then we don't have to touch the core, and we >> can merge even experimental things faster. >> >> Aaron Meurer >> >> On Fri, Apr 11, 2014 at 10:40 AM, Matthew Rocklin <[email protected]> >> wrote: >> > Sets is a good play module for this purpose. Union and Intersection >> > simplify pairwise much like Add and Mul would. I like the pairwise >> methods >> > we have but the strategy to orchestrate them could use some cleaning up. >> > Might be a good place to build intuition. >> > >> > See https://github.com/sympy/sympy/pull/2979 >> > >> > >> > On Fri, Apr 11, 2014 at 8:27 AM, Aaron Meurer <[email protected]> >> wrote: >> >> >> >> This has always been the original motivation for multiple dispatch, at >> >> least in my mind. You can't make objects that do their own thing in >> >> Add or Mul or whatever. There are a dozen example of this throughout >> >> SymPy, and a dozen more in user code. There are many hacky ways around >> >> it, but none are satisfactory. >> >> >> >> The problem is, how do you dispatch Add(*args). Any argument of the >> >> Add might want to do anything with any other argument. You don't want >> >> to require that arguments be next to each other, because then >> >> something as simple as Add(yourobject, 0, yourobject) wouldn't do the >> >> right thing. You can do the n**2 passes, but does it remain efficient >> >> at that point? >> >> >> >> I think we should just start to play with this, especially now that we >> >> have a decent implementation of multiple dispatch. I'd personally >> >> rather play with this with a module that I can understand (so, e.g., >> >> matrix expressions rather than tensores), but anything is better than >> >> nothing. >> >> >> >> Aaron Meurer >> >> >> >> On Fri, Apr 11, 2014 at 5:17 AM, F. B. <[email protected]> >> wrote: >> >> > >> >> > >> >> > On Friday, April 11, 2014 1:29:11 AM UTC+2, Aaron Meurer wrote: >> >> >> >> >> >> There are probably little ways around these things, but nothing >> clean >> >> >> without dispatching in the core. >> >> > >> >> > >> >> > Another point in favor of multiple dispatching. >> >> > >> >> > By the way, tensor expressions should just become ordinary expression >> >> > with >> >> > the addition of an index management mechanism, as well as other >> features >> >> > such as components data association. >> >> > >> >> > Of course some precautions should be taken, for example all indices >> have >> >> > to >> >> > be contracted if you take the exponential of a tensor expression (I >> am >> >> > wondering, did anyone ever define a unique and consistent way to >> >> > generalize >> >> > the matrix exponential to tensors of any rank?). >> >> > >> >> > -- >> >> > You received this message because you are subscribed to the Google >> >> > Groups >> >> > "sympy" group. >> >> > To unsubscribe from this group and stop receiving emails from it, >> send >> >> > an >> >> > email to [email protected]. >> >> > To post to this group, send email to [email protected]. >> >> > Visit this group at http://groups.google.com/group/sympy. >> >> > To view this discussion on the web visit >> >> > >> >> > >> https://groups.google.com/d/msgid/sympy/b7592a77-00ef-4c82-a94b-f0e904581c63%40googlegroups.com >> . >> >> > >> >> > For more options, visit https://groups.google.com/d/optout. >> >> >> >> -- >> >> You received this message because you are subscribed to the Google >> Groups >> >> "sympy" group. >> >> To unsubscribe from this group and stop receiving emails from it, send >> an >> >> email to [email protected]. >> >> To post to this group, send email to [email protected]. >> >> Visit this group at http://groups.google.com/group/sympy. >> >> To view this discussion on the web visit >> >> >> https://groups.google.com/d/msgid/sympy/CAKgW%3D6L%2B0wx_h1YFT83swB90WwYq_fL3W6q-61frXxr-rUo0YQ%40mail.gmail.com >> . >> >> >> >> For more options, visit https://groups.google.com/d/optout. >> > >> > >> > -- >> > You received this message because you are subscribed to the Google >> Groups >> > "sympy" group. >> > To unsubscribe from this group and stop receiving emails from it, send >> an >> > email to [email protected]. >> > To post to this group, send email to [email protected]. >> > Visit this group at http://groups.google.com/group/sympy. >> > To view this discussion on the web visit >> > >> https://groups.google.com/d/msgid/sympy/CAJ8oX-Fh-a3sJ9NFRG%3DNt1bxcbkqcTLzcOPTMjGU4Hy%2BxEmdAg%40mail.gmail.com >> . >> > >> > For more options, visit https://groups.google.com/d/optout. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "sympy" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To post to this group, send email to [email protected]. >> Visit this group at http://groups.google.com/group/sympy. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/sympy/CAKgW%3D6%2BOOW5iHNsOCbFW26A6zh7j%3DnCm57pNTu8hTCv8m81i5Q%40mail.gmail.com >> . >> For more options, visit https://groups.google.com/d/optout. >> > > -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sympy. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CAJ8oX-G5ASH3vtEAsZ3T5dKGnZ_sxoZbdGxCNPbdhZ3k4Af8hQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
