Ranjith Kumar Engineer in the making

Improve Sets Module Part II

Last week’s PR #1281 on Complement, set_intersection and set_complement got merged in. This week, I implemented ConditionSet and ImageSet. This work is done in #1291 for ConditionSet and #1293 for ImageSet.

ConditionSet :
It is useful to represent unsolved equations or a partially solved equation.

class ConditionSet : public Set
{
private:
    vec_sym syms_;
    RCP<const Boolean> condition_;
...
}

Earlier, I used another data member for storing the base set. Thanks to isuruf, I was able to merge it within condition_.
For implementing contains method for ConditionSet, I added Subs Visitor for Contains and And.

ImageSet :
It is a Set representation of a mathematical function defined on symbols over some set. For example, x**2 for all x in [0,2] is represented as imageset({x},x**2,[0,2]).

When is ImageSet useful ?
Say, I need to solve a trignometric equation sin(x) = 1. Solution is 2*n*pi+pi/2, n belongs to [0,oo). for such solutions imageset is a useful representation to have.

I will try to get these two PRs merged in ASAP.
Next week, I will be working on implementing solvers for lower degree(<=4) polynomials.

See you next time. Bye for now !