mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-04-22 01:29:35 +08:00
Fix DenseBase::tail for Dynamic template argument
This commit is contained in:
parent
e0cbc55d92
commit
b55dab7f21
@ -1304,14 +1304,14 @@ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE typename ConstFixedSegmentReturnType<N>::T
|
|||||||
template <int N>
|
template <int N>
|
||||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE typename FixedSegmentReturnType<N>::Type tail(Index n = N) {
|
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE typename FixedSegmentReturnType<N>::Type tail(Index n = N) {
|
||||||
EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
|
EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
|
||||||
return typename FixedSegmentReturnType<N>::Type(derived(), size() - n);
|
return typename FixedSegmentReturnType<N>::Type(derived(), size() - n, n);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// This is the const version of tail<int>.
|
/// This is the const version of tail<int>.
|
||||||
template <int N>
|
template <int N>
|
||||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE typename ConstFixedSegmentReturnType<N>::Type tail(Index n = N) const {
|
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE typename ConstFixedSegmentReturnType<N>::Type tail(Index n = N) const {
|
||||||
EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
|
EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
|
||||||
return typename ConstFixedSegmentReturnType<N>::Type(derived(), size() - n);
|
return typename ConstFixedSegmentReturnType<N>::Type(derived(), size() - n, n);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// \returns the \a outer -th column (resp. row) of the matrix \c *this if \c *this
|
/// \returns the \a outer -th column (resp. row) of the matrix \c *this if \c *this
|
||||||
|
Loading…
x
Reference in New Issue
Block a user