27 #ifndef RL_MATH_METRICS_L2_H
28 #define RL_MATH_METRICS_L2_H
41 typedef typename T::size_type
Size;
50 auto first1 = begin(lhs);
51 auto last1 = end(lhs);
52 auto first2 = begin(rhs);
56 while (first1 != last1)
69 return ::std::abs(lhs - rhs);
73 template<
typename Scalar,
int Rows,
int Options,
int MaxRows,
int MaxCols>
80 typedef ::Eigen::Matrix<Scalar, Rows, 1, Options, MaxRows, MaxCols>
Value;
84 return (lhs - rhs).norm();
89 return ::std::abs(lhs - rhs);
93 template<
typename Scalar,
int Rows,
int Options,
int MaxRows,
int MaxCols>
100 typedef ::Eigen::Matrix<Scalar, Rows, 1, Options, MaxRows, MaxCols>*
Value;
104 return (*lhs - *rhs).norm();
109 return ::std::abs(lhs - rhs);
113 template<
typename Scalar,
int Rows,
int Options,
int MaxRows,
int MaxCols>
120 typedef const ::Eigen::Matrix<Scalar, Rows, 1, Options, MaxRows, MaxCols>*
Value;
124 return (*lhs - *rhs).norm();
129 return ::std::abs(lhs - rhs);
136 #endif // RL_MATH_METRICS_L2_H