codac 2.0.0
Loading...
Searching...
No Matches
codac2_hull.h
1
9
10#pragma once
11
14#include "codac2_matrices.h"
15#include "codac2_Wrapper.h"
16
17namespace codac2
18{
19 template<typename X1,typename... X>
20 inline Wrapper<X1>::Domain hull(const X1& x1, const X&... x)
21 {
22 if constexpr(sizeof...(x) > 0)
23 return hull(x1) | hull(x...);
24 else
25 return x1.template cast<Interval>();
26 }
27
28 template<typename X>
29 inline Wrapper<X>::Domain hull(const std::list<X>& l)
30 {
31 if(l.empty())
32 {
33 typename Wrapper<X>::Domain e(1);
34 e.set_empty();
35 return e;
36 }
37
38 auto h = l.front().template cast<Interval>();
39 for(const auto& li : l)
40 h |= li;
41 return h;
42 }
43}
Definition codac2_OctaSym.h:21