Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
c5184b5
Merge branch 'codac2_dev' of github.com:codac-team/codac into codac2_…
godardma Oct 22, 2025
539b1cf
Merge branch 'codac2_codac4matlab' of github.com:codac-team/codac int…
godardma Jan 14, 2026
54576ce
[tuto] working lessonA for matlab
godardma Jan 15, 2026
ec7b4ff
Merge branch 'codac2_codac4matlab' of github.com:codac-team/codac int…
godardma Jan 19, 2026
0172bb9
Merge branch 'codac2_codac4matlab' of github.com:codac-team/codac int…
godardma Feb 3, 2026
7f9594a
Merge branch 'codac2_codac4matlab' of github.com:codac-team/codac int…
godardma Feb 12, 2026
cb688fb
Add Raspbian Trixie armv6hf support
lebarsfa Jan 20, 2026
e585cdc
Update workflows
lebarsfa Feb 20, 2026
843827f
[doc] fixed capd doc organization (peibos_capd not displayed)
godardma Apr 19, 2026
2af34c2
Merge branch 'codac2_dev' of github.com:codac-team/codac into codac2_dev
godardma Apr 19, 2026
966b8d8
python -m unittest discover codac.tests seems to need numpy and sympy
lebarsfa Apr 18, 2026
05ec0e4
sphinx_togglebutton necessary for the manual
lebarsfa Apr 18, 2026
5a26b4e
Add the same link to VIBes documentation when it is mentioned
lebarsfa Apr 18, 2026
9134ffe
Mention BUILD_TESTS=ON for the unit tests to work
lebarsfa Apr 18, 2026
0f5dcb4
Version updates and other updates in the documentation
lebarsfa Apr 18, 2026
71d433e
Linux vs Ubuntu specificities in the manual
lebarsfa Apr 18, 2026
cc8d51e
sphinx-common and dot command from Graphviz appear to be necessary to…
lebarsfa Apr 18, 2026
880b4b0
Update test_codac
lebarsfa Apr 19, 2026
b0952f5
Merge pull request #374 from lebarsfa/PR-doc
SimonRohou Apr 19, 2026
d363a68
Merge pull request #373 from godardma/codac2_dev
SimonRohou Apr 19, 2026
66c661a
Merge branch 'codac2' of ssh://github.com/codac-team/codac into codac…
SimonRohou Apr 19, 2026
6ad0c00
Merge branch 'codac2_dev' of github.com:codac-team/codac into codac2_dev
SimonRohou Apr 19, 2026
54879f5
[doc] minor update
godardma Apr 20, 2026
f6ba595
Merge pull request #375 from godardma/codac2_dev
SimonRohou Apr 20, 2026
8e9991f
[doc] disabled generation of dot schemes in API files
SimonRohou Apr 20, 2026
7b6ba3a
[intv] added < and > operators + binding + doc + tests
SimonRohou Apr 20, 2026
06298c4
Merge branch 'codac2_dev' of ssh://github.com/codac-team/codac into c…
SimonRohou Apr 20, 2026
cce8958
[doc] updated changelog
godardma Apr 21, 2026
8795cf1
[doc] early doc for threads
godardma Apr 21, 2026
475ad63
Merge branch 'codac2_codac4matlab' of github.com:codac-team/codac int…
godardma Apr 21, 2026
312cd79
[doc] doc for multi-thread
godardma Apr 21, 2026
6c31b66
Merge branch 'codac2_dev' of github.com:codac-team/codac into codac2_dev
godardma Apr 21, 2026
ce81946
Merge pull request #376 from godardma/codac2_dev
SimonRohou Apr 27, 2026
710a154
Bugfix for IntFullPivLU::solve when called with rectangular matrices …
damien-masse Apr 27, 2026
fa00923
[tests] Bugfix for IntFullPivLU::solve: added tests
SimonRohou Apr 27, 2026
f61e8d1
[zonotope] added operator+ and renamed center c
godardma Apr 27, 2026
53a38d8
Merge pull request #378 from damien-masse/codac2_dev
SimonRohou Apr 27, 2026
ea8198c
Merge branch 'codac2_dev' of github.com:codac-team/codac into codac2_dev
godardma Apr 28, 2026
f815210
[graphics] possibility to choose origin for axes
godardma Apr 30, 2026
8a68ae8
[graphics] patch for python bindings
godardma May 4, 2026
0031132
[graphics] patch for python bindings
godardma May 6, 2026
d221c85
[graphics] completed 3D graphic example
godardma May 6, 2026
1860083
[ctc] Adding CtcParallelepiped with tests and doc
godardma May 6, 2026
64a4d66
[doc] correcting source file
godardma May 7, 2026
8c7b17e
[ctc] CtcParallepiped is now CtcWrapper<Parallelepipd>, adding empty …
godardma May 11, 2026
8abf291
[doc] correcting source file
godardma May 11, 2026
974ee29
Merge pull request #379 from godardma/codac2_dev
SimonRohou May 12, 2026
82fd8a3
[sep] added SepPolarCart + binding
SimonRohou Jun 3, 2026
15d8f4b
Merge pull request #381 from SimonRohou/codac2_dev
SimonRohou Jun 3, 2026
ae6b15a
Merge branch 'codac2' of github.com:codac-team/codac into codac2_coda…
godardma Jul 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/dockercentos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- { img: 'lebarsfa/manylinux_2_28_aarch64-for-codac', os: ubuntu-24.04-arm, shell: bash, arch: aarch64, bitness: 64, runtime: manylinux_2_28, docker_flags: '--platform linux/arm64', desc: 'CentOS manylinux_2_28 aarch64' }
name: ${{ matrix.cfg.desc }}
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
with:
submodules: true
fetch-depth: 0
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/dockermatrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
#- { img: 'lebarsfa/pi-64:focal-for-codac' , os: ubuntu-24.04-arm, shell: bash, arch: arm64 , bitness: 64, runtime: focal , cmake_flags: '-fPIC', deb: true, desc: 'Ubuntu 20.04 arm64' }
- { img: 'lebarsfa/amd64:trixie-for-codac' , os: ubuntu-latest , shell: bash, arch: amd64 , bitness: 64, runtime: trixie , cmake_flags: '-fPIC', deb: true, desc: 'Debian Trixie amd64' }
- { img: 'lebarsfa/pi-64:trixie-for-codac' , os: ubuntu-24.04-arm, shell: bash, arch: arm64 , bitness: 64, runtime: trixie , cmake_flags: '-fPIC', deb: true, desc: 'Debian Trixie arm64' }
#- { img: 'lebarsfa/pi:trixie-for-codac' , os: ubuntu-24.04-arm, shell: bash, arch: armhf , bitness: 32, runtime: trixie , cmake_flags: '-fPIC', deb: true, desc: 'Raspbian Trixie armv6hf' } # No base image available...
- { img: 'lebarsfa/pi:trixie-for-codac' , os: ubuntu-24.04-arm, shell: bash, arch: armhf , bitness: 32, runtime: trixie , cmake_flags: '-fPIC', deb: true, desc: 'Raspbian Trixie armv6hf' }
- { img: 'lebarsfa/amd64:bookworm-for-codac' , os: ubuntu-latest , shell: bash, arch: amd64 , bitness: 64, runtime: bookworm , cmake_flags: '-fPIC', deb: true, desc: 'Debian Bookworm amd64' }
- { img: 'lebarsfa/pi-64:bookworm-for-codac' , os: ubuntu-24.04-arm, shell: bash, arch: arm64 , bitness: 64, runtime: bookworm , cmake_flags: '-fPIC', deb: true, desc: 'Debian Bookworm arm64' }
- { img: 'lebarsfa/pi:bookworm-for-codac' , os: ubuntu-24.04-arm, shell: bash, arch: armhf , bitness: 32, runtime: bookworm , cmake_flags: '-fPIC', deb: true, desc: 'Raspbian Bookworm armv6hf' }
Expand All @@ -42,7 +42,7 @@ jobs:
#- { img: 'lebarsfa/pi:buster-for-codac' , os: ubuntu-24.04-arm, shell: bash, arch: armhf , bitness: 32, runtime: buster , cmake_flags: '-fPIC', deb: true, desc: 'Raspbian Buster armv6hf' }
name: ${{ matrix.cfg.desc }}
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
with:
submodules: true
fetch-depth: 0
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/macosmatrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- { os: macos-15-intel , shell: bash, arch: x86_64 , runtime: sequoia , cmake_flags: '-fPIC', trgt: '10.16', cpcfg: '-macosx_10_16_x86_64', py_v_maj: 3, py_v_min: 8 , desc: 'macOS Sequoia Python 3.8 x86_64' }
name: ${{ matrix.cfg.desc }}
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
with:
submodules: true
fetch-depth: 0
Expand All @@ -54,7 +54,7 @@ jobs:
# if: runner.os=='macOS'
- run: brew install catch2 # Issues with binary packages when cross-compiling...
if: (runner.os=='macOS')&&(matrix.cfg.cross!=true)
- run: brew install graphviz ; brew install --formula doxygen ; python -m pip install --upgrade pip ; pip install --upgrade wheel setuptools sphinx breathe sphinx_rtd_theme sphinx-tabs sphinx-issues sphinx-reredirects furo sphinx-math-dollar sympy
- run: brew install graphviz ; brew install --formula doxygen ; python -m pip install --upgrade pip ; pip install --upgrade wheel setuptools sphinx breathe sphinx_rtd_theme sphinx-tabs sphinx-issues sphinx-reredirects furo sphinx-math-dollar sphinx_togglebutton sympy
if: runner.os=='macOS'
- run: |
wget https://github.com/lebarsfa/ibex-lib/releases/download/ibex-2.8.9.20250626/ibex_${{ matrix.cfg.arch }}_${{ matrix.cfg.runtime }}.zip --no-check-certificate -nv
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- { os: ubuntu-22.04 , gcc_v: 11, py_v_maj: 3, py_v_min: 10, with_capd: ON , desc: 'Ubuntu 22.04 GCC 11 Python 3.10 CAPD tests' }
name: ${{ matrix.cfg.desc }}
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
with:
submodules: true
fetch-depth: 0
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/unixmatrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
if: (github.event_name!='pull_request')&&((github.ref_name=='codac1')||(github.ref_name=='codac2')||(github.ref_name=='codac2_codac4matlab'))
steps:
- uses: softprops/action-gh-release@v2
- uses: softprops/action-gh-release@v3
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -68,7 +68,7 @@ jobs:
- { os: macos-14 , shell: bash, arch: x86_64 , bitness: 64, runtime: sonoma , cmake_params: '-D CMAKE_SYSTEM_NAME=Darwin -D CMAKE_OSX_ARCHITECTURES=x86_64 -D CMAKE_OSX_DEPLOYMENT_TARGET=14.0', cmake_flags: '-fPIC', cross: true, desc: 'macOS Sonoma x86_64 (cross)' }
name: ${{ matrix.cfg.desc }}
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
with:
submodules: true
fetch-depth: 0
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/vcmatrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- { os: windows-2022 , shell: cmd , arch: x64 , runtime: vc17 , cmake_params: '-G "Visual Studio 17" -T v143 -A x64' , cpcfg: '-win_amd64', py_v_maj: 3, py_v_min: 8 , desc: 'Windows Visual Studio 2022 x64 Python 3.8' }
name: ${{ matrix.cfg.desc }}
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
with:
submodules: true
fetch-depth: 0
Expand All @@ -56,7 +56,7 @@ jobs:
if: runner.os=='Windows'
#- run: choco install -y -r --no-progress eigen --version=3.4.0.20240224 ${{ matrix.cfg.choco_flags }}
# if: runner.os=='Windows'
- run: choco install -y -r --no-progress graphviz doxygen.install & python -m pip install --upgrade pip & pip install --upgrade wheel setuptools sphinx breathe sphinx-issues sphinx-tabs sphinx_rtd_theme sphinx-reredirects furo sphinx-math-dollar sympy
- run: choco install -y -r --no-progress graphviz doxygen.install & python -m pip install --upgrade pip & pip install --upgrade wheel setuptools sphinx breathe sphinx-issues sphinx-tabs sphinx_rtd_theme sphinx-reredirects furo sphinx-math-dollar sphinx_togglebutton sympy
if: runner.os=='Windows'
- run: |
wget https://github.com/lebarsfa/ibex-lib/releases/download/ibex-2.8.9.20250626/ibex.2.8.9.20250626.nupkg --no-check-certificate -nv
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ This list is in alphabetical order by surname.
- [Peter Franek](http://www.cs.cas.cz/~franek)
- [Maël Godard](https://godardma.github.io)
- [Nuwan Herath M.](https://members.loria.fr/NHerathMudiyanselage)
- [Luc Jaulin](https://www.ensta-bretagne.fr/jaulin)
- [Fabrice Le Bars](https://www.ensta-bretagne.fr/lebars)
- [Luc Jaulin](https://webperso.ensta.fr/jaulin)
- [Fabrice Le Bars](https://webperso.ensta.fr/lebars)
- [Morgan Louédec](https://morgan-louedec.fr)
- [Damien Massé](https://lab-sticc.univ-brest.fr/~dmasse)
- [Bertrand Neveu](http://imagine.enpc.fr/~neveub)
Expand All @@ -91,7 +91,7 @@ This list is in alphabetical order by surname.
- [Simon Rohou](http://simon-rohou.fr/research)
- [Joris Tillet](https://perso.ensta-paris.fr/~tillet/)
- [Gilles Trombettoni](https://www.lirmm.fr/~trombetton)
- [Christophe Viel](https://www.ensta-bretagne.fr/viel/)
- [Christophe Viel](https://webperso.ensta.fr/viel/)
- [Raphael Voges](https://raphael-voges.de)

We appreciate all contributions, whether they are code, documentation, bug reports, or suggestions. If you believe you should be listed here and are not, please contact us to update the list.
Expand Down
2 changes: 1 addition & 1 deletion doc/api/Doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -2502,7 +2502,7 @@ HIDE_UNDOC_RELATIONS = YES
# set to NO
# The default value is: NO.

HAVE_DOT = YES
HAVE_DOT = NO

# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed
# to run in parallel. When set to 0 doxygen will base this on the number of
Expand Down
23 changes: 19 additions & 4 deletions doc/manual/development/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,32 @@
Changelog
=========

Pull Request from godardma (17/04/26)
-------------------------------------
Upcoming version
****************

Pull Request #379 from godardma (27/04)
---------------------------------------

Commit 52b81c8 ([cmake] warning for Doxygen version)
----------------------------------------------------
``Zonotope`` and ``Parallelepiped`` center is now ``c`` instead of ``z`` to avoid ambiguity.

Version 2.0.2
*************

Commit ca1f6f4
--------------

set_axes change for Figure2D
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Since this PR, a bounding box can be passed to the set_axes method to specify the ranges of the x and y axes.
The old method with ``axis(id,Interval)`` still works

Version 2.0.0
*************

Commit 52b81c8 ([cmake] warning for Doxygen version)
----------------------------------------------------

Python binding build requirement
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand All @@ -24,6 +37,8 @@ If this version is not available, the API documentation will not be generated,
which may cause issues when building the Python binding from source.
This has no impact on the C++ build nor on downloading/installing the Python packages.

Pre-Release
***********

Pull Request from godardma (15/10)
----------------------------------
Expand Down
13 changes: 7 additions & 6 deletions doc/manual/development/info_dev.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ Building the Manual with Sphinx

To build this manual using Sphinx, follow these steps:

1. **Requirements**: Install `Sphinx <https://www.sphinx-doc.org/>`_ together with the extensions used by Codac, if they are not already installed.
1. **Requirements**: Install `Sphinx <https://www.sphinx-doc.org/>`_ together with the extensions used by Codac, if they are not already installed. You will need also the ``dot`` command from `Graphviz <https://graphviz.org/>`_.

.. code-block:: bash

sudo apt-get install sphinx-common graphviz
pip install sphinx sphinx_rtd_theme furo sphinx-math-dollar sphinx_tabs breathe sphinx_togglebutton

2. **Building the manual**: After configuring the CMake project, the manual can be build with:
Expand Down Expand Up @@ -41,8 +42,8 @@ If you simply want to use the latest Codac release in Python, you can download t

sudo apt-get install -y g++ gcc cmake git flex bison

- a supported version of Python (>=3.6).
- a recent `Doxygen <https://www.doxygen.nl>`_ version (for instance, release 1.13.0 or newest). On Linux systems, latest releases are not available as Debian packages, so we advice to install Doxygen from the sources:
- a supported version of Python (>=3.8).
- a recent `Doxygen <https://www.doxygen.nl>`_ version (for instance, release 1.16.1 or newest). On Linux systems, latest releases are not available as Debian packages, so we advise to install Doxygen from the sources:

.. code-block:: bash

Expand Down Expand Up @@ -95,12 +96,12 @@ If you simply want to use the latest Codac release in Python, you can download t

Note that you will then have to ``import codac2`` instead of ``import codac`` in your Python scripts.

In addition to the ``-fPIC`` options, you will have to configure ``WITH_PYTHON=ON`` and ``PYBIND11_FINDPYTHON=OFF``. Note that CMake will automatically get the `pybind11 <https://pybind11.readthedocs.io>`_ files required for the binding.
In addition to the ``-fPIC`` options, you will have to configure ``WITH_PYTHON=ON`` and ``PYBIND11_FINDPYTHON=OFF``. Note that CMake will automatically get the `pybind11 <https://pybind11.readthedocs.io>`_ files required for the binding. Also, you will have to configure ``BUILD_TESTS=ON`` if you want to run the unit tests.

.. code-block:: bash

mkdir build ; cd build
cmake -DCMAKE_CXX_FLAGS="-fPIC" -DCMAKE_C_FLAGS="-fPIC" -DWITH_PYTHON=ON -DPYBIND11_FINDPYTHON=OFF -DCMAKE_INSTALL_PREFIX=$HOME/codac/build_install -DCMAKE_PREFIX_PATH="$HOME/ibex-lib/build_install;$HOME/doxygen/build_install" -DCMAKE_BUILD_TYPE=Release ..
cmake -DCMAKE_CXX_FLAGS="-fPIC" -DCMAKE_C_FLAGS="-fPIC" -DWITH_PYTHON=ON -DPYBIND11_FINDPYTHON=OFF -DBUILD_TESTS=ON -DCMAKE_INSTALL_PREFIX=$HOME/codac/build_install -DCMAKE_PREFIX_PATH="$HOME/ibex-lib/build_install;$HOME/doxygen/build_install" -DCMAKE_BUILD_TYPE=Release ..
make ; make install

4. **Configure your Python environment**:
Expand Down Expand Up @@ -135,7 +136,7 @@ If you simply want to use the latest Codac release in Python, you can download t
cd $HOME/codac/examples/03_sivia
python main.py

Note that before executing the example, you will have to launch the VIBes viewer.
Note that before executing the example, you will have to launch the `VIBes viewer <../visualization/vibes.html>`_.
You should obtain a graphical output corresponding to a set inversion.


Expand Down
6 changes: 3 additions & 3 deletions doc/manual/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ User manual
* CtcCross / CtcNoCross
* Shape contractors
* CtcCtcBoundary
* CtcWrapper
* :ref:`sec-ctc-shape-ctcwrapper`
* CtcImage
* CtcDiscreteSet
* Temporal contractors
Expand Down Expand Up @@ -317,8 +317,8 @@ User manual
* :ref:`sec-zonotope`
* Polyhedron

* :ref:`sec-actions`
* :ref:`sec-actions-octasym`
* :ref:`sec-tools`
* :ref:`sec-tools-octasym`

* :ref:`sec-ellipsoids`
* :ref:`sec-ellipsoids-intro`
Expand Down
3 changes: 2 additions & 1 deletion doc/manual/manual/contractors/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Contractors, separators
CtcDist <geometric/ctcdist>
CtcPolar <geometric/ctcpolar>
CtcVisible <geometric/ctcvisible>
CtcWrapper <shape/ctcwrapper>

.. What are contractors? <http://codac.io>
.. The Ctc class <http://codac.io>
Expand Down Expand Up @@ -109,7 +110,7 @@ Overview of contractors and separators
* - ``CtcCtcBoundary``
- ``SepCtcBoundary``

* - ``CtcWrapper``
* - :ref:`CtcWrapper <sec-ctc-shape-ctcwrapper>`
- ``SepWrapper``

* - ``CtcImage``
Expand Down
40 changes: 40 additions & 0 deletions doc/manual/manual/contractors/shape/ctcwrapper.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
.. _sec-ctc-shape-ctcwrapper:

CtcWrapper
===============================

Main author: `Maël Godard <https://godardma.github.io/>`_

The CtcWrapper is a contractor to contract a box with respect to a set represented by a Codac object.
Currently supported objects are:

- :ref:`IntervalVector <sec-intervals-intervalvector-class>`
- :ref:`Parallelepiped <subsec-zonotope-parallelepiped>`
- PavingOut

Methods
-------

Below is an example of the use of the CtcWrapper with a Parallelepiped.

.. tabs::

.. group-tab:: Python

.. literalinclude:: src.py
:language: py
:start-after: [ctcparallelepiped-1-beg]
:end-before: [ctcparallelepiped-1-end]
:dedent: 4

.. group-tab:: C++

.. literalinclude:: src.cpp
:language: c++
:start-after: [ctcparallelepiped-1-beg]
:end-before: [ctcparallelepiped-1-end]
:dedent: 4

.. admonition:: Technical documentation

See the `C++ API documentation of this class <../../api/html/classcodac2_1_1_ctc_wrapper.html>`_.
9 changes: 9 additions & 0 deletions doc/manual/manual/contractors/shape/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Geometric contractors
=====================

.. toctree::

CtcCtcBoundary <http://codac.io>
ctcwrapper.rst
CtcImage <http://codac.io>
CtcDiscreteSet <http://codac.io>
32 changes: 32 additions & 0 deletions doc/manual/manual/contractors/shape/src.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/**
* Codac tests
* ----------------------------------------------------------------------------
* \date 2026
* \author Maël Godard
* \copyright Copyright 2024 Codac Team
* \license GNU Lesser General Public License (LGPL)
*/

#include <catch2/catch_test_macros.hpp>
#include <codac2_CtcWrapper.h>
#include <codac2_Approx.h>

#include <codac2_Figure2D.h>

using namespace std;
using namespace codac2;

TEST_CASE("CtcWrapper - Parallelepiped - manual")
{
{
// [ctcparallelepiped-1-beg]
IntervalVector x ({{0,5}, {0,5}});
Parallelepiped p (Vector({1.5,2.8}), Matrix({{0.5,0.4},{0,0.2}}));
CtcWrapper c(p);
c.contract(x);
// x = [ [0.599999, 2.40001] ; [2.59999, 3] ]
// [ctcparallelepiped-1-end]

CHECK(Approx(x) == IntervalVector({{0.6, 2.4}, {2.6, 3}}));
}
}
30 changes: 30 additions & 0 deletions doc/manual/manual/contractors/shape/src.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/usr/bin/env python

# Codac tests
# ----------------------------------------------------------------------------
# \date 2026
# \author Maël Godard
# \copyright Copyright 2024 Codac Team
# \license GNU Lesser General Public License (LGPL)

import sys, os
import unittest
import math
from codac import *

class TestCtcShapeManual(unittest.TestCase):

def tests_CtcWrapper_Parallelepiped_manual(test):

# [ctcparallelepiped-1-beg]
x = IntervalVector([[0,5], [0,5]])
p = Parallelepiped(Vector([1.5,2.8]), Matrix([[0.5,0.4],[0,0.2]]))
c = CtcWrapper_Parallelepiped(p)
x = c.contract(x)
# x = [ [0.599999, 2.40001] ; [2.59999, 3] ]
# [ctcparallelepiped-1-end]

test.assertTrue(Approx(x) == IntervalVector([[0.6, 2.4], [2.6, 3]]))

if __name__ == '__main__':
unittest.main()
Loading
Loading