Skip to content

leslieDLcy/kaucher_pbox

Repository files navigation

Kaucher intervals

Python Library for generalized interval arithmetic.

An interval arithmetic that allows inverted intervals $[a, b]$ where $a$ can be smaller than, equal to, or larger than $b$. Such intervals are variously called:

  • Kaucher intervals,
  • generalized intervals,
  • directed intervals
  • modal intervals.

The library implements a few unary and binary functions, print-time outward- and inward-directed rounding. In contrast, the KaucherPy library by Maraschin et al. does not implement trigonometric functions, and it handles rounding incorrectly.

Roadmap

See kboxes.py for the library codes of Kaucher based on generalised Kaucher intervals. Several Jupyter notebooks files stored in the example directory illustrates features one certain topic per file. Examples include:

Installation

The library can be installed locally in the development mode as it has not been registered in PyPI yet.

$ pip install kaucher -e .

Usage

from kaucher import Kaucher as K
import kaucher as k

# backcalculation
A = K(4, 5)
C = K(10, 15)
B = C - A.dual()

# envelope
k.env(K(3, 1), K(2, 4), K(0, 7))

# imposition
k.imp(K(3, 1), K(2, 4))

License

kaucher_pbox was created by Scott Ferson and maintained by Leslie Yu Chen. It is licensed under the terms of the MIT license.

About

Python Library for generalized interval arithmetic

Resources

License

Contributing

Stars

Watchers

Forks