Skip to content
Snippets Groups Projects
Commit 4c192cd7 authored by Stéphane Del Pino's avatar Stéphane Del Pino
Browse files

Fix few typos

parent 1db7c7ef
No related branches found
No related tags found
1 merge request!11Feature/mpi
...@@ -296,7 +296,7 @@ template <size_t N, typename T> ...@@ -296,7 +296,7 @@ template <size_t N, typename T>
PASTIS_INLINE PASTIS_INLINE
constexpr T det(const TinyMatrix<N,T>& A) constexpr T det(const TinyMatrix<N,T>& A)
{ {
static_assert(std::is_arithmetic<T>::value, "determinent is not defined for non arithmetic types"); static_assert(std::is_arithmetic<T>::value, "determinent is not defined for non-arithmetic types");
static_assert(std::is_floating_point<T>::value, "determinent for arbitrary dimension N is defined for floating point types only"); static_assert(std::is_floating_point<T>::value, "determinent for arbitrary dimension N is defined for floating point types only");
TinyMatrix<N,T> M = A; TinyMatrix<N,T> M = A;
...@@ -340,7 +340,7 @@ template <typename T> ...@@ -340,7 +340,7 @@ template <typename T>
PASTIS_INLINE PASTIS_INLINE
constexpr T det(const TinyMatrix<1,T>& A) constexpr T det(const TinyMatrix<1,T>& A)
{ {
static_assert(std::is_arithmetic<T>::value, "determinent is not defined for non arithmetic types"); static_assert(std::is_arithmetic<T>::value, "determinent is not defined for non-arithmetic types");
return A(0,0); return A(0,0);
} }
...@@ -348,7 +348,7 @@ template <typename T> ...@@ -348,7 +348,7 @@ template <typename T>
PASTIS_INLINE PASTIS_INLINE
constexpr T det(const TinyMatrix<2,T>& A) constexpr T det(const TinyMatrix<2,T>& A)
{ {
static_assert(std::is_arithmetic<T>::value, "determinent is not defined for non arithmetic types"); static_assert(std::is_arithmetic<T>::value, "determinent is not defined for non-arithmetic types");
return A(0,0)*A(1,1)-A(1,0)*A(0,1); return A(0,0)*A(1,1)-A(1,0)*A(0,1);
} }
...@@ -356,7 +356,7 @@ template <typename T> ...@@ -356,7 +356,7 @@ template <typename T>
PASTIS_INLINE PASTIS_INLINE
constexpr T det(const TinyMatrix<3,T>& A) constexpr T det(const TinyMatrix<3,T>& A)
{ {
static_assert(std::is_arithmetic<T>::value, "determinent is not defined for non arithmetic types"); static_assert(std::is_arithmetic<T>::value, "determinent is not defined for non-arithmetic types");
return return
A(0,0)*(A(1,1)*A(2,2)-A(2,1)*A(1,2)) A(0,0)*(A(1,1)*A(2,2)-A(2,1)*A(1,2))
-A(1,0)*(A(0,1)*A(2,2)-A(2,1)*A(0,2)) -A(1,0)*(A(0,1)*A(2,2)-A(2,1)*A(0,2))
...@@ -399,7 +399,7 @@ template <typename T> ...@@ -399,7 +399,7 @@ template <typename T>
PASTIS_INLINE PASTIS_INLINE
constexpr TinyMatrix<1,T> inverse(const TinyMatrix<1,T>& A) constexpr TinyMatrix<1,T> inverse(const TinyMatrix<1,T>& A)
{ {
static_assert(std::is_arithmetic<T>::value, "inverse is not defined for non arithmetic types"); static_assert(std::is_arithmetic<T>::value, "inverse is not defined for non-arithmetic types");
static_assert(std::is_floating_point<T>::value, "inverse is defined for floating point types only"); static_assert(std::is_floating_point<T>::value, "inverse is defined for floating point types only");
TinyMatrix<1,T> A_1(1./A(0,0)); TinyMatrix<1,T> A_1(1./A(0,0));
...@@ -412,7 +412,7 @@ constexpr T cofactor(const TinyMatrix<N,T>& A, ...@@ -412,7 +412,7 @@ constexpr T cofactor(const TinyMatrix<N,T>& A,
const size_t& i, const size_t& i,
const size_t& j) const size_t& j)
{ {
static_assert(std::is_arithmetic<T>::value, "cofactor is not defined for non arithmetic types"); static_assert(std::is_arithmetic<T>::value, "cofactor is not defined for non-arithmetic types");
const T sign = ((i+j)%2) ? -1 : 1; const T sign = ((i+j)%2) ? -1 : 1;
return sign * det(getMinor(A, i, j)); return sign * det(getMinor(A, i, j));
...@@ -422,7 +422,7 @@ template <typename T> ...@@ -422,7 +422,7 @@ template <typename T>
PASTIS_INLINE PASTIS_INLINE
constexpr TinyMatrix<2,T> inverse(const TinyMatrix<2,T>& A) constexpr TinyMatrix<2,T> inverse(const TinyMatrix<2,T>& A)
{ {
static_assert(std::is_arithmetic<T>::value, "inverse is not defined for non arithmetic types"); static_assert(std::is_arithmetic<T>::value, "inverse is not defined for non-arithmetic types");
static_assert(std::is_floating_point<T>::value, "inverse is defined for floating point types only"); static_assert(std::is_floating_point<T>::value, "inverse is defined for floating point types only");
const T determinent = det(A); const T determinent = det(A);
...@@ -438,7 +438,7 @@ template <typename T> ...@@ -438,7 +438,7 @@ template <typename T>
PASTIS_INLINE PASTIS_INLINE
constexpr TinyMatrix<3,T> inverse(const TinyMatrix<3,T>& A) constexpr TinyMatrix<3,T> inverse(const TinyMatrix<3,T>& A)
{ {
static_assert(std::is_arithmetic<T>::value, "inverse is not defined for non arithmetic types"); static_assert(std::is_arithmetic<T>::value, "inverse is not defined for non-arithmetic types");
static_assert(std::is_floating_point<T>::value, "inverse is defined for floating point types only"); static_assert(std::is_floating_point<T>::value, "inverse is defined for floating point types only");
const T determinent = det(A); const T determinent = det(A);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment