8 using namespace Kalman;
10 template <
typename T, K_UINT_32 BEG,
bool DBG>
14 T values[5] = {5.0, 4.0, 3.0, 2.0, 1.0};
27 cout <<
"v0 : " << v0 << endl;
28 cout <<
"v1 : " << v1 << endl;
29 cout <<
"v2 : " << v2 << endl;
30 cout <<
"v3 : " << v3 << endl;
31 cout <<
"v4 : " << v4 << endl;
32 cout <<
"v5 : " << v5 << endl;
33 cout <<
"v6 : " << v6 << endl;
34 cout <<
"v7 : " << v7 << endl;
35 cout <<
"v8 : " << v8 << endl << endl;
47 cout <<
"v4 : " << v4 << endl;
48 cout <<
"v5 : " << v5 << endl;
49 cout <<
"v6 : " << v6 << endl;
50 cout <<
"v7 : " << v7 << endl;
51 cout <<
"v8 : " << v8 << endl << endl;
63 cout <<
"v0 : " << v0 << endl;
64 cout <<
"v1 : " << v1 << endl;
65 cout <<
"v2 : " << v2 << endl;
66 cout <<
"v3 : " << v3 << endl;
67 cout <<
"v4 : " << v4 << endl;
68 cout <<
"v5 : " << v5 << endl;
69 cout <<
"v6 : " << v6 << endl;
70 cout <<
"v7 : " << v7 << endl;
71 cout <<
"v8 : " << v8 << endl << endl;
75 const Vector& ref = v4;
77 cout <<
"v4(1) = " << v4(1) << endl;
78 cout <<
"ref(1) = " << ref(1) << endl;
83 cout <<
"v4(1) = " << v4(1) << endl;
84 cout <<
"ref(1) = " << ref(1) << endl;
91 cout << e.what() << endl;
95 cout << ref(100) << endl;
97 cout << e.what() << endl;
107 cout <<
"v0 is of size : " << v0.
size() << endl;
109 cout <<
"v0 : " << v0 << endl;
111 cout <<
"v1 is of size : " << v1.
size() << endl;
113 cout <<
"v1 : " << v1 << endl;
115 cout <<
"----------------------------" << endl << endl;
120 test<float, 0, true>();
121 test<float, 0, false>();
122 test<float, 1, true>();
123 test<float, 1, false>();
124 test<double, 0, true>();
125 test<double, 0, false>();
126 test<double, 1, true>();
127 test<double, 1, false>();
128 test<complex<double>, 0,
true>();
129 test<complex<double>, 0,
false>();
130 test<complex<double>, 1,
true>();
131 test<complex<double>, 1,
false>();
void resize(K_UINT_32 n)
Resizes the vector. Resulting vector contents are undefined.
Minimalist vector template class.
Exception class for access to out-of-bound elements.
void assign(K_UINT_32 n, const T *v)
Copies an array of n instances of T.
K_UINT_32 size() const
Returns the vector size.
Contains the interface of the KVector template class.