Skip to content

Commit d3ce3e9

Browse files
authored
Merge branch 'codac-team:codac2_dev' into codac2_dev
2 parents 2c07462 + c6cba91 commit d3ce3e9

54 files changed

Lines changed: 2937 additions & 231 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎doc/manual/index.rst‎

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -214,11 +214,15 @@ User manual
214214
* The class SetMembershipFunction
215215
* Extension to custom expressions
216216

217-
* :ref:`sec-domains-tubes`
218-
* :ref:`sec-domains-tubes-tdomain`
219-
* :ref:`sec-domains-tubes-slicedtube`
220-
* The Trajectory classes
221-
* Increasing performances using views
217+
* :ref:`sec-tubes-trajectories`
218+
* :ref:`sec-trajectories-sampledtraj`
219+
* :ref:`sec-trajectories-analytictraj`
220+
* :ref:`sec-trajectories-operations`
221+
* :ref:`sec-trajectories-io`
222+
* :ref:`sec-tubes-tdomain`
223+
* :ref:`sec-tubes-slice`
224+
* :ref:`sec-tubes-slicedtube`
225+
* :ref:`sec-tubes-examples`
222226

223227
* Contractors
224228
* What are contractors?
@@ -354,7 +358,7 @@ User manual
354358
* Related papers
355359
* Contributors
356360
* How to cite Codac
357-
:ref:`sec-ref-codac-logos`
361+
* :ref:`sec-ref-codac-logos`
358362

359363

360364
How-to guides

‎doc/manual/manual/cn/index.rst‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Contractor Networks
2+
===================
3+
4+
.. toctree::
5+
6+
What is a CN? <http://codac.io>
7+
The ContractorNetwork class <http://codac.io>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Basic contractors
2+
=================
3+
4+
.. toctree::
5+
6+
CtcIdentity <http://codac.io>
7+
CtcEmpty <http://codac.io>
8+
CtcLazy <http://codac.io>
9+
CtcFixpoint <http://codac.io>

‎doc/manual/manual/contractors/index.rst‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.. _sec-ctc:
2+
23
Contractors, separators
34
=======================
45

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Linear contractors
2+
==================
3+
4+
.. toctree::
5+
6+
CtcGaussElim <http://codac.io>
7+
CtcGaussSeidel <http://codac.io>
8+
CtcLinearPrecond <http://codac.io>
Lines changed: 188 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,188 @@
1+
.. _sec-ctc-set-ctcunion:
2+
.. _sec-sep-set-sepunion:
3+
4+
Union: CtcUnion and SepUnion
5+
============================
6+
7+
Main author: `Simon Rohou <https://www.simon-rohou.fr/research/>`_
8+
9+
10+
``CtcUnion`` and ``SepUnion`` implement the logical union/disjunction counterpart of
11+
``CtcInter`` and ``SepInter``:
12+
13+
.. list-table::
14+
:header-rows: 1
15+
:widths: 20 35 45
16+
17+
* - Class
18+
- Combines
19+
- Meaning
20+
* - ``CtcUnion``
21+
- contractors
22+
- disjunction of constraints, obtained by joining the contracted branches
23+
* - ``SepUnion``
24+
- separators
25+
- separator associated with the union of the represented sets
26+
27+
Both classes can be constructed explicitly or with the ``|`` operator.
28+
29+
30+
CtcUnion: disjunction of contractors
31+
------------------------------------
32+
33+
For box contractors, ``CtcUnion`` applies every stored contractor independently to the
34+
same input box and returns a box enclosing the union of the resulting branches:
35+
36+
.. math::
37+
38+
\mathcal{C}_{\mathrm{union}}([\mathbf{x}])
39+
=
40+
\operatorname{hull}\!\left(
41+
\bigcup_{i=1}^{n}\mathcal{C}_i([\mathbf{x}])
42+
\right),
43+
44+
where :math:`\operatorname{hull}` denotes the smallest box containing the union.
45+
46+
This evaluation differs from ``CtcInter``: the branches are **not** applied
47+
sequentially. Each contractor receives the original input domain.
48+
49+
.. note::
50+
51+
The exact union of several boxes is generally not a box. ``CtcUnion`` therefore
52+
returns a box enclosure of this union. This enclosure may contain points that do not
53+
belong to any individual branch.
54+
55+
The usual construction uses ``|`` or the ``CtcUnion`` constructor.
56+
57+
.. tabs::
58+
59+
.. group-tab:: Python
60+
61+
.. literalinclude:: src.py
62+
:language: py
63+
:start-after: [union-ctc-1-beg]
64+
:end-before: [union-ctc-1-end]
65+
:dedent: 4
66+
67+
.. group-tab:: C++
68+
69+
.. literalinclude:: src.cpp
70+
:language: c++
71+
:start-after: [union-ctc-1-beg]
72+
:end-before: [union-ctc-1-end]
73+
:dedent: 2
74+
75+
Applying it to a box gives the hull of the contracted branches:
76+
77+
.. tabs::
78+
79+
.. group-tab:: Python
80+
81+
.. literalinclude:: src.py
82+
:language: py
83+
:start-after: [union-ctc-2-beg]
84+
:end-before: [union-ctc-2-end]
85+
:dedent: 4
86+
87+
.. group-tab:: C++
88+
89+
.. literalinclude:: src.cpp
90+
:language: c++
91+
:start-after: [union-ctc-2-beg]
92+
:end-before: [union-ctc-2-end]
93+
:dedent: 2
94+
95+
For the two boxes used here, the exact union is not itself a box. Its interval hull is
96+
97+
.. math::
98+
99+
[-12,10]\times[-2,4].
100+
101+
102+
SepUnion: union of represented sets
103+
-----------------------------------
104+
105+
``SepUnion`` is the separator counterpart. If separators
106+
:math:`\mathcal{S}_1,\ldots,\mathcal{S}_n` are associated with sets
107+
:math:`\mathbb{S}_1,\ldots,\mathbb{S}_n`, then ``SepUnion`` is associated with
108+
109+
.. math::
110+
111+
\mathbb{S}_{\mathrm{union}}
112+
=
113+
\mathbb{S}_1 \cup \cdots \cup \mathbb{S}_n.
114+
115+
Construction follows the same syntax as for ``CtcUnion``:
116+
117+
.. tabs::
118+
119+
.. group-tab:: Python
120+
121+
.. literalinclude:: src.py
122+
:language: py
123+
:start-after: [union-sep-1-beg]
124+
:end-before: [union-sep-1-end]
125+
:dedent: 4
126+
127+
.. group-tab:: C++
128+
129+
.. literalinclude:: src.cpp
130+
:language: c++
131+
:start-after: [union-sep-1-beg]
132+
:end-before: [union-sep-1-end]
133+
:dedent: 2
134+
135+
136+
Building a union incrementally
137+
------------------------------
138+
139+
Both classes support ``|=`` and ``nb()``.
140+
141+
For ``CtcUnion``, a union may be created from the dimension only. Before a branch is
142+
added, it represents the empty disjunction: contracting a box with it returns the empty
143+
domain. Adding contractors with ``|=`` then builds the disjunction incrementally.
144+
145+
.. tabs::
146+
147+
.. group-tab:: Python
148+
149+
.. literalinclude:: src.py
150+
:language: py
151+
:start-after: [union-ctc-3-beg]
152+
:end-before: [union-ctc-3-end]
153+
:dedent: 4
154+
155+
.. group-tab:: C++
156+
157+
.. literalinclude:: src.cpp
158+
:language: c++
159+
:start-after: [union-ctc-3-beg]
160+
:end-before: [union-ctc-3-end]
161+
:dedent: 2
162+
163+
``SepUnion`` currently has no constructor taking only a dimension, so incremental
164+
construction starts from an existing separator:
165+
166+
.. tabs::
167+
168+
.. group-tab:: Python
169+
170+
.. literalinclude:: src.py
171+
:language: py
172+
:start-after: [union-sep-2-beg]
173+
:end-before: [union-sep-2-end]
174+
:dedent: 4
175+
176+
.. group-tab:: C++
177+
178+
.. literalinclude:: src.cpp
179+
:language: c++
180+
:start-after: [union-sep-2-beg]
181+
:end-before: [union-sep-2-end]
182+
:dedent: 2
183+
184+
185+
.. admonition:: Technical documentation
186+
187+
See the `C++ API documentation of CtcUnion <../../api/html/classcodac2_1_1_ctc_union.html>`_
188+
and the `C++ API documentation of SepUnion <../../api/html/classcodac2_1_1_sep_union.html>`_.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Temporal contractors
2+
====================
3+
4+
.. toctree::
5+
6+
Using static contractors on tubes <http://codac.io>
7+
CtcDeriv <http://codac.io>
8+
CtcEval <http://codac.io>
9+
CtcDelay <http://codac.io>
10+
CtcLinobs <http://codac.io>
11+
CtcLohner <http://codac.io>
12+
CtcPicard <http://codac.io>
13+
CtcChain <http://codac.io>
14+
CtcDiffInclusion <http://codac.io>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Interface with the IBEX library
2+
===============================
3+
4+
.. toctree::
5+
6+
Installing the codac-ibex extension <http://codac.io>
7+
How to use <http://codac.io>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Unsupported features of Codac
2+
=============================
3+
4+
.. toctree::
5+
6+
Installing the codac-unsupported extension <http://codac.io>

‎doc/manual/manual/functions/analytic/analytic_operators.rst‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,8 @@ Temporal operations for involving trajectories or tubes in analytic expressions
350350
);
351351

352352

353+
For a detailed example using ``SampledTraj.as_function()`` and information on pointwise ``AnalyticFunction.traj_eval(...)``, see :ref:`sec-trajectories-operations`.
354+
353355
Direct use of operators
354356
^^^^^^^^^^^^^^^^^^^^^^^
355357

0 commit comments

Comments
 (0)