mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-09-25 07:43:14 +08:00
fix misc warnings
This commit is contained in:
parent
0ed604583f
commit
0b555a4a3d
@ -170,10 +170,10 @@ template<typename Derived> class ArrayBase
|
|||||||
template<typename OtherDerived> explicit ArrayBase(const ArrayBase<OtherDerived>&);
|
template<typename OtherDerived> explicit ArrayBase(const ArrayBase<OtherDerived>&);
|
||||||
protected:
|
protected:
|
||||||
// mixing arrays and matrices is not legal
|
// mixing arrays and matrices is not legal
|
||||||
template<typename OtherDerived> Derived& operator+=(const MatrixBase<OtherDerived>& mat)
|
template<typename OtherDerived> Derived& operator+=(const MatrixBase<OtherDerived>& )
|
||||||
{EIGEN_STATIC_ASSERT(sizeof(typename OtherDerived::Scalar)==-1,YOU_CANNOT_MIX_ARRAYS_AND_MATRICES);}
|
{EIGEN_STATIC_ASSERT(sizeof(typename OtherDerived::Scalar)==-1,YOU_CANNOT_MIX_ARRAYS_AND_MATRICES);}
|
||||||
// mixing arrays and matrices is not legal
|
// mixing arrays and matrices is not legal
|
||||||
template<typename OtherDerived> Derived& operator-=(const MatrixBase<OtherDerived>& mat)
|
template<typename OtherDerived> Derived& operator-=(const MatrixBase<OtherDerived>& )
|
||||||
{EIGEN_STATIC_ASSERT(sizeof(typename OtherDerived::Scalar)==-1,YOU_CANNOT_MIX_ARRAYS_AND_MATRICES);}
|
{EIGEN_STATIC_ASSERT(sizeof(typename OtherDerived::Scalar)==-1,YOU_CANNOT_MIX_ARRAYS_AND_MATRICES);}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -507,10 +507,10 @@ template<typename Derived> class MatrixBase
|
|||||||
template<typename OtherDerived> explicit MatrixBase(const MatrixBase<OtherDerived>&);
|
template<typename OtherDerived> explicit MatrixBase(const MatrixBase<OtherDerived>&);
|
||||||
protected:
|
protected:
|
||||||
// mixing arrays and matrices is not legal
|
// mixing arrays and matrices is not legal
|
||||||
template<typename OtherDerived> Derived& operator+=(const ArrayBase<OtherDerived>& array)
|
template<typename OtherDerived> Derived& operator+=(const ArrayBase<OtherDerived>& )
|
||||||
{EIGEN_STATIC_ASSERT(sizeof(typename OtherDerived::Scalar)==-1,YOU_CANNOT_MIX_ARRAYS_AND_MATRICES);}
|
{EIGEN_STATIC_ASSERT(sizeof(typename OtherDerived::Scalar)==-1,YOU_CANNOT_MIX_ARRAYS_AND_MATRICES);}
|
||||||
// mixing arrays and matrices is not legal
|
// mixing arrays and matrices is not legal
|
||||||
template<typename OtherDerived> Derived& operator-=(const ArrayBase<OtherDerived>& array)
|
template<typename OtherDerived> Derived& operator-=(const ArrayBase<OtherDerived>& )
|
||||||
{EIGEN_STATIC_ASSERT(sizeof(typename OtherDerived::Scalar)==-1,YOU_CANNOT_MIX_ARRAYS_AND_MATRICES);}
|
{EIGEN_STATIC_ASSERT(sizeof(typename OtherDerived::Scalar)==-1,YOU_CANNOT_MIX_ARRAYS_AND_MATRICES);}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -57,3 +57,4 @@ void chkder(
|
|||||||
}
|
}
|
||||||
|
|
||||||
} // end namespace internal
|
} // end namespace internal
|
||||||
|
|
||||||
|
@ -28,15 +28,12 @@ void rwupdt(
|
|||||||
r(i,j) = temp;
|
r(i,j) = temp;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rowj == 0.)
|
|
||||||
{
|
|
||||||
givens[j] = JacobiRotation<Scalar>(1,0);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* determine a givens rotation which eliminates w(j). */
|
/* determine a givens rotation which eliminates w(j). */
|
||||||
givens[j].makeGivens(-r(j,j), rowj);
|
givens[j].makeGivens(-r(j,j), rowj);
|
||||||
|
|
||||||
|
if (rowj == 0.)
|
||||||
|
continue; // givens[j] is identity
|
||||||
|
|
||||||
/* apply the current transformation to r(j,j), b(j), and alpha. */
|
/* apply the current transformation to r(j,j), b(j), and alpha. */
|
||||||
r(j,j) = givens[j].c() * r(j,j) + givens[j].s() * rowj;
|
r(j,j) = givens[j].c() * r(j,j) + givens[j].s() * rowj;
|
||||||
temp = givens[j].c() * b[j] + givens[j].s() * alpha;
|
temp = givens[j].c() * b[j] + givens[j].s() * alpha;
|
||||||
@ -46,3 +43,4 @@ void rwupdt(
|
|||||||
}
|
}
|
||||||
|
|
||||||
} // end namespace internal
|
} // end namespace internal
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user