On Friday, March 4, 2016 at 7:48:52 PM UTC+5:30, Kshitij Saraogi wrote: > > >>> - Handling multidimensional sets >>> The Ideas Page states that we need to implement few functions to >>> handle multidimensional set objects. >>> We have a ProductSet class which represents Cartesian Product of >>> Sets. >>> Shouldn't a n-ary ProductSet object represent a n-dimensional set >>> object ? >>> If not, I would like to know more about this topic. >>> >>> >> Yes, that can work as well. See the implementation of ComplexRegion for >> Two-Dimensional representation of the argand plane. >> > > I see that we have used a ProductSet object to define the desired region > on the Argand Plane. > > >> >> >>> >>> - >>> >>> While reading Harsh's GSoC Application Proposal, I came across a few >>> points that I think need to be addressed. >>> >>> - Sets need to get more powerful to deal with countable infinite >>> sets. I think this needs to be implemented as it enhances over power to >>> deal with ImageSet objects. I will read the relevant resources and try >>> to >>> implement them. Harsh's PR #2904 might come in handy as well. >>> - Better imageset evaluator I would like to know what exactly is the >>> inspiration behind this ? >>> >>> >> See this: >> https://github.com/sympy/sympy/pull/10713#issuecomment-191472434 >> The following could be much simplified with a better Imageset evaluator. >> >> In [11]: solveset(sin(3*x), x) >> Out[11]: >> ⎧ 2⋅π ⎫ ⎧ >> 2⋅π >> {2⋅n⋅π | n ∊ ℤ} ∪ {2⋅n⋅π + π | n ∊ ℤ} ∪ ⎨2⋅n⋅π - ─── | n ∊ ℤ⎬ ∪ ⎨2⋅n⋅π + >> ─── | >> ⎩ 3 ⎭ ⎩ >> 3 >> >> ⎫ ⎧ π ⎫ ⎧ π ⎫ >> n ∊ ℤ⎬ ∪ ⎨2⋅n⋅π - ─ | n ∊ ℤ⎬ ∪ ⎨2⋅n⋅π + ─ | n ∊ ℤ⎬ >> ⎭ ⎩ 3 ⎭ ⎩ 3 ⎭ >> >> Thanks for this. I will continue Harsh's work and then we can compare > these results with that of a heuristic implementation. > Would this be a decent enough approach ? >
You can also have a look at Aaron's suggestion: https://github.com/sympy/sympy/pull/9500/files#r39220151 > >>> - >>> >>> More general set to native type converters, they include Bool to Set >>> and Set to Bool conversion for multidimensional sets and bools. >>> >>> I read that we already have Boolean to Set converters in SymPy but I >>> am not able to find them. >>> >>> as_relational and as_set functions are implemented. >> >> In [18]: bool = Interval(3, 5).as_relational(x) >> >> In [19]: bool >> Out[19]: 3 ≤ x ∧ x ≤ 5 >> >> In [20]: bool.as_set() >> Out[20]: [3, 5] >> >> > Thanks. I must have overlooked it. > Should we not extend this functionality to ProductSet and Boolean class > objects respectively ? > > ------------------- > Kshitij Saraogi > -- 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 https://groups.google.com/group/sympy. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/c99ae45b-0344-4140-ab5a-4df612f1af74%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
