codac 1.5.6
Loading...
Searching...
No Matches
codac2_CtcCross.h
Go to the documentation of this file.
1
9
10#pragma once
11
12#include "codac2_Ctc.h"
14#include "codac2_Segment.h"
15
16namespace codac2
17{
18 class CtcCross : public Ctc<CtcCross,IntervalVector>
19 {
20 public:
21
22 CtcCross(const Segment& e, const IntervalVector &r)
23 : Ctc<CtcCross,IntervalVector>(2), _e(e), _r(r)
24 {
25 assert_release(_r.size() == 2 && "only 2d segments are supported");
26 }
27
28 void contract(IntervalVector& x) const;
29
30 protected:
31
32 const Segment _e;
33 const IntervalVector _r;
34 };
35
36 class CtcNoCross : public Ctc<CtcNoCross,IntervalVector>
37 {
38 public:
39
40 CtcNoCross(const Segment& e, const IntervalVector &r)
41 : Ctc<CtcNoCross,IntervalVector>(2), _e(e), _r(r)
42 {
43 assert_release(_r.size() == 2 && "only 2d segments are supported");
44 }
45
46 void contract(IntervalVector& x) const;
47
48 protected:
49
50 const Segment _e;
51 const IntervalVector _r;
52 };
53}