Skip to content

A interval package for Python which deals with interval arithmetic

License

Notifications You must be signed in to change notification settings

intiocean/pyinter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

79b2e96 · Apr 14, 2020
Jul 13, 2015
Sep 9, 2015
Sep 9, 2015
Dec 12, 2013
Oct 18, 2013
May 11, 2014
May 14, 2019
May 11, 2013
Oct 12, 2013
Apr 3, 2020
Nov 17, 2013
May 14, 2019

Repository files navigation

Note: This library is no longer maintained

I recommend using the newer portion library instead

Pyinter

Latest Version Downloads per Week Release Build Status Release Test Coverage Github Issues

Pyinter is a small and simple library written in Python for performing interval and discontinous range arithmetic.

>>> pyinter.openclosed(1.1, 12)
(1.1, 12]
>>> discontinous_range = pyinter.IntervalSet([pyinter.closedopen(5, 10), pyinter.closed(22, 23)])
>>> discontinous_range
IntervalSet([5, 10), [22, 23])
>>> 7 in discontinous_range
True
>>> 10 in discontinous_range
False  # This isn't in the range as it is an open interval which doesn't include its end points

Features

  • interval objects which can be
    • unioned
    • intersected
    • easily constructed using helper functions: open, closed, openclosed and closedopen
  • interval sets which can be
    • unioned
    • intersected

Installation

To install Pyinter, simply:

$ pip install pyinter

Or, if you absolutely must:

$ easy_install pyinter

But I'm told you really shouldn't do that.

Documentation

Documentation is available at http://pyinter.readthedocs.org.

Contribute

Contributions or suggestions for improvements are welcome.

About

A interval package for Python which deals with interval arithmetic

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages