DiagonalMatrix.h
Go to the documentation of this file.
1 // This file is part of Eigen, a lightweight C++ template library
2 // for linear algebra.
3 //
4 // Copyright (C) 2009 Gael Guennebaud <gael.guennebaud@inria.fr>
5 // Copyright (C) 2007-2009 Benoit Jacob <jacob.benoit.1@gmail.com>
6 //
7 // This Source Code Form is subject to the terms of the Mozilla
8 // Public License v. 2.0. If a copy of the MPL was not distributed
9 // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 
11 #ifndef EIGEN_DIAGONALMATRIX_H
12 #define EIGEN_DIAGONALMATRIX_H
13 
14 namespace Eigen {
15 
16 #ifndef EIGEN_PARSED_BY_DOXYGEN
17 template<typename Derived>
18 class DiagonalBase : public EigenBase<Derived>
19 {
20  public:
26 
27  enum {
28  RowsAtCompileTime = DiagonalVectorType::SizeAtCompileTime,
29  ColsAtCompileTime = DiagonalVectorType::SizeAtCompileTime,
30  MaxRowsAtCompileTime = DiagonalVectorType::MaxSizeAtCompileTime,
31  MaxColsAtCompileTime = DiagonalVectorType::MaxSizeAtCompileTime,
34  };
35 
39 
41  inline const Derived& derived() const { return *static_cast<const Derived*>(this); }
43  inline Derived& derived() { return *static_cast<Derived*>(this); }
44 
46  DenseMatrixType toDenseMatrix() const { return derived(); }
47 
49  inline const DiagonalVectorType& diagonal() const { return derived().diagonal(); }
51  inline DiagonalVectorType& diagonal() { return derived().diagonal(); }
52 
54  inline Index rows() const { return diagonal().size(); }
56  inline Index cols() const { return diagonal().size(); }
57 
58  template<typename MatrixDerived>
62  {
64  }
65 
68  inline const InverseReturnType
69  inverse() const
70  {
72  }
73 
76  operator*(const Scalar& scalar) const
77  {
79  }
83  {
85  }
86 
87  template<typename OtherDerived>
89  #ifdef EIGEN_PARSED_BY_DOXYGEN
90  inline unspecified_expression_type
91  #else
92  inline const DiagonalWrapper<const EIGEN_CWISE_BINARY_RETURN_TYPE(DiagonalVectorType,typename OtherDerived::DiagonalVectorType,sum) >
93  #endif
95  {
96  return (diagonal() + other.diagonal()).asDiagonal();
97  }
98 
99  template<typename OtherDerived>
101  #ifdef EIGEN_PARSED_BY_DOXYGEN
102  inline unspecified_expression_type
103  #else
104  inline const DiagonalWrapper<const EIGEN_CWISE_BINARY_RETURN_TYPE(DiagonalVectorType,typename OtherDerived::DiagonalVectorType,difference) >
105  #endif
107  {
108  return (diagonal() - other.diagonal()).asDiagonal();
109  }
110 };
111 
112 #endif
113 
127 namespace internal {
128 template<typename _Scalar, int SizeAtCompileTime, int MaxSizeAtCompileTime>
129 struct traits<DiagonalMatrix<_Scalar,SizeAtCompileTime,MaxSizeAtCompileTime> >
130  : traits<Matrix<_Scalar,SizeAtCompileTime,SizeAtCompileTime,0,MaxSizeAtCompileTime,MaxSizeAtCompileTime> >
131 {
134  enum {
136  };
137 };
138 }
139 template<typename _Scalar, int SizeAtCompileTime, int MaxSizeAtCompileTime>
141  : public DiagonalBase<DiagonalMatrix<_Scalar,SizeAtCompileTime,MaxSizeAtCompileTime> >
142 {
143  public:
144  #ifndef EIGEN_PARSED_BY_DOXYGEN
146  typedef const DiagonalMatrix& Nested;
147  typedef _Scalar Scalar;
150  #endif
151 
152  protected:
153 
155 
156  public:
157 
160  inline const DiagonalVectorType& diagonal() const { return m_diagonal; }
163  inline DiagonalVectorType& diagonal() { return m_diagonal; }
164 
167  inline DiagonalMatrix() {}
168 
171  explicit inline DiagonalMatrix(Index dim) : m_diagonal(dim) {}
172 
175  inline DiagonalMatrix(const Scalar& x, const Scalar& y) : m_diagonal(x,y) {}
176 
179  inline DiagonalMatrix(const Scalar& x, const Scalar& y, const Scalar& z) : m_diagonal(x,y,z) {}
180 
181  #if EIGEN_HAS_CXX11
182 
192  template <typename... ArgTypes>
194  DiagonalMatrix(const Scalar& a0, const Scalar& a1, const Scalar& a2, const ArgTypes&... args)
195  : m_diagonal(a0, a1, a2, args...) {}
196 
201  explicit EIGEN_STRONG_INLINE DiagonalMatrix(const std::initializer_list<std::initializer_list<Scalar>>& list)
202  : m_diagonal(list) {}
203  #endif // EIGEN_HAS_CXX11
204 
206  template<typename OtherDerived>
209 
210  #ifndef EIGEN_PARSED_BY_DOXYGEN
211 
213  #endif
214 
216  template<typename OtherDerived>
219  {}
220 
222  template<typename OtherDerived>
225  {
226  m_diagonal = other.diagonal();
227  return *this;
228  }
229 
230  #ifndef EIGEN_PARSED_BY_DOXYGEN
231 
236  {
237  m_diagonal = other.diagonal();
238  return *this;
239  }
240  #endif
241 
244  inline void resize(Index size) { m_diagonal.resize(size); }
247  inline void setZero() { m_diagonal.setZero(); }
250  inline void setZero(Index size) { m_diagonal.setZero(size); }
253  inline void setIdentity() { m_diagonal.setOnes(); }
256  inline void setIdentity(Index size) { m_diagonal.setOnes(size); }
257 };
258 
273 namespace internal {
274 template<typename _DiagonalVectorType>
275 struct traits<DiagonalWrapper<_DiagonalVectorType> >
276 {
277  typedef _DiagonalVectorType DiagonalVectorType;
279  typedef typename DiagonalVectorType::StorageIndex StorageIndex;
282  enum {
283  RowsAtCompileTime = DiagonalVectorType::SizeAtCompileTime,
284  ColsAtCompileTime = DiagonalVectorType::SizeAtCompileTime,
285  MaxRowsAtCompileTime = DiagonalVectorType::MaxSizeAtCompileTime,
286  MaxColsAtCompileTime = DiagonalVectorType::MaxSizeAtCompileTime,
288  };
289 };
290 }
291 
292 template<typename _DiagonalVectorType>
294  : public DiagonalBase<DiagonalWrapper<_DiagonalVectorType> >, internal::no_assignment_operator
295 {
296  public:
297  #ifndef EIGEN_PARSED_BY_DOXYGEN
298  typedef _DiagonalVectorType DiagonalVectorType;
300  #endif
301 
304  explicit inline DiagonalWrapper(DiagonalVectorType& a_diagonal) : m_diagonal(a_diagonal) {}
305 
308  const DiagonalVectorType& diagonal() const { return m_diagonal; }
309 
310  protected:
311  typename DiagonalVectorType::Nested m_diagonal;
312 };
313 
323 template<typename Derived>
326 {
327  return DiagonalWrapper<const Derived>(derived());
328 }
329 
338 template<typename Derived>
340 {
341  if(cols() != rows()) return false;
342  RealScalar maxAbsOnDiagonal = static_cast<RealScalar>(-1);
343  for(Index j = 0; j < cols(); ++j)
344  {
345  RealScalar absOnDiagonal = numext::abs(coeff(j,j));
346  if(absOnDiagonal > maxAbsOnDiagonal) maxAbsOnDiagonal = absOnDiagonal;
347  }
348  for(Index j = 0; j < cols(); ++j)
349  for(Index i = 0; i < j; ++i)
350  {
351  if(!internal::isMuchSmallerThan(coeff(i, j), maxAbsOnDiagonal, prec)) return false;
352  if(!internal::isMuchSmallerThan(coeff(j, i), maxAbsOnDiagonal, prec)) return false;
353  }
354  return true;
355 }
356 
357 namespace internal {
358 
359 template<> struct storage_kind_to_shape<DiagonalShape> { typedef DiagonalShape Shape; };
360 
361 struct Diagonal2Dense {};
362 
364 
365 // Diagonal matrix to Dense assignment
366 template< typename DstXprType, typename SrcXprType, typename Functor>
367 struct Assignment<DstXprType, SrcXprType, Functor, Diagonal2Dense>
368 {
369  static void run(DstXprType &dst, const SrcXprType &src, const internal::assign_op<typename DstXprType::Scalar,typename SrcXprType::Scalar> &/*func*/)
370  {
371  Index dstRows = src.rows();
372  Index dstCols = src.cols();
373  if((dst.rows()!=dstRows) || (dst.cols()!=dstCols))
374  dst.resize(dstRows, dstCols);
375 
376  dst.setZero();
377  dst.diagonal() = src.diagonal();
378  }
379 
380  static void run(DstXprType &dst, const SrcXprType &src, const internal::add_assign_op<typename DstXprType::Scalar,typename SrcXprType::Scalar> &/*func*/)
381  { dst.diagonal() += src.diagonal(); }
382 
383  static void run(DstXprType &dst, const SrcXprType &src, const internal::sub_assign_op<typename DstXprType::Scalar,typename SrcXprType::Scalar> &/*func*/)
384  { dst.diagonal() -= src.diagonal(); }
385 };
386 
387 } // namespace internal
388 
389 } // end namespace Eigen
390 
391 #endif // EIGEN_DIAGONALMATRIX_H
Eigen::DiagonalBase::PlainObject
DiagonalMatrix< Scalar, DiagonalVectorType::SizeAtCompileTime, DiagonalVectorType::MaxSizeAtCompileTime > PlainObject
Definition: DiagonalMatrix.h:38
Eigen::DiagonalBase::DenseType
DenseMatrixType DenseType
Definition: DiagonalMatrix.h:37
Eigen::DiagonalBase::MaxColsAtCompileTime
@ MaxColsAtCompileTime
Definition: DiagonalMatrix.h:31
Eigen::DiagonalWrapper::DiagonalVectorType
_DiagonalVectorType DiagonalVectorType
Definition: DiagonalMatrix.h:298
EIGEN_DEVICE_FUNC
#define EIGEN_DEVICE_FUNC
Definition: Macros.h:976
Eigen
Namespace containing all symbols from the Eigen library.
Definition: jet.h:637
Eigen::DiagonalBase::Scalar
DiagonalVectorType::Scalar Scalar
Definition: DiagonalMatrix.h:22
Eigen::DiagonalMatrix
Represents a diagonal matrix with its storage.
Definition: DiagonalMatrix.h:140
Eigen::DiagonalBase::cols
EIGEN_DEVICE_FUNC Index cols() const
Definition: DiagonalMatrix.h:56
Eigen::internal::traits< DiagonalWrapper< _DiagonalVectorType > >::Scalar
DiagonalVectorType::Scalar Scalar
Definition: DiagonalMatrix.h:278
Eigen::DiagonalBase::toDenseMatrix
EIGEN_DEVICE_FUNC DenseMatrixType toDenseMatrix() const
Definition: DiagonalMatrix.h:46
Eigen::EigenBase< DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime > >::Index
Eigen::Index Index
The interface type of indices.
Definition: EigenBase.h:39
Eigen::DenseShape
Definition: Constants.h:528
Eigen::MatrixBase::asDiagonal
const EIGEN_DEVICE_FUNC DiagonalWrapper< const Derived > asDiagonal() const
Definition: DiagonalMatrix.h:325
list
Definition: pytypes.h:2166
Eigen::DiagonalBase::operator*
EIGEN_DEVICE_FUNC const friend DiagonalWrapper< const EIGEN_SCALAR_BINARYOP_EXPR_RETURN_TYPE(Scalar, DiagonalVectorType, product) > operator*(const Scalar &scalar, const DiagonalBase &other)
Definition: DiagonalMatrix.h:82
Eigen::DiagonalBase::rows
EIGEN_DEVICE_FUNC Index rows() const
Definition: DiagonalMatrix.h:54
Eigen::EigenBase
Definition: EigenBase.h:29
x
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy x
Definition: gnuplot_common_settings.hh:12
Eigen::DiagonalBase::IsVectorAtCompileTime
@ IsVectorAtCompileTime
Definition: DiagonalMatrix.h:32
Eigen::internal::AssignmentKind< DenseShape, DiagonalShape >::Kind
Diagonal2Dense Kind
Definition: DiagonalMatrix.h:363
Eigen::DiagonalMatrix::DiagonalMatrix
EIGEN_DEVICE_FUNC DiagonalMatrix()
Definition: DiagonalMatrix.h:167
Eigen::EigenBase< DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime > >::size
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index size() const EIGEN_NOEXCEPT
Definition: EigenBase.h:67
Eigen::internal::traits< DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime > >::StorageKind
DiagonalShape StorageKind
Definition: DiagonalMatrix.h:133
Eigen::internal::storage_kind_to_shape
Definition: CoreEvaluators.h:29
Eigen::DiagonalBase::operator-
const EIGEN_DEVICE_FUNC DiagonalWrapper< const EIGEN_CWISE_BINARY_RETURN_TYPE(DiagonalVectorType, typename OtherDerived::DiagonalVectorType, difference) > operator-(const DiagonalBase< OtherDerived > &other) const
Definition: DiagonalMatrix.h:106
Eigen::internal::Diagonal2Dense
Definition: DiagonalMatrix.h:361
Eigen::internal::isMuchSmallerThan
EIGEN_DEVICE_FUNC bool isMuchSmallerThan(const Scalar &x, const OtherScalar &y, const typename NumTraits< Scalar >::Real &precision=NumTraits< Scalar >::dummy_precision())
Definition: Eigen/src/Core/MathFunctions.h:1940
rows
int rows
Definition: Tutorial_commainit_02.cpp:1
Eigen::DiagonalWrapper::Nested
DiagonalWrapper Nested
Definition: DiagonalMatrix.h:299
Eigen::DiagonalMatrix::DiagonalMatrix
EIGEN_DEVICE_FUNC DiagonalMatrix(const Scalar &x, const Scalar &y)
Definition: DiagonalMatrix.h:175
Eigen::DiagonalBase::Flags
@ Flags
Definition: DiagonalMatrix.h:33
Eigen::DiagonalBase::derived
const EIGEN_DEVICE_FUNC Derived & derived() const
Definition: DiagonalMatrix.h:41
align_3::a1
Point2 a1
Definition: testPose2.cpp:769
Eigen::DiagonalMatrix::DiagonalMatrix
EIGEN_DEVICE_FUNC DiagonalMatrix(Index dim)
Definition: DiagonalMatrix.h:171
Eigen::DiagonalBase::diagonal
EIGEN_DEVICE_FUNC DiagonalVectorType & diagonal()
Definition: DiagonalMatrix.h:51
Eigen::DiagonalMatrix::setIdentity
EIGEN_DEVICE_FUNC void setIdentity(Index size)
Definition: DiagonalMatrix.h:256
Eigen::DiagonalMatrix::diagonal
const EIGEN_DEVICE_FUNC DiagonalVectorType & diagonal() const
Definition: DiagonalMatrix.h:160
Functor
Definition: NonLinearOptimization.cpp:117
Eigen::DenseBase< Solve< Decomposition, RhsType > >::RealScalar
NumTraits< Scalar >::Real RealScalar
Definition: DenseBase.h:73
Eigen::DiagonalBase::DenseMatrixType
Matrix< Scalar, RowsAtCompileTime, ColsAtCompileTime, 0, MaxRowsAtCompileTime, MaxColsAtCompileTime > DenseMatrixType
Definition: DiagonalMatrix.h:36
Eigen::DiagonalBase::StorageIndex
internal::traits< Derived >::StorageIndex StorageIndex
Definition: DiagonalMatrix.h:25
Eigen::DiagonalMatrix::resize
EIGEN_DEVICE_FUNC void resize(Index size)
Definition: DiagonalMatrix.h:244
Eigen::MatrixBase::isDiagonal
bool isDiagonal(const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const
Definition: DiagonalMatrix.h:339
j
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2
Eigen::LvalueBit
const unsigned int LvalueBit
Definition: Constants.h:144
Eigen::DiagonalBase::RowsAtCompileTime
@ RowsAtCompileTime
Definition: DiagonalMatrix.h:28
Eigen::DiagonalBase::StorageKind
internal::traits< Derived >::StorageKind StorageKind
Definition: DiagonalMatrix.h:24
scalar
mxArray * scalar(mxClassID classid)
Definition: matlab.h:82
Eigen::DiagonalMatrix::StorageKind
internal::traits< DiagonalMatrix >::StorageKind StorageKind
Definition: DiagonalMatrix.h:148
Eigen::DiagonalBase::diagonal
const EIGEN_DEVICE_FUNC DiagonalVectorType & diagonal() const
Definition: DiagonalMatrix.h:49
Eigen::DiagonalMatrix::StorageIndex
internal::traits< DiagonalMatrix >::StorageIndex StorageIndex
Definition: DiagonalMatrix.h:149
EIGEN_SCALAR_BINARYOP_EXPR_RETURN_TYPE
#define EIGEN_SCALAR_BINARYOP_EXPR_RETURN_TYPE(SCALAR, EXPR, OPNAME)
Definition: Macros.h:1351
EIGEN_STRONG_INLINE
#define EIGEN_STRONG_INLINE
Definition: Macros.h:917
Eigen::internal::traits< DiagonalWrapper< _DiagonalVectorType > >::DiagonalVectorType
_DiagonalVectorType DiagonalVectorType
Definition: DiagonalMatrix.h:277
Eigen::DiagonalWrapper::m_diagonal
DiagonalVectorType::Nested m_diagonal
Definition: DiagonalMatrix.h:311
Eigen::Product
Expression of the product of two arbitrary matrices or vectors.
Definition: Product.h:71
cwiseInverse
const EIGEN_DEVICE_FUNC CwiseInverseReturnType cwiseInverse() const
Definition: MatrixCwiseUnaryOps.h:84
pybind_wrapper_test_script.z
z
Definition: pybind_wrapper_test_script.py:61
Eigen::DiagonalBase::DiagonalVectorType
internal::traits< Derived >::DiagonalVectorType DiagonalVectorType
Definition: DiagonalMatrix.h:21
Eigen::DiagonalMatrix::diagonal
EIGEN_DEVICE_FUNC DiagonalVectorType & diagonal()
Definition: DiagonalMatrix.h:163
Eigen::internal::traits< DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime > >::DiagonalVectorType
Matrix< _Scalar, SizeAtCompileTime, 1, 0, MaxSizeAtCompileTime, 1 > DiagonalVectorType
Definition: DiagonalMatrix.h:132
EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE
#define EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(EXPR, SCALAR, OPNAME)
Definition: Macros.h:1347
Eigen::DiagonalMatrix::operator=
EIGEN_DEVICE_FUNC DiagonalMatrix & operator=(const DiagonalBase< OtherDerived > &other)
Definition: DiagonalMatrix.h:224
Eigen::DiagonalWrapper
Expression of a diagonal matrix.
Definition: DiagonalMatrix.h:293
Eigen::DiagonalBase::inverse
const EIGEN_DEVICE_FUNC InverseReturnType inverse() const
Definition: DiagonalMatrix.h:69
Eigen::DiagonalBase::RealScalar
DiagonalVectorType::RealScalar RealScalar
Definition: DiagonalMatrix.h:23
y
Scalar * y
Definition: level1_cplx_impl.h:124
matrix
Map< Matrix< T, Dynamic, Dynamic, ColMajor >, 0, OuterStride<> > matrix(T *data, int rows, int cols, int stride)
Definition: gtsam/3rdparty/Eigen/blas/common.h:110
Eigen::DiagonalMatrix::m_diagonal
DiagonalVectorType m_diagonal
Definition: DiagonalMatrix.h:154
Eigen::DiagonalMatrix::operator=
EIGEN_DEVICE_FUNC DiagonalMatrix & operator=(const DiagonalMatrix &other)
Definition: DiagonalMatrix.h:235
Eigen::DiagonalBase::InverseReturnType
DiagonalWrapper< const CwiseUnaryOp< internal::scalar_inverse_op< Scalar >, const DiagonalVectorType > > InverseReturnType
Definition: DiagonalMatrix.h:66
Eigen::internal::assign_op
Definition: AssignmentFunctors.h:21
Eigen::internal::Assignment< DstXprType, SrcXprType, Functor, Diagonal2Dense >::run
static void run(DstXprType &dst, const SrcXprType &src, const internal::add_assign_op< typename DstXprType::Scalar, typename SrcXprType::Scalar > &)
Definition: DiagonalMatrix.h:380
Eigen::DiagonalWrapper::DiagonalWrapper
EIGEN_DEVICE_FUNC DiagonalWrapper(DiagonalVectorType &a_diagonal)
Definition: DiagonalMatrix.h:304
RealScalar
NumTraits< Scalar >::Real RealScalar
Definition: bench_gemm.cpp:47
Eigen::internal::traits< DiagonalWrapper< _DiagonalVectorType > >::StorageKind
DiagonalShape StorageKind
Definition: DiagonalMatrix.h:280
Eigen::DiagonalMatrix::DiagonalVectorType
internal::traits< DiagonalMatrix >::DiagonalVectorType DiagonalVectorType
Definition: DiagonalMatrix.h:145
Eigen::DiagonalBase::operator*
const EIGEN_DEVICE_FUNC Product< Derived, MatrixDerived, LazyProduct > operator*(const MatrixBase< MatrixDerived > &matrix) const
Definition: DiagonalMatrix.h:61
Eigen::internal::traits
Definition: ForwardDeclarations.h:17
Eigen::DiagonalMatrix::Scalar
_Scalar Scalar
Definition: DiagonalMatrix.h:147
Eigen::DiagonalMatrix::Nested
const typedef DiagonalMatrix & Nested
Definition: DiagonalMatrix.h:146
align_3::a2
Point2 a2
Definition: testPose2.cpp:770
args
Definition: pytypes.h:2210
Eigen::internal::sub_assign_op
Definition: AssignmentFunctors.h:67
Eigen::internal::Assignment
Definition: AssignEvaluator.h:824
Eigen::DiagonalWrapper::diagonal
const EIGEN_DEVICE_FUNC DiagonalVectorType & diagonal() const
Definition: DiagonalMatrix.h:308
Eigen::internal::traits< DiagonalWrapper< _DiagonalVectorType > >::StorageIndex
DiagonalVectorType::StorageIndex StorageIndex
Definition: DiagonalMatrix.h:279
product
void product(const MatrixType &m)
Definition: product.h:20
Eigen::DiagonalBase::MaxRowsAtCompileTime
@ MaxRowsAtCompileTime
Definition: DiagonalMatrix.h:30
Eigen::internal::Assignment< DstXprType, SrcXprType, Functor, Diagonal2Dense >::run
static void run(DstXprType &dst, const SrcXprType &src, const internal::assign_op< typename DstXprType::Scalar, typename SrcXprType::Scalar > &)
Definition: DiagonalMatrix.h:369
Eigen::DiagonalMatrix::DiagonalMatrix
DiagonalMatrix(const DiagonalMatrix &other)
Definition: DiagonalMatrix.h:212
Eigen::internal::no_assignment_operator
Definition: XprHelper.h:109
Eigen::Matrix
The matrix class, also used for vectors and row-vectors.
Definition: 3rdparty/Eigen/Eigen/src/Core/Matrix.h:178
Eigen::numext::abs
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE internal::enable_if< NumTraits< T >::IsSigned||NumTraits< T >::IsComplex, typename NumTraits< T >::Real >::type abs(const T &x)
Definition: Eigen/src/Core/MathFunctions.h:1511
Eigen::internal::add_assign_op
Definition: AssignmentFunctors.h:46
Eigen::DiagonalBase::operator+
const EIGEN_DEVICE_FUNC DiagonalWrapper< const EIGEN_CWISE_BINARY_RETURN_TYPE(DiagonalVectorType, typename OtherDerived::DiagonalVectorType, sum) > operator+(const DiagonalBase< OtherDerived > &other) const
Definition: DiagonalMatrix.h:94
internal
Definition: BandTriangularSolver.h:13
Eigen::MatrixBase
Base class for all dense matrices, vectors, and expressions.
Definition: MatrixBase.h:48
Eigen::internal::Assignment< DstXprType, SrcXprType, Functor, Diagonal2Dense >::run
static void run(DstXprType &dst, const SrcXprType &src, const internal::sub_assign_op< typename DstXprType::Scalar, typename SrcXprType::Scalar > &)
Definition: DiagonalMatrix.h:383
Eigen::DiagonalMatrix::DiagonalMatrix
EIGEN_DEVICE_FUNC DiagonalMatrix(const DiagonalBase< OtherDerived > &other)
Definition: DiagonalMatrix.h:208
Eigen::NoPreferredStorageOrderBit
const unsigned int NoPreferredStorageOrderBit
Definition: Constants.h:178
cols
int cols
Definition: Tutorial_commainit_02.cpp:1
Eigen::DiagonalMatrix::DiagonalMatrix
EIGEN_DEVICE_FUNC DiagonalMatrix(const Scalar &x, const Scalar &y, const Scalar &z)
Definition: DiagonalMatrix.h:179
Eigen::DiagonalBase::ColsAtCompileTime
@ ColsAtCompileTime
Definition: DiagonalMatrix.h:29
Eigen::internal::traits< DiagonalWrapper< _DiagonalVectorType > >::XprKind
traits< DiagonalVectorType >::XprKind XprKind
Definition: DiagonalMatrix.h:281
Eigen::DiagonalMatrix::setZero
EIGEN_DEVICE_FUNC void setZero(Index size)
Definition: DiagonalMatrix.h:250
Eigen::DiagonalMatrix::setIdentity
EIGEN_DEVICE_FUNC void setIdentity()
Definition: DiagonalMatrix.h:253
Eigen::DiagonalBase
Definition: DiagonalMatrix.h:18
Eigen::DiagonalMatrix::DiagonalMatrix
EIGEN_DEVICE_FUNC DiagonalMatrix(const MatrixBase< OtherDerived > &other)
Definition: DiagonalMatrix.h:218
Eigen::DiagonalBase::operator*
const EIGEN_DEVICE_FUNC DiagonalWrapper< const EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(DiagonalVectorType, Scalar, product) > operator*(const Scalar &scalar) const
Definition: DiagonalMatrix.h:76
Eigen::internal::storage_kind_to_shape< DiagonalShape >::Shape
DiagonalShape Shape
Definition: DiagonalMatrix.h:359
i
int i
Definition: BiCGSTAB_step_by_step.cpp:9
pybind_wrapper_test_script.other
other
Definition: pybind_wrapper_test_script.py:42
Eigen::DiagonalMatrix::setZero
EIGEN_DEVICE_FUNC void setZero()
Definition: DiagonalMatrix.h:247
EIGEN_CWISE_BINARY_RETURN_TYPE
#define EIGEN_CWISE_BINARY_RETURN_TYPE(LHS, RHS, OPNAME)
Definition: Macros.h:1326
Eigen::DiagonalBase::derived
EIGEN_DEVICE_FUNC Derived & derived()
Definition: DiagonalMatrix.h:43
Eigen::internal::AssignmentKind
Definition: AssignEvaluator.h:811
Scalar
SCALAR Scalar
Definition: bench_gemm.cpp:46
Eigen::Index
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:74
Eigen::DiagonalShape
Definition: Constants.h:531


gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:02:13