Default CtcInter specialization for box contractors.
More...
#include <codac2_CtcInter.h>
|
| | CtcInter (Index n) |
| | Builds a neutral intersection contractor with a prescribed domain size.
|
| size_t | nb () const |
| | Returns the number of stored contractors.
|
| void | contract (X &... x) const |
| | Contracts the given domain(s) by applying all stored contractors in sequence.
|
| CtcInter< X... > & | operator&= (const C &c) |
| | Appends a contractor to the current intersection.
|
| | CtcInter (Index n) |
| | Builds a neutral intersection contractor with a prescribed domain size.
|
| size_t | nb () const |
| | Returns the number of stored contractors.
|
| void | contract (X &... x) const |
| | Contracts the given domain(s) by applying all stored contractors in sequence.
|
| CtcInter< X... > & | operator&= (const C &c) |
| | Appends a contractor to the current intersection.
|
|
|
Collection< CtcBase< X... > > | _ctcs |
| | Internal collection of contractors composing the intersection.
|
|
Collection< CtcBase< X... > > | _ctcs |
| | Internal collection of contractors composing the intersection.
|
Default CtcInter specialization for box contractors.
CtcInter<> is an alias-like specialization inheriting from CtcInter<IntervalVector>.
◆ CtcInter()
Builds a neutral intersection contractor with a prescribed domain size.
This constructor is mainly useful when building a contractor incrementally with operator&=. Otherwise it has no effect.
- Parameters
-
| n | Dimension of the contracted object. |
- Note
- When X... is Interval, the size must be 1.
70 {
72 {
74 }
75 }
Sequential intersection of several contractors:
Definition codac2_CtcInter.h:55
CtcInter(Index n)
Definition codac2_CtcInter.h:68
◆ nb()
Returns the number of stored contractors.
- Returns
- Size of the internal contractor collection.
113 {
115 }
Collection< CtcBase< X... > > _ctcs
Definition codac2_CtcInter.h:157
◆ contract()
Contracts the given domain(s) by applying all stored contractors in sequence.
The domains are updated in place. If one contractor empties one of the domains, the remaining contractors are not evaluated.
- Parameters
-
126 {
128 {
130 if((
x.is_empty() | ...))
131 return;
132 }
133 }
void contract(X &... x) const
Contracts the given domain(s) by applying all stored contractors in sequence.
Definition codac2_CtcInter.h:125
◆ operator&=()
Appends a contractor to the current intersection.
The contractor is added at the end of the internal sequence, so it will be applied after the already stored ones.
- Template Parameters
-
| C | Type of the contractor or contractor pointer. |
- Parameters
-
- Returns
- A reference to *this.
148 {
151 return *this;
152 }
The documentation for this class was generated from the following file: