├── autobound
├── example_bounds.png
├── __init__.py
├── jax
│ ├── __init__.py
│ ├── jaxpr_editor_test.py
│ ├── jaxpr_editor.py
│ ├── jax_bound_test.py
│ └── jax_bound.py
├── types_test.py
├── graph_editor_test.py
├── test_utils.py
├── polynomials_test.py
├── graph_editor.py
├── polynomials.py
├── interval_arithmetic_test.py
├── enclosure_arithmetic_test.py
├── primitive_enclosures.py
├── elementwise_functions_test.py
├── elementwise_functions.py
├── interval_arithmetic.py
└── enclosure_arithmetic.py
├── .gitignore
├── CONTRIBUTING.md
├── .github
└── workflows
│ └── ci-build.yaml
├── pyproject.toml
├── README.md
├── LICENSE
└── .pylintrc
/autobound/example_bounds.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dpsanders/autobound/main/autobound/example_bounds.png
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Compiled python modules.
2 | *.pyc
3 |
4 | # Byte-compiled
5 | _pycache__/
6 | .cache/
7 |
8 | # Poetry, setuptools, PyPI distribution artifacts.
9 | /*.egg-info
10 | .eggs/
11 | build/
12 | dist/
13 | poetry.lock
14 |
15 | # Tests
16 | .pytest_cache/
17 |
18 | # Type checking
19 | .pytype/
20 |
21 | # Other
22 | *.DS_Store
23 |
24 | # PyCharm
25 | .idea
26 |
--------------------------------------------------------------------------------
/autobound/__init__.py:
--------------------------------------------------------------------------------
1 | # Copyright 2023 The autobound Authors.
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 |
15 | __version__ = "0.1.2"
16 |
--------------------------------------------------------------------------------
/autobound/jax/__init__.py:
--------------------------------------------------------------------------------
1 | # Copyright 2023 The autobound Authors.
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 |
15 | """Package for computing Taylor polynomial enclosures in JAX."""
16 |
17 | from autobound.jax.jax_bound import taylor_bounds
18 |
--------------------------------------------------------------------------------
/autobound/types_test.py:
--------------------------------------------------------------------------------
1 | # Copyright 2023 The autobound Authors.
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 |
15 | from absl.testing import absltest
16 | from autobound import test_utils
17 | from autobound import types
18 |
19 |
20 | class TestCase(test_utils.TestCase):
21 |
22 | def test_ndarray(self):
23 | for np_like in self.backends:
24 | self.assertIsInstance(np_like.eye(3), types.NDArray)
25 |
26 | def test_numpy_like(self):
27 | for np_like in self.backends:
28 | self.assertIsInstance(np_like, types.NumpyLike)
29 |
30 |
31 | if __name__ == '__main__':
32 | absltest.main()
33 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # How to Contribute
2 |
3 | We'd love to accept your patches and contributions to this project. There are
4 | just a few small guidelines you need to follow.
5 |
6 | ## Contributor License Agreement
7 |
8 | Contributions to this project must be accompanied by a Contributor License
9 | Agreement (CLA). You (or your employer) retain the copyright to your
10 | contribution; this simply gives us permission to use and redistribute your
11 | contributions as part of the project. Head over to
12 |
17 |