19 class SepUnion :
public Sep<SepUnion>
24 requires (IsSepBaseOrPtr<S> && !std::is_same_v<SepUnion,S>)
26 : Sep<SepUnion>(size_of(s)), _seps(s)
29 template<
typename... S>
30 requires (IsSepBaseOrPtr<S> && ...)
31 SepUnion(
const S&... s)
32 : Sep<SepUnion>(size_first_item(s...)), _seps(s...)
34 assert_release(all_same_size(s...));
37 BoxPair separate(
const IntervalVector& x)
const;
40 requires std::is_base_of_v<SepBase,S>
41 SepUnion& operator|=(
const S& s)
43 assert_release(s.size() == this->size());
44 _seps.add_shared_ptr(std::make_shared<S>(s));
48 SepUnion& operator|=(
const std::shared_ptr<SepBase>& s)
50 assert_release(s->size() == this->size());
51 _seps.add_shared_ptr(s);
57 Collection<SepBase> _seps;
60 template<
typename S1,
typename S2>
61 requires (IsSepBaseOrPtr<S1> && IsSepBaseOrPtr<S2>)
62 inline SepUnion
operator|(
const S1& s1,
const S2& s2)
64 return SepUnion(s1,s2);
68 requires IsSepBaseOrPtr<S2>
69 inline SepUnion operator|(
const IntervalVector& s1,
const S2& s2)
71 assert_release(s1.size() == s2.size());
72 return SepUnion(SepWrapper(s1),s2);
76 requires IsSepBaseOrPtr<S1>
77 inline SepUnion operator|(
const S1& s1,
const IntervalVector& s2)
79 assert_release(s1.size() == s2.size());
80 return SepUnion(s1,SepWrapper(s2));