Browse Source

Forced function instantiation for coverage testing.

master
jgoppert 9 years ago
parent
commit
a334cecfa7
  1. 3
      matrix/filter.hpp
  2. 10
      test/filter.cpp
  3. 8
      test/integration.cpp
  4. 2
      test/vector2.cpp

3
matrix/filter.hpp

@ -5,7 +5,7 @@ @@ -5,7 +5,7 @@
namespace matrix {
template<typename Type, size_t M, size_t N>
void kalman_correct(
int kalman_correct(
const SquareMatrix<Type, M> & P,
const Matrix<Type, N, M> & C,
const SquareMatrix<Type, N> & R,
@ -20,6 +20,7 @@ void kalman_correct( @@ -20,6 +20,7 @@ void kalman_correct(
dx = K*r;
beta = Scalar<Type>(r.T()*S_I*r);
dP = K*C*P*(-1);
return 0;
}
}; // namespace matrix

10
test/filter.cpp

@ -5,7 +5,15 @@ @@ -5,7 +5,15 @@
using namespace matrix;
template class Vector<float, 5>;
template int kalman_correct<float, 6, 5>(
const SquareMatrix<float, 6> & P,
const Matrix<float, 5, 6> & C,
const SquareMatrix<float, 5> & R,
const Vector<float, 5> &r,
Vector<float, 6> & dx,
SquareMatrix<float, 6> & dP,
float & beta
);
int main()
{

8
test/integration.cpp

@ -5,6 +5,14 @@ @@ -5,6 +5,14 @@
using namespace matrix;
// instantiate template to ensure coverage check
template int integrate_rk4<float, 6>(
Vector<float, 6> (*f)(float, Vector<float, 6>),
Vector<float, 6> & y,
float & t,
float h
);
Vector<float, 6> f(float t, Vector<float, 6> y);
Vector<float, 6> f(float t, Vector<float, 6> y) {

2
test/vector2.cpp

@ -5,7 +5,7 @@ @@ -5,7 +5,7 @@
using namespace matrix;
template class Vector<float, 3>;
template class Vector<float, 2>;
int main()
{

Loading…
Cancel
Save