2020-12-27 10:46:27 UTC: > > As part of my final project in my computer science degree I would like > to develop a class for linear inequalities simplifying. The class's main > algorithm is that for given a set of linear inequalities in m variables, > it returns a simplified set. "Simplified" may mean an equivalent set with > a smallest number of inequalities. As an example, given the inequalities: > > x+y≥1 > x+y≤0 > > the algorithm should return the empty set.
I guess in this case it should rather return the set containing the single condition 0 > 1 (or 0 == 1) since there is no solution, while an empty set of constraints allows all values of x and y. > Given the inequalities: > > x+y≥1 > 2x+2y≥3 > > the algorithm should return e.g. > > 2x+2y≥3 > > The class will also implement operator overloading for + > (adding one set to another) and – (removing a subset > from original set) and more. Note that the solutions to a set of linear inequalities form a polytope; each inequality describes a half-space; taking the union of two sets of constraints corresponds to taking the intersection of the polytopes they describe. > For this project to work I need to fully understand the implemented > inequality classes in SymPy which are in sympy.core.relational, > so I would know how to manipulate SymPy's inequalities. > > The problem is that when I am trying to go through the code of those > classes I get lost. There are so many subclasses there and every > subclass is inheriting from some other base class. > > Is there a way to see a class diagram of those classes so it would be > more clear what the purpose of each class is? Does anyone have > another idea for understanding those classes? -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/sympy/80021f7c-d9c9-4c84-8f20-bb9d45e1103en%40googlegroups.com.
