| 8 | ''' |
| 9 | Reals sets consisting of union of real intervals and isolated points.''' |
| 10 | |
| 11 | This is based of previous work available from http://www.mail-archive.com/sage-support@googlegroups.com/msg21326.html |
| 12 | but supporting now integration on real intervals and real sets. |
| 13 | |
| 14 | - Laurent Claessens (2010-12-10): Original Interval and ContinuousSet from 'http://www.mail-archive.com/sage-support@googlegroups.com/msg21326.html'. |
| 15 | Defined a class Interval that represents an interval (can be open, closed, half open, unbounded), and implements union() and intersection() methods, as well |
| 16 | as the __contains__() method that tests if a number is contained in the interval. Also defined the class ContinuousSet that represents finite union and |
| 17 | intersections of intervals by a list of disjoint intervals. For the class ContinuousSet, union() and __contain__() methods are implemented. |
| 18 | |
| 19 | - Ares Ribo (2011-10-24): Extended the previous work defining the class RealSet, that describes any real set as a list of disjoint intervals and a list of |
| 20 | isolated points. For this class, we implemented the intersection() ( union() and __contain__() as for ContinuousSets). We implemented the function 'subsets' |
| 21 | which given two different real sets A and B returns if A is a (proper) subset of B, and the function 'setdiff' that returns the difference of two given real |
| 22 | sets. Also we support definite integration over a RealSet, and we implemented the infimum and the supremum of a RealSet. We define the class RInterval of |
| 23 | real intervals. A RInterval is now a RealSet, consituted as a list of disjoint intervals with a unique element and an empty list of isolated points. |
| 24 | |
| 25 | - Jordi Saludes (2011-12-10): Documentation and file reorganization. Reimplementation of 'setdiff'. RInterval is now always an open interval. The boundary/ies |
| 26 | can be added as isolated point/s if necessary, constituting a RealSet. |
| 27 | |
| 28 | The research leading to these results has received funding from the European Union's Seventh Framework Programme (FP7/2007-2013) under grant agreement |
| 29 | n° FP7-ICT-247914. |
| 30 | |
| 31 | Examples |
| 32 | {{{ |
| 33 | sage: A = RealSet([RInterval((1,2)),RInterval((3,4))],[1,2]) |
| 34 | |
| 35 | sage: A |
| 36 | [ 1 :: 2 ] + ] 3 :: 4 [ |
| 37 | |
| 38 | sage: B = RealSet([RInterval((2,3))],[1]) |
| 39 | |
| 40 | sage: B |
| 41 | ] 2 :: 3 [ + {1} |
| 42 | }}} |
| 43 | |