Skip to content
Snippets Groups Projects
Commit d740d612 authored by Dr. Felix Tobias Schindler's avatar Dr. Felix Tobias Schindler
Browse files

Merge branch 'purge-parametric'

parents ad5076b2 e18ca142
No related branches found
No related tags found
No related merge requests found
......@@ -3,6 +3,7 @@
#include <dune/common/float_cmp.hh>
#include <dune/common/dynvector.hh>
#include <dune/common/fvector.hh>
#if HAVE_EIGEN
#include <dune/stuff/la/container/eigen.hh>
......@@ -26,6 +27,17 @@ bool eq(const Dune::DynamicVector<T>& first, const Dune::DynamicVector<T>& secon
return result;
} // ... eq(...)
template <class T, int size, Dune::FloatCmp::CmpStyle style = Dune::FloatCmp::defaultCmpStyle>
bool eq(const Dune::FieldVector<T, size>& first, const Dune::FieldVector<T, size>& second,
typename Dune::FloatCmp::EpsilonType<T>::Type epsilon = Dune::FloatCmp::DefaultEpsilon<T, style>::value())
{
bool result = true;
for (size_t ii = 0; ii < size; ++ii)
if (!Dune::FloatCmp::eq<T, style>(first[ii], second[ii], epsilon))
result = false;
return result;
} // ... eq(...)
#if HAVE_EIGEN
template <class T, Dune::FloatCmp::CmpStyle style = Dune::FloatCmp::defaultCmpStyle>
bool eq(const Dune::Stuff::LA::EigenDenseVector<T>& first, const Dune::Stuff::LA::EigenDenseVector<T>& second,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment