codac 1.5.6
Loading...
Searching...
No Matches
codac2_CtcWrapper.h
Go to the documentation of this file.
1
9
10#pragma once
11
12#include "codac2_Ctc.h"
13
14namespace codac2
15{
16 template<typename X>
17 class CtcWrapper : public Ctc<CtcWrapper<X>,X>
18 {
19 public:
20
21 CtcWrapper(const X& y)
22 : Ctc<CtcWrapper<X>,X>(y.size()), _y(y)
23 { }
24
25 void contract(X& x) const
26 {
27 assert_release(x.size() == this->size());
28 x &= _y;
29 }
30
31 protected:
32
33 const X _y;
34 };
35}