24 cout <<
"isAllStaticUnder=" << tup.
MapSize << endl;
26 cout <<
"isAllStaticUnder=" << tup2.
MapSize << endl;
28 cout <<
"isAllStaticUnder=" << arr.
MapSize << endl;
29 Eigen::Vector4d hellu(1., 2., 3., 4.);
30 arr.
sub(1).data() = hellu;
31 cout << arr.
data().transpose() << endl
33 cout << arr.
sub(0).data().transpose() << endl
35 cout << arr.
sub(1).data().transpose() << endl
37 cout << arr.
sub(2).data().transpose() << endl
41 cout <<
"isAllStaticUnder=" << arrvec.
MapSize << endl;
42 arrvec.
sub(1).subResize(4);
43 arrvec.
sub(1).data() = hellu;
44 cout << arrvec.
data().transpose() << endl
47 cout <<
"isAllStaticUnder=" << vecarr.
MapSize << endl;
49 vecarr.
sub(1).data() = hellu;
50 cout << vecarr.
data().transpose() << endl
53 TestDepth0 DerivedObjectTestDerived, DerivedObjectTestCTRP, DerivedObjectVirtual;
55 TestDepth0& testDerived = DerivedObjectTestDerived;
60 <<
"Starting derived Test" << endl
63 testDerived.
sub(1).subResize(5);
64 for (
int i = 0; i < testDerived.
sub(1).data().rows(); ++i)
66 testDerived.
sub(1).data()(i) = 9 - i;
68 testDerived.
sub(1).subResize(3);
69 testDerived.
sub(0).subResize(2);
70 for (
int i = 0; i < testDerived.
sub(0).data().rows(); ++i)
72 testDerived.
sub(0).data()(i) = 1 + i;
75 <<
"Starting baseCRTP Test" << endl
78 testBaseCRTP.
sub(1).subResize(5);
79 for (
int i = 0; i < testBaseCRTP.
sub(1).data().rows(); ++i)
81 testBaseCRTP.
sub(1).data()(i) = 9 - i;
83 testBaseCRTP.
sub(1).subResize(3);
84 testBaseCRTP.
sub(0).subResize(2);
85 for (
int i = 0; i < testBaseCRTP.
sub(0).data().rows(); ++i)
87 testBaseCRTP.
sub(0).data()(i) = 1 + i;
90 <<
"Starting baseVirtual Test" << endl
94 for (
int i = 0; i < testBaseVirtual.
sub(1).
data().rows(); ++i)
96 testBaseVirtual.
sub(1).
data()(i) = 9 - i;
100 for (
int i = 0; i < testBaseVirtual.
sub(0).
data().rows(); ++i)
102 testBaseVirtual.
sub(0).
data()(i) = 1 + i;
109 cout <<
"dataBuffer=" << bla.
data().transpose() << endl;
111 cout <<
"dataBuffer=" << bla.
data().transpose() << endl;
112 bla.
sub(1).subResize(5);
113 cout <<
"dataBuffer=" << bla.
data().transpose() << endl;
114 for (
int i = 0; i < bla.
sub(1).data().rows(); ++i)
116 bla.
sub(1).data()(i) = 9 - i;
118 cout <<
"dataBuffer=" << bla.
data().transpose() << endl;
119 bla.
sub(1).subResize(3);
120 cout <<
"dataBuffer=" << bla.
data().transpose() << endl;
121 bla.
sub(0).subResize(2);
122 cout <<
"dataBuffer=" << bla.
data().transpose() << endl;
123 for (
int i = 0; i < bla.
sub(0).data().rows(); ++i)
125 bla.
sub(0).data()(i) = 1 + i;
127 cout <<
"dataBuffer=" << bla.
data().transpose() << endl;
128 cout << bla.
data().rows() << endl;
129 cout << bla.
sub(0).data().rows() << endl;
130 cout << bla.
sub(1).data().rows() << endl
133 cout << bla.
data() << endl
135 cout << bla.
data().transpose() << endl
137 cout << bla.
sub(0).data() << endl
139 cout << bla.
sub(1).data() << endl
142 cout <<
"isAllStaticUnder=" << bla.
MapSize << endl;
145 testBaseCRTP.
sub(0).sub(0);
146 testBaseVirtual.
sub(0).
sub(0);
StateBaseVirtualType & sub(const size_t &_i)
Helper function needed to upgrade c++ 2011.
static constexpr const int MapSize
void subResize(const size_t &_size)
LeafType & sub(const size_t &_i)
void subResize(const size_t &_size)