Go to the documentation of this file.
11 #ifndef EIGEN_DIAGONAL_H
12 #define EIGEN_DIAGONAL_H
36 template<
typename MatrixType,
int DiagIndex>
47 ColsAtCompileTime = 1,
48 MaxRowsAtCompileTime =
int(MatrixType::MaxSizeAtCompileTime) ==
Dynamic ?
Dynamic
50 MatrixType::MaxColsAtCompileTime)
53 MaxColsAtCompileTime = 1,
57 InnerStrideAtCompileTime = MatrixTypeOuterStride ==
Dynamic ?
Dynamic : MatrixTypeOuterStride+1,
58 OuterStrideAtCompileTime = 0
63 template<
typename MatrixType,
int _DiagIndex>
class Diagonal
68 enum { DiagIndex = _DiagIndex };
75 eigen_assert( a_index <= m_matrix.cols() && -a_index <= m_matrix.rows() );
83 return m_index.value()<0 ? numext::mini<Index>(m_matrix.cols(),m_matrix.rows()+m_index.value())
84 : numext::mini<Index>(m_matrix.rows(),m_matrix.cols()-m_index.value());
92 return m_matrix.outerStride() + 1;
107 inline const Scalar*
data()
const {
return &(m_matrix.coeffRef(rowOffset(), colOffset())); }
113 return m_matrix.coeffRef(
row+rowOffset(),
row+colOffset());
119 return m_matrix.coeffRef(
row+rowOffset(),
row+colOffset());
125 return m_matrix.coeff(
row+rowOffset(),
row+colOffset());
132 return m_matrix.coeffRef(idx+rowOffset(), idx+colOffset());
138 return m_matrix.coeffRef(idx+rowOffset(), idx+colOffset());
144 return m_matrix.coeff(idx+rowOffset(), idx+colOffset());
157 return m_index.value();
173 template<
int LoadMode>
typename MatrixType::PacketReturnType packet(
Index)
const;
174 template<
int LoadMode>
typename MatrixType::PacketReturnType packet(
Index,
Index)
const;
185 template<
typename Derived>
193 template<
typename Derived>
197 return ConstDiagonalReturnType(derived());
211 template<
typename Derived>
219 template<
typename Derived>
237 template<
typename Derived>
247 template<
typename Derived>
258 #endif // EIGEN_DIAGONAL_H
ref_selector< MatrixType >::type MatrixTypeNested
#define EIGEN_DEVICE_FUNC
internal::add_const< Diagonal< const Derived > >::type ConstDiagonalReturnType
internal::ref_selector< MatrixType >::non_const_type m_matrix
Namespace containing all symbols from the Eigen library.
const EIGEN_DEVICE_FUNC internal::remove_all< typename MatrixType::Nested >::type & nestedExpression() const
EIGEN_DEVICE_FUNC ScalarWithConstIfNotLvalue * data()
EIGEN_DEVICE_FUNC Index rows() const
const unsigned int RowMajorBit
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR Index colOffset() const EIGEN_NOEXCEPT
#define EIGEN_DENSE_PUBLIC_INTERFACE(Derived)
EIGEN_DEVICE_FUNC Scalar & coeffRef(Index row, Index)
const unsigned int DirectAccessBit
internal::add_const< Diagonal< const Derived, DynamicIndex > >::type ConstDiagonalDynamicIndexReturnType
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR T value()
#define EIGEN_PLAIN_ENUM_MIN(a, b)
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index innerStride() const EIGEN_NOEXCEPT
MatrixType::StorageKind StorageKind
const unsigned int LvalueBit
internal::conditional< internal::is_lvalue< MatrixType >::value, Scalar, const Scalar >::type ScalarWithConstIfNotLvalue
internal::dense_xpr_base< Diagonal >::type Base
const EIGEN_DEVICE_FUNC Scalar & coeffRef(Index idx) const
Expression of a diagonal/subdiagonal/superdiagonal in a matrix.
Diagonal< Derived, DynamicIndex > DiagonalDynamicIndexReturnType
#define EIGEN_STRONG_INLINE
EIGEN_DEVICE_FUNC Index index() const
const internal::variable_if_dynamicindex< Index, DiagIndex > m_index
Map< Matrix< T, Dynamic, Dynamic, ColMajor >, 0, OuterStride<> > matrix(T *data, int rows, int cols, int stride)
EIGEN_DEVICE_FUNC CoeffReturnType coeff(Index idx) const
remove_reference< MatrixTypeNested >::type _MatrixTypeNested
EIGEN_DEVICE_FUNC Diagonal(MatrixType &matrix, Index a_index=DiagIndex)
Diagonal< Derived > DiagonalReturnType
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR Index rowOffset() const EIGEN_NOEXCEPT
#define EIGEN_PLAIN_ENUM_MAX(a, b)
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index cols() const EIGEN_NOEXCEPT
Base class for all dense matrices, vectors, and expressions.
#define EIGEN_STATIC_ASSERT_LVALUE(Derived)
EIGEN_DEVICE_FUNC CoeffReturnType coeff(Index row, Index) const
EIGEN_DEVICE_FUNC DiagonalReturnType diagonal()
EIGEN_DEVICE_FUNC Scalar & coeffRef(Index idx)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR Index absDiagIndex() const EIGEN_NOEXCEPT
const EIGEN_DEVICE_FUNC Scalar * data() const
#define EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Derived)
#define EIGEN_SIZE_MIN_PREFER_FIXED(a, b)
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
const EIGEN_DEVICE_FUNC Scalar & coeffRef(Index row, Index) const
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index outerStride() const EIGEN_NOEXCEPT
gtsam
Author(s):
autogenerated on Fri Nov 1 2024 03:32:26