codac 2.0.0
Loading...
Searching...
No Matches
codac2_SepQInter.h
Go to the documentation of this file.
1
9
10#pragma once
11
12#include <type_traits>
13#include "codac2_Sep.h"
14#include "codac2_Collection.h"
15#include "codac2_SepWrapper.h"
16
17namespace codac2
18{
19 class SepQInter : public Sep<SepQInter>
20 {
21 public:
22
23 explicit SepQInter(unsigned int q, Index n, const Collection<SepBase>& sep = {})
24 : Sep<SepQInter>(n), _q(q), _seps(sep)
25 {
26 assert_release(n > 0);
27 }
28
29 template<typename S>
30 requires (IsSepBaseOrPtr<S> && !std::is_same_v<SepQInter,S>)
31 SepQInter(unsigned int q, const S& s)
32 : SepQInter(q, size_of(s), {s})
33 {
34 assert_release(q <= 1);
35 }
36
37 template<typename... S>
38 requires (IsSepBaseOrPtr<S> && ...)
39 SepQInter(unsigned int q, const S&... s)
40 : SepQInter(q, size_first_item(s...), {s...})
41 {
42 assert_release(all_same_size(s...));
43 assert_release(q <= sizeof...(s));
44 }
45
46 size_t nb() const;
47
48 BoxPair separate(const IntervalVector& x) const;
49
50 protected:
51
52 size_t _q;
53 Collection<SepBase> _seps;
54 };
55}
Definition codac2_OctaSym.h:21
Eigen::Matrix< Interval,-1, 1 > IntervalVector
Alias for a dynamic-size column vector of intervals.
Definition codac2_IntervalVector.h:25