TriangularMatrix.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) 2008 Benoit Jacob <jacob.benoit.1@gmail.com>
5 // Copyright (C) 2008-2009 Gael Guennebaud <gael.guennebaud@inria.fr>
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_TRIANGULARMATRIX_H
12 #define EIGEN_TRIANGULARMATRIX_H
13 
14 namespace Eigen {
15 
16 namespace internal {
17 
18 template<int Side, typename TriangularType, typename Rhs> struct triangular_solve_retval;
19 
20 }
21 
27 template<typename Derived> class TriangularBase : public EigenBase<Derived>
28 {
29  public:
30 
31  enum {
37 
46 
47  };
53  typedef Derived const& Nested;
54 
56  inline TriangularBase() { eigen_assert(!((int(Mode) & int(UnitDiag)) && (int(Mode) & int(ZeroDiag)))); }
57 
59  inline Index rows() const EIGEN_NOEXCEPT { return derived().rows(); }
61  inline Index cols() const EIGEN_NOEXCEPT { return derived().cols(); }
63  inline Index outerStride() const EIGEN_NOEXCEPT { return derived().outerStride(); }
65  inline Index innerStride() const EIGEN_NOEXCEPT { return derived().innerStride(); }
66 
67  // dummy resize function
70  {
73  eigen_assert(rows==this->rows() && cols==this->cols());
74  }
75 
77  inline Scalar coeff(Index row, Index col) const { return derived().coeff(row,col); }
79  inline Scalar& coeffRef(Index row, Index col) { return derived().coeffRef(row,col); }
80 
83  template<typename Other>
86  {
87  derived().coeffRef(row, col) = other.coeff(row, col);
88  }
89 
92  {
94  return coeff(row,col);
95  }
98  {
100  return coeffRef(row,col);
101  }
102 
103  #ifndef EIGEN_PARSED_BY_DOXYGEN
105  inline const Derived& derived() const { return *static_cast<const Derived*>(this); }
107  inline Derived& derived() { return *static_cast<Derived*>(this); }
108  #endif // not EIGEN_PARSED_BY_DOXYGEN
109 
110  template<typename DenseDerived>
113  template<typename DenseDerived>
116 
119  {
121  evalToLazy(res);
122  return res;
123  }
124 
125  protected:
126 
128  {
131  eigen_assert(col>=0 && col<cols() && row>=0 && row<rows());
132  const int mode = int(Mode) & ~SelfAdjoint;
134  eigen_assert((mode==Upper && col>=row)
135  || (mode==Lower && col<=row)
136  || ((mode==StrictlyUpper || mode==UnitUpper) && col>row)
137  || ((mode==StrictlyLower || mode==UnitLower) && col<row));
138  }
139 
140  #ifdef EIGEN_INTERNAL_DEBUGGING
142  {
144  }
145  #else
147  #endif
148 
149 };
150 
168 namespace internal {
169 template<typename MatrixType, unsigned int _Mode>
170 struct traits<TriangularView<MatrixType, _Mode> > : traits<MatrixType>
171 {
175  typedef typename MatrixType::PlainObject FullMatrixType;
177  enum {
178  Mode = _Mode,
179  FlagsLvalueBit = is_lvalue<MatrixType>::value ? LvalueBit : 0,
180  Flags = (MatrixTypeNestedCleaned::Flags & (HereditaryBits | FlagsLvalueBit) & (~(PacketAccessBit | DirectAccessBit | LinearAccessBit)))
181  };
182 };
183 }
184 
185 template<typename _MatrixType, unsigned int _Mode, typename StorageKind> class TriangularViewImpl;
186 
187 template<typename _MatrixType, unsigned int _Mode> class TriangularView
188  : public TriangularViewImpl<_MatrixType, _Mode, typename internal::traits<_MatrixType>::StorageKind >
189 {
190  public:
191 
194  typedef _MatrixType MatrixType;
195 
196  protected:
199 
202 
203  public:
204 
207 
208  enum {
209  Mode = _Mode,
212  | (Mode & Lower ? Upper : 0)
213  | (Mode & (UnitDiag))
214  | (Mode & (ZeroDiag)),
216  };
217 
220  {}
221 
223 
224 
226  inline Index rows() const EIGEN_NOEXCEPT { return m_matrix.rows(); }
229  inline Index cols() const EIGEN_NOEXCEPT { return m_matrix.cols(); }
230 
233  const NestedExpression& nestedExpression() const { return m_matrix; }
234 
238 
242  inline const ConjugateReturnType conjugate() const
243  { return ConjugateReturnType(m_matrix.conjugate()); }
244 
248  template<bool Cond>
251  conjugateIf() const
252  {
254  return ReturnType(m_matrix.template conjugateIf<Cond>());
255  }
256 
260  inline const AdjointReturnType adjoint() const
261  { return AdjointReturnType(m_matrix.adjoint()); }
262 
267  {
269  typename MatrixType::TransposeReturnType tmp(m_matrix);
270  return TransposeReturnType(tmp);
271  }
272 
276  inline const ConstTransposeReturnType transpose() const
277  {
278  return ConstTransposeReturnType(m_matrix.transpose());
279  }
280 
281  template<typename Other>
283  inline const Solve<TriangularView, Other>
285  { return Solve<TriangularView, Other>(*this, other.derived()); }
286 
287  // workaround MSVC ICE
288  #if EIGEN_COMP_MSVC
289  template<int Side, typename Other>
292  solve(const MatrixBase<Other>& other) const
293  { return Base::template solve<Side>(other); }
294  #else
295  using Base::solve;
296  #endif
297 
304  {
305  EIGEN_STATIC_ASSERT((Mode&(UnitDiag|ZeroDiag))==0,PROGRAMMING_ERROR);
307  }
308 
312  {
313  EIGEN_STATIC_ASSERT((Mode&(UnitDiag|ZeroDiag))==0,PROGRAMMING_ERROR);
315  }
316 
317 
322  {
323  if (Mode & UnitDiag)
324  return 1;
325  else if (Mode & ZeroDiag)
326  return 0;
327  else
328  return m_matrix.diagonal().prod();
329  }
330 
331  protected:
332 
334 };
335 
345 template<typename _MatrixType, unsigned int _Mode> class TriangularViewImpl<_MatrixType,_Mode,Dense>
346  : public TriangularBase<TriangularView<_MatrixType, _Mode> >
347 {
348  public:
349 
353 
354  typedef _MatrixType MatrixType;
355  typedef typename MatrixType::PlainObject DenseMatrixType;
357 
358  public:
359  using Base::evalToLazy;
360  using Base::derived;
361 
363 
364  enum {
365  Mode = _Mode,
367  };
368 
372  inline Index outerStride() const { return derived().nestedExpression().outerStride(); }
376  inline Index innerStride() const { return derived().nestedExpression().innerStride(); }
377 
379  template<typename Other>
383  return derived();
384  }
386  template<typename Other>
390  return derived();
391  }
392 
399 
402  void fill(const Scalar& value) { setConstant(value); }
406  { return *this = MatrixType::Constant(derived().rows(), derived().cols(), value); }
413 
418  inline Scalar coeff(Index row, Index col) const
419  {
420  Base::check_coordinates_internal(row, col);
421  return derived().nestedExpression().coeff(row, col);
422  }
423 
429  {
431  Base::check_coordinates_internal(row, col);
432  return derived().nestedExpression().coeffRef(row, col);
433  }
434 
436  template<typename OtherDerived>
438  TriangularViewType& operator=(const TriangularBase<OtherDerived>& other);
439 
441  template<typename OtherDerived>
443  TriangularViewType& operator=(const MatrixBase<OtherDerived>& other);
444 
445 #ifndef EIGEN_PARSED_BY_DOXYGEN
448  { return *this = other.derived().nestedExpression(); }
449 
450  template<typename OtherDerived>
453  void lazyAssign(const TriangularBase<OtherDerived>& other);
454 
455  template<typename OtherDerived>
458  void lazyAssign(const MatrixBase<OtherDerived>& other);
459 #endif
460 
462  template<typename OtherDerived>
466  {
467  return Product<TriangularViewType,OtherDerived>(derived(), rhs.derived());
468  }
469 
471  template<typename OtherDerived> friend
475  {
476  return Product<OtherDerived,TriangularViewType>(lhs.derived(),rhs.derived());
477  }
478 
502  template<int Side, typename Other>
504  solve(const MatrixBase<Other>& other) const;
505 
515  template<int Side, typename OtherDerived>
517  void solveInPlace(const MatrixBase<OtherDerived>& other) const;
518 
519  template<typename OtherDerived>
522  { return solveInPlace<OnTheLeft>(other); }
523 
525  template<typename OtherDerived>
527 #ifdef EIGEN_PARSED_BY_DOXYGEN
529 #else
531 #endif
532  {
533  EIGEN_STATIC_ASSERT_LVALUE(OtherDerived);
534  call_assignment(derived(), other.const_cast_derived(), internal::swap_assign_op<Scalar>());
535  }
536 
538  template<typename OtherDerived>
542  {
543  EIGEN_STATIC_ASSERT_LVALUE(OtherDerived);
544  call_assignment(derived(), other.const_cast_derived(), internal::swap_assign_op<Scalar>());
545  }
546 
547  template<typename RhsType, typename DstType>
549  EIGEN_STRONG_INLINE void _solve_impl(const RhsType &rhs, DstType &dst) const {
550  if(!internal::is_same_dense(dst,rhs))
551  dst = rhs;
552  this->solveInPlace(dst);
553  }
554 
555  template<typename ProductType>
557  EIGEN_STRONG_INLINE TriangularViewType& _assignProduct(const ProductType& prod, const Scalar& alpha, bool beta);
558  protected:
561 
562 };
563 
564 /***************************************************************************
565 * Implementation of triangular evaluation/assignment
566 ***************************************************************************/
567 
568 #ifndef EIGEN_PARSED_BY_DOXYGEN
569 // FIXME should we keep that possibility
570 template<typename MatrixType, unsigned int Mode>
571 template<typename OtherDerived>
572 EIGEN_DEVICE_FUNC inline TriangularView<MatrixType, Mode>&
573 TriangularViewImpl<MatrixType, Mode, Dense>::operator=(const MatrixBase<OtherDerived>& other)
574 {
575  internal::call_assignment_no_alias(derived(), other.derived(), internal::assign_op<Scalar,typename OtherDerived::Scalar>());
576  return derived();
577 }
578 
579 // FIXME should we keep that possibility
580 template<typename MatrixType, unsigned int Mode>
581 template<typename OtherDerived>
582 EIGEN_DEVICE_FUNC void TriangularViewImpl<MatrixType, Mode, Dense>::lazyAssign(const MatrixBase<OtherDerived>& other)
583 {
584  internal::call_assignment_no_alias(derived(), other.template triangularView<Mode>());
585 }
586 
587 
588 
589 template<typename MatrixType, unsigned int Mode>
590 template<typename OtherDerived>
591 EIGEN_DEVICE_FUNC inline TriangularView<MatrixType, Mode>&
592 TriangularViewImpl<MatrixType, Mode, Dense>::operator=(const TriangularBase<OtherDerived>& other)
593 {
594  eigen_assert(Mode == int(OtherDerived::Mode));
595  internal::call_assignment(derived(), other.derived());
596  return derived();
597 }
598 
599 template<typename MatrixType, unsigned int Mode>
600 template<typename OtherDerived>
601 EIGEN_DEVICE_FUNC void TriangularViewImpl<MatrixType, Mode, Dense>::lazyAssign(const TriangularBase<OtherDerived>& other)
602 {
603  eigen_assert(Mode == int(OtherDerived::Mode));
604  internal::call_assignment_no_alias(derived(), other.derived());
605 }
606 #endif
607 
608 /***************************************************************************
609 * Implementation of TriangularBase methods
610 ***************************************************************************/
611 
614 template<typename Derived>
615 template<typename DenseDerived>
617 {
618  evalToLazy(other.derived());
619 }
620 
621 /***************************************************************************
622 * Implementation of TriangularView methods
623 ***************************************************************************/
624 
625 /***************************************************************************
626 * Implementation of MatrixBase methods
627 ***************************************************************************/
628 
640 template<typename Derived>
641 template<unsigned int Mode>
645 {
646  return typename TriangularViewReturnType<Mode>::Type(derived());
647 }
648 
650 template<typename Derived>
651 template<unsigned int Mode>
655 {
656  return typename ConstTriangularViewReturnType<Mode>::Type(derived());
657 }
658 
664 template<typename Derived>
666 {
667  RealScalar maxAbsOnUpperPart = static_cast<RealScalar>(-1);
668  for(Index j = 0; j < cols(); ++j)
669  {
670  Index maxi = numext::mini(j, rows()-1);
671  for(Index i = 0; i <= maxi; ++i)
672  {
673  RealScalar absValue = numext::abs(coeff(i,j));
674  if(absValue > maxAbsOnUpperPart) maxAbsOnUpperPart = absValue;
675  }
676  }
677  RealScalar threshold = maxAbsOnUpperPart * prec;
678  for(Index j = 0; j < cols(); ++j)
679  for(Index i = j+1; i < rows(); ++i)
680  if(numext::abs(coeff(i, j)) > threshold) return false;
681  return true;
682 }
683 
689 template<typename Derived>
691 {
692  RealScalar maxAbsOnLowerPart = static_cast<RealScalar>(-1);
693  for(Index j = 0; j < cols(); ++j)
694  for(Index i = j; i < rows(); ++i)
695  {
696  RealScalar absValue = numext::abs(coeff(i,j));
697  if(absValue > maxAbsOnLowerPart) maxAbsOnLowerPart = absValue;
698  }
699  RealScalar threshold = maxAbsOnLowerPart * prec;
700  for(Index j = 1; j < cols(); ++j)
701  {
702  Index maxi = numext::mini(j, rows()-1);
703  for(Index i = 0; i < maxi; ++i)
704  if(numext::abs(coeff(i, j)) > threshold) return false;
705  }
706  return true;
707 }
708 
709 
710 /***************************************************************************
711 ****************************************************************************
712 * Evaluators and Assignment of triangular expressions
713 ***************************************************************************
714 ***************************************************************************/
715 
716 namespace internal {
717 
718 
719 // TODO currently a triangular expression has the form TriangularView<.,.>
720 // in the future triangular-ness should be defined by the expression traits
721 // such that Transpose<TriangularView<.,.> > is valid. (currently TriangularBase::transpose() is overloaded to make it work)
722 template<typename MatrixType, unsigned int Mode>
723 struct evaluator_traits<TriangularView<MatrixType,Mode> >
724 {
726  typedef typename glue_shapes<typename evaluator_traits<MatrixType>::Shape, TriangularShape>::type Shape;
727 };
728 
729 template<typename MatrixType, unsigned int Mode>
731  : evaluator<typename internal::remove_all<MatrixType>::type>
732 {
736  unary_evaluator(const XprType &xpr) : Base(xpr.nestedExpression()) {}
737 };
738 
739 // Additional assignment kinds:
741 struct Triangular2Dense {};
742 struct Dense2Triangular {};
743 
744 
745 template<typename Kernel, unsigned int Mode, int UnrollCount, bool ClearOpposite> struct triangular_assignment_loop;
746 
747 
753 template<int UpLo, int Mode, int SetOpposite, typename DstEvaluatorTypeT, typename SrcEvaluatorTypeT, typename Functor, int Version = Specialized>
754 class triangular_dense_assignment_kernel : public generic_dense_assignment_kernel<DstEvaluatorTypeT, SrcEvaluatorTypeT, Functor, Version>
755 {
756 protected:
758  typedef typename Base::DstXprType DstXprType;
759  typedef typename Base::SrcXprType SrcXprType;
760  using Base::m_dst;
761  using Base::m_src;
763 public:
764 
765  typedef typename Base::DstEvaluatorType DstEvaluatorType;
766  typedef typename Base::SrcEvaluatorType SrcEvaluatorType;
767  typedef typename Base::Scalar Scalar;
768  typedef typename Base::AssignmentTraits AssignmentTraits;
769 
770 
772  : Base(dst, src, func, dstExpr)
773  {}
774 
775 #ifdef EIGEN_INTERNAL_DEBUGGING
777  {
780  }
781 #else
782  using Base::assignCoeff;
783 #endif
784 
786  {
787  if(Mode==UnitDiag && SetOpposite) m_functor.assignCoeff(m_dst.coeffRef(id,id), Scalar(1));
788  else if(Mode==ZeroDiag && SetOpposite) m_functor.assignCoeff(m_dst.coeffRef(id,id), Scalar(0));
789  else if(Mode==0) Base::assignCoeff(id,id);
790  }
791 
793  {
795  if(SetOpposite)
796  m_functor.assignCoeff(m_dst.coeffRef(row,col), Scalar(0));
797  }
798 };
799 
800 template<int Mode, bool SetOpposite, typename DstXprType, typename SrcXprType, typename Functor>
802 void call_triangular_assignment_loop(DstXprType& dst, const SrcXprType& src, const Functor &func)
803 {
804  typedef evaluator<DstXprType> DstEvaluatorType;
805  typedef evaluator<SrcXprType> SrcEvaluatorType;
806 
807  SrcEvaluatorType srcEvaluator(src);
808 
809  Index dstRows = src.rows();
810  Index dstCols = src.cols();
811  if((dst.rows()!=dstRows) || (dst.cols()!=dstCols))
812  dst.resize(dstRows, dstCols);
813  DstEvaluatorType dstEvaluator(dst);
814 
815  typedef triangular_dense_assignment_kernel< Mode&(Lower|Upper),Mode&(UnitDiag|ZeroDiag|SelfAdjoint),SetOpposite,
816  DstEvaluatorType,SrcEvaluatorType,Functor> Kernel;
817  Kernel kernel(dstEvaluator, srcEvaluator, func, dst.const_cast_derived());
818 
819  enum {
820  unroll = DstXprType::SizeAtCompileTime != Dynamic
821  && SrcEvaluatorType::CoeffReadCost < HugeCost
822  && DstXprType::SizeAtCompileTime * (int(DstEvaluatorType::CoeffReadCost) + int(SrcEvaluatorType::CoeffReadCost)) / 2 <= EIGEN_UNROLLING_LIMIT
823  };
824 
825  triangular_assignment_loop<Kernel, Mode, unroll ? int(DstXprType::SizeAtCompileTime) : Dynamic, SetOpposite>::run(kernel);
826 }
827 
828 template<int Mode, bool SetOpposite, typename DstXprType, typename SrcXprType>
830 void call_triangular_assignment_loop(DstXprType& dst, const SrcXprType& src)
831 {
832  call_triangular_assignment_loop<Mode,SetOpposite>(dst, src, internal::assign_op<typename DstXprType::Scalar,typename SrcXprType::Scalar>());
833 }
834 
836 template<> struct AssignmentKind<DenseShape,TriangularShape> { typedef Triangular2Dense Kind; };
837 template<> struct AssignmentKind<TriangularShape,DenseShape> { typedef Dense2Triangular Kind; };
838 
839 
840 template< typename DstXprType, typename SrcXprType, typename Functor>
841 struct Assignment<DstXprType, SrcXprType, Functor, Triangular2Triangular>
842 {
843  EIGEN_DEVICE_FUNC static void run(DstXprType &dst, const SrcXprType &src, const Functor &func)
844  {
845  eigen_assert(int(DstXprType::Mode) == int(SrcXprType::Mode));
846 
847  call_triangular_assignment_loop<DstXprType::Mode, false>(dst, src, func);
848  }
849 };
850 
851 template< typename DstXprType, typename SrcXprType, typename Functor>
852 struct Assignment<DstXprType, SrcXprType, Functor, Triangular2Dense>
853 {
854  EIGEN_DEVICE_FUNC static void run(DstXprType &dst, const SrcXprType &src, const Functor &func)
855  {
856  call_triangular_assignment_loop<SrcXprType::Mode, (int(SrcXprType::Mode) & int(SelfAdjoint)) == 0>(dst, src, func);
857  }
858 };
859 
860 template< typename DstXprType, typename SrcXprType, typename Functor>
861 struct Assignment<DstXprType, SrcXprType, Functor, Dense2Triangular>
862 {
863  EIGEN_DEVICE_FUNC static void run(DstXprType &dst, const SrcXprType &src, const Functor &func)
864  {
865  call_triangular_assignment_loop<DstXprType::Mode, false>(dst, src, func);
866  }
867 };
868 
869 
870 template<typename Kernel, unsigned int Mode, int UnrollCount, bool SetOpposite>
872 {
873  // FIXME: this is not very clean, perhaps this information should be provided by the kernel?
874  typedef typename Kernel::DstEvaluatorType DstEvaluatorType;
875  typedef typename DstEvaluatorType::XprType DstXprType;
876 
877  enum {
878  col = (UnrollCount-1) / DstXprType::RowsAtCompileTime,
879  row = (UnrollCount-1) % DstXprType::RowsAtCompileTime
880  };
881 
882  typedef typename Kernel::Scalar Scalar;
883 
885  static inline void run(Kernel &kernel)
886  {
888 
889  if(row==col)
890  kernel.assignDiagonalCoeff(row);
891  else if( ((Mode&Lower) && row>col) || ((Mode&Upper) && row<col) )
892  kernel.assignCoeff(row,col);
893  else if(SetOpposite)
894  kernel.assignOppositeCoeff(row,col);
895  }
896 };
897 
898 // prevent buggy user code from causing an infinite recursion
899 template<typename Kernel, unsigned int Mode, bool SetOpposite>
900 struct triangular_assignment_loop<Kernel, Mode, 0, SetOpposite>
901 {
903  static inline void run(Kernel &) {}
904 };
905 
906 
907 
908 // TODO: experiment with a recursive assignment procedure splitting the current
909 // triangular part into one rectangular and two triangular parts.
910 
911 
912 template<typename Kernel, unsigned int Mode, bool SetOpposite>
913 struct triangular_assignment_loop<Kernel, Mode, Dynamic, SetOpposite>
914 {
915  typedef typename Kernel::Scalar Scalar;
917  static inline void run(Kernel &kernel)
918  {
919  for(Index j = 0; j < kernel.cols(); ++j)
920  {
921  Index maxi = numext::mini(j, kernel.rows());
922  Index i = 0;
923  if (((Mode&Lower) && SetOpposite) || (Mode&Upper))
924  {
925  for(; i < maxi; ++i)
926  if(Mode&Upper) kernel.assignCoeff(i, j);
927  else kernel.assignOppositeCoeff(i, j);
928  }
929  else
930  i = maxi;
931 
932  if(i<kernel.rows()) // then i==j
933  kernel.assignDiagonalCoeff(i++);
934 
935  if (((Mode&Upper) && SetOpposite) || (Mode&Lower))
936  {
937  for(; i < kernel.rows(); ++i)
938  if(Mode&Lower) kernel.assignCoeff(i, j);
939  else kernel.assignOppositeCoeff(i, j);
940  }
941  }
942  }
943 };
944 
945 } // end namespace internal
946 
949 template<typename Derived>
950 template<typename DenseDerived>
952 {
953  other.derived().resize(this->rows(), this->cols());
954  internal::call_triangular_assignment_loop<Derived::Mode, (int(Derived::Mode) & int(SelfAdjoint)) == 0 /* SetOpposite */>(other.derived(), derived().nestedExpression());
955 }
956 
957 namespace internal {
958 
959 // Triangular = Product
960 template< typename DstXprType, typename Lhs, typename Rhs, typename Scalar>
961 struct Assignment<DstXprType, Product<Lhs,Rhs,DefaultProduct>, internal::assign_op<Scalar,typename Product<Lhs,Rhs,DefaultProduct>::Scalar>, Dense2Triangular>
962 {
964  static void run(DstXprType &dst, const SrcXprType &src, const internal::assign_op<Scalar,typename SrcXprType::Scalar> &)
965  {
966  Index dstRows = src.rows();
967  Index dstCols = src.cols();
968  if((dst.rows()!=dstRows) || (dst.cols()!=dstCols))
969  dst.resize(dstRows, dstCols);
970 
971  dst._assignProduct(src, Scalar(1), false);
972  }
973 };
974 
975 // Triangular += Product
976 template< typename DstXprType, typename Lhs, typename Rhs, typename Scalar>
977 struct Assignment<DstXprType, Product<Lhs,Rhs,DefaultProduct>, internal::add_assign_op<Scalar,typename Product<Lhs,Rhs,DefaultProduct>::Scalar>, Dense2Triangular>
978 {
980  static void run(DstXprType &dst, const SrcXprType &src, const internal::add_assign_op<Scalar,typename SrcXprType::Scalar> &)
981  {
982  dst._assignProduct(src, Scalar(1), true);
983  }
984 };
985 
986 // Triangular -= Product
987 template< typename DstXprType, typename Lhs, typename Rhs, typename Scalar>
988 struct Assignment<DstXprType, Product<Lhs,Rhs,DefaultProduct>, internal::sub_assign_op<Scalar,typename Product<Lhs,Rhs,DefaultProduct>::Scalar>, Dense2Triangular>
989 {
991  static void run(DstXprType &dst, const SrcXprType &src, const internal::sub_assign_op<Scalar,typename SrcXprType::Scalar> &)
992  {
993  dst._assignProduct(src, Scalar(-1), true);
994  }
995 };
996 
997 } // end namespace internal
998 
999 } // end namespace Eigen
1000 
1001 #endif // EIGEN_TRIANGULARMATRIX_H
Eigen::TriangularViewImpl< _MatrixType, _Mode, Dense >::swap
EIGEN_DEVICE_FUNC void swap(TriangularBase< OtherDerived > const &other)
Definition: TriangularMatrix.h:530
Eigen::TriangularViewImpl< _MatrixType, _Mode, Dense >::solveInPlace
EIGEN_DEVICE_FUNC void solveInPlace(const MatrixBase< OtherDerived > &other) const
Definition: TriangularMatrix.h:521
gtsam.examples.DogLegOptimizerExample.int
int
Definition: DogLegOptimizerExample.py:111
Eigen::internal::generic_dense_assignment_kernel::m_functor
const Functor & m_functor
Definition: AssignEvaluator.h:720
Eigen::TriangularBase::coeffRef
EIGEN_DEVICE_FUNC Scalar & coeffRef(Index row, Index col)
Definition: TriangularMatrix.h:79
Eigen::DefaultProduct
@ DefaultProduct
Definition: Constants.h:500
Eigen::TriangularViewImpl< _MatrixType, _Mode, Dense >::innerStride
EIGEN_DEVICE_FUNC Index innerStride() const
Definition: TriangularMatrix.h:376
Eigen::internal::Assignment< DstXprType, Product< Lhs, Rhs, DefaultProduct >, internal::assign_op< Scalar, typename Product< Lhs, Rhs, DefaultProduct >::Scalar >, Dense2Triangular >::run
static void run(DstXprType &dst, const SrcXprType &src, const internal::assign_op< Scalar, typename SrcXprType::Scalar > &)
Definition: TriangularMatrix.h:964
Eigen::internal::Lhs
@ Lhs
Definition: TensorContractionMapper.h:19
Eigen::internal::AssignmentKind::Kind
EigenBase2EigenBase Kind
Definition: AssignEvaluator.h:817
Eigen::HugeCost
const int HugeCost
Definition: Constants.h:44
Eigen::TriangularView::MatrixTypeNestedNonRef
internal::traits< TriangularView >::MatrixTypeNestedNonRef MatrixTypeNestedNonRef
Definition: TriangularMatrix.h:198
EIGEN_DEVICE_FUNC
#define EIGEN_DEVICE_FUNC
Definition: Macros.h:976
Eigen::internal::generic_dense_assignment_kernel
Definition: AssignEvaluator.h:618
Eigen
Namespace containing all symbols from the Eigen library.
Definition: jet.h:637
Eigen::TriangularViewImpl< _MatrixType, _Mode, Dense >::Base
TriangularBase< TriangularViewType > Base
Definition: TriangularMatrix.h:351
Eigen::TriangularView::conjugateIf
EIGEN_DEVICE_FUNC internal::conditional< Cond, ConjugateReturnType, ConstTriangularView >::type conjugateIf() const
Definition: TriangularMatrix.h:251
Eigen::TriangularViewImpl< _MatrixType, _Mode, Dense >::swap
EIGEN_DEPRECATED EIGEN_DEVICE_FUNC void swap(MatrixBase< OtherDerived > const &other)
Definition: TriangularMatrix.h:541
Eigen::internal::traits< TriangularView< MatrixType, _Mode > >::MatrixTypeNestedCleaned
remove_all< MatrixTypeNested >::type MatrixTypeNestedCleaned
Definition: TriangularMatrix.h:174
Eigen::internal::triangular_assignment_loop::DstEvaluatorType
Kernel::DstEvaluatorType DstEvaluatorType
Definition: TriangularMatrix.h:878
EIGEN_UNROLLING_LIMIT
#define EIGEN_UNROLLING_LIMIT
Definition: Settings.h:24
col
m col(1)
Eigen::TriangularView::TriangularView
EIGEN_DEVICE_FUNC TriangularView(MatrixType &matrix)
Definition: TriangularMatrix.h:219
alpha
RealScalar alpha
Definition: level1_cplx_impl.h:147
Eigen::CwiseBinaryOp
Generic expression where a coefficient-wise binary operator is applied to two expressions.
Definition: CwiseBinaryOp.h:77
Eigen::EigenBase< SelfAdjointView< _MatrixType, UpLo > >::Index
Eigen::Index Index
The interface type of indices.
Definition: EigenBase.h:39
Eigen::DenseShape
Definition: Constants.h:528
EIGEN_DEFAULT_EMPTY_CONSTRUCTOR_AND_DESTRUCTOR
#define EIGEN_DEFAULT_EMPTY_CONSTRUCTOR_AND_DESTRUCTOR(Derived)
Definition: Macros.h:1247
MatrixType
MatrixXf MatrixType
Definition: benchmark-blocking-sizes.cpp:52
Eigen::internal::triangular_solve_retval
Definition: SolveTriangular.h:206
Eigen::internal::traits< TriangularView< MatrixType, _Mode > >::MatrixTypeNestedNonRef
remove_reference< MatrixTypeNested >::type MatrixTypeNestedNonRef
Definition: TriangularMatrix.h:173
Eigen::TriangularViewImpl< _MatrixType, _Mode, Dense >::operator=
EIGEN_DEVICE_FUNC TriangularViewType & operator=(const TriangularViewImpl &other)
Definition: TriangularMatrix.h:447
Eigen::internal::Triangular2Triangular
Definition: TriangularMatrix.h:744
Eigen::internal::triangular_assignment_loop::row
@ row
Definition: TriangularMatrix.h:883
Eigen::EigenBase
Definition: EigenBase.h:29
Eigen::internal::triangular_dense_assignment_kernel::assignOppositeCoeff
EIGEN_DEVICE_FUNC void assignOppositeCoeff(Index row, Index col)
Definition: TriangularMatrix.h:796
Eigen::TriangularView::rows
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index rows() const EIGEN_NOEXCEPT
Definition: TriangularMatrix.h:226
eigen_assert
#define eigen_assert(x)
Definition: Macros.h:1037
Eigen::TriangularBase::Mode
@ Mode
Definition: TriangularMatrix.h:32
Eigen::TriangularView::selfadjointView
const EIGEN_DEVICE_FUNC SelfAdjointView< MatrixTypeNestedNonRef, Mode > selfadjointView() const
Definition: TriangularMatrix.h:311
Eigen::TriangularBase::MaxSizeAtCompileTime
@ MaxSizeAtCompileTime
Definition: TriangularMatrix.h:44
Eigen::internal::is_lvalue
Definition: XprHelper.h:659
Eigen::TriangularView::TransposeReturnType
TriangularView< typename MatrixType::TransposeReturnType, TransposeMode > TransposeReturnType
Definition: TriangularMatrix.h:263
ret
DenseIndex ret
Definition: level1_cplx_impl.h:44
Eigen::UnitUpper
@ UnitUpper
Definition: Constants.h:219
Eigen::TriangularView::AdjointReturnType
TriangularView< const typename MatrixType::AdjointReturnType, TransposeMode > AdjointReturnType
Definition: TriangularMatrix.h:257
Eigen::TriangularView::IsVectorAtCompileTime
@ IsVectorAtCompileTime
Definition: TriangularMatrix.h:215
Eigen::TriangularBase::evalToLazy
EIGEN_DEVICE_FUNC void evalToLazy(MatrixBase< DenseDerived > &other) const
Definition: TriangularMatrix.h:951
EIGEN_CONSTEXPR
#define EIGEN_CONSTEXPR
Definition: Macros.h:787
Eigen::internal::triangular_assignment_loop::run
static EIGEN_DEVICE_FUNC void run(Kernel &kernel)
Definition: TriangularMatrix.h:889
Eigen::Upper
@ Upper
Definition: Constants.h:211
EIGEN_DEPRECATED
#define EIGEN_DEPRECATED
Definition: Macros.h:1058
Eigen::TriangularViewImpl< _MatrixType, _Mode, Dense >::operator*
friend const EIGEN_DEVICE_FUNC Product< OtherDerived, TriangularViewType > operator*(const MatrixBase< OtherDerived > &lhs, const TriangularViewImpl &rhs)
Definition: TriangularMatrix.h:474
Eigen::TriangularBase::outerStride
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index outerStride() const EIGEN_NOEXCEPT
Definition: TriangularMatrix.h:63
Eigen::TriangularView::MatrixConjugateReturnType
internal::remove_all< typename MatrixType::ConjugateReturnType >::type MatrixConjugateReturnType
Definition: TriangularMatrix.h:200
Eigen::TriangularView::cols
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index cols() const EIGEN_NOEXCEPT
Definition: TriangularMatrix.h:229
type
Definition: pytypes.h:1525
Eigen::TriangularView::m_matrix
MatrixTypeNested m_matrix
Definition: TriangularMatrix.h:333
Eigen::internal::triangular_dense_assignment_kernel::DstXprType
Base::DstXprType DstXprType
Definition: TriangularMatrix.h:762
Eigen::TriangularView::transpose
EIGEN_DEVICE_FUNC TransposeReturnType transpose()
Definition: TriangularMatrix.h:266
Eigen::SelfAdjointView
Expression of a selfadjoint matrix from a triangular part of a dense matrix.
Definition: SelfAdjointView.h:49
Eigen::internal::traits< TriangularView< MatrixType, _Mode > >::FullMatrixType
MatrixType::PlainObject FullMatrixType
Definition: TriangularMatrix.h:175
Eigen::TriangularView::ConstTransposeReturnType
TriangularView< const typename MatrixType::ConstTransposeReturnType, TransposeMode > ConstTransposeReturnType
Definition: TriangularMatrix.h:273
Eigen::TriangularBase::Nested
Derived const & Nested
Definition: TriangularMatrix.h:53
Eigen::TriangularBase::MaxRowsAtCompileTime
@ MaxRowsAtCompileTime
Definition: TriangularMatrix.h:35
Eigen::internal::copy_using_evaluator_traits
Definition: AssignEvaluator.h:28
res
cout<< "Here is the matrix m:"<< endl<< m<< endl;Matrix< ptrdiff_t, 3, 1 > res
Definition: PartialRedux_count.cpp:3
Eigen::internal::call_assignment_no_alias
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void call_assignment_no_alias(Dst &dst, const Src &src, const Func &func)
Definition: AssignEvaluator.h:873
Eigen::TriangularBase::copyCoeff
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void copyCoeff(Index row, Index col, Other &other)
Definition: TriangularMatrix.h:85
Eigen::TriangularBase::TriangularBase
EIGEN_DEVICE_FUNC TriangularBase()
Definition: TriangularMatrix.h:56
Eigen::TriangularViewImpl< _MatrixType, _Mode, Dense >::coeff
EIGEN_DEVICE_FUNC Scalar coeff(Index row, Index col) const
Definition: TriangularMatrix.h:418
beta
double beta(double a, double b)
Definition: beta.c:61
Eigen::TriangularBase::RowsAtCompileTime
@ RowsAtCompileTime
Definition: TriangularMatrix.h:33
Eigen::TriangularViewImpl< _MatrixType, _Mode, Dense >::coeffRef
EIGEN_DEVICE_FUNC Scalar & coeffRef(Index row, Index col)
Definition: TriangularMatrix.h:428
Eigen::internal::generic_dense_assignment_kernel::SrcEvaluatorType
SrcEvaluatorTypeT SrcEvaluatorType
Definition: AssignEvaluator.h:628
rows
int rows
Definition: Tutorial_commainit_02.cpp:1
Eigen::TriangularBase::cols
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index cols() const EIGEN_NOEXCEPT
Definition: TriangularMatrix.h:61
eigen_internal_assert
#define eigen_internal_assert(x)
Definition: Macros.h:1043
Eigen::DirectAccessBit
const unsigned int DirectAccessBit
Definition: Constants.h:155
Eigen::internal::generic_dense_assignment_kernel::DstEvaluatorType
DstEvaluatorTypeT DstEvaluatorType
Definition: AssignEvaluator.h:627
EIGEN_ONLY_USED_FOR_DEBUG
#define EIGEN_ONLY_USED_FOR_DEBUG(x)
Definition: Macros.h:1049
Eigen::PacketAccessBit
const unsigned int PacketAccessBit
Definition: Constants.h:94
Eigen::TriangularView::conjugate
const EIGEN_DEVICE_FUNC ConjugateReturnType conjugate() const
Definition: TriangularMatrix.h:242
Eigen::internal::generic_dense_assignment_kernel::Scalar
DstEvaluatorType::Scalar Scalar
Definition: AssignEvaluator.h:629
Eigen::internal::triangular_dense_assignment_kernel::AssignmentTraits
Base::AssignmentTraits AssignmentTraits
Definition: TriangularMatrix.h:772
Eigen::internal::triangular_dense_assignment_kernel::SrcEvaluatorType
Base::SrcEvaluatorType SrcEvaluatorType
Definition: TriangularMatrix.h:770
Eigen::StrictlyUpper
@ StrictlyUpper
Definition: Constants.h:223
Eigen::TriangularBase::innerStride
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index innerStride() const EIGEN_NOEXCEPT
Definition: TriangularMatrix.h:65
Eigen::internal::Dense2Triangular
Definition: TriangularMatrix.h:746
Eigen::TriangularBase::DenseMatrixType
internal::traits< Derived >::FullMatrixType DenseMatrixType
Definition: TriangularMatrix.h:51
Eigen::internal::true_type
Definition: Meta.h:96
Eigen::TriangularBase::DenseType
DenseMatrixType DenseType
Definition: TriangularMatrix.h:52
Functor
Definition: NonLinearOptimization.cpp:117
Eigen::DenseBase< Solve< Decomposition, RhsType > >::RealScalar
NumTraits< Scalar >::Real RealScalar
Definition: DenseBase.h:73
Eigen::TriangularView::MatrixTypeNested
internal::traits< TriangularView >::MatrixTypeNested MatrixTypeNested
Definition: TriangularMatrix.h:197
Eigen::TriangularViewImpl< _MatrixType, _Mode, Dense >::PlainObject
DenseMatrixType PlainObject
Definition: TriangularMatrix.h:356
Eigen::internal::triangular_dense_assignment_kernel::Base
generic_dense_assignment_kernel< DstEvaluatorTypeT, SrcEvaluatorTypeT, Functor, Version > Base
Definition: TriangularMatrix.h:761
Eigen::TriangularViewImpl< _MatrixType, _Mode, Dense >::outerStride
EIGEN_DEVICE_FUNC Index outerStride() const
Definition: TriangularMatrix.h:372
Eigen::TriangularViewImpl< _MatrixType, _Mode, Dense >::TriangularViewType
TriangularView< _MatrixType, _Mode > TriangularViewType
Definition: TriangularMatrix.h:350
EIGEN_UNUSED_VARIABLE
#define EIGEN_UNUSED_VARIABLE(var)
Definition: Macros.h:1076
j
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2
Eigen::TriangularView::ConstTriangularView
TriangularView< typename internal::add_const< MatrixType >::type, _Mode > ConstTriangularView
Definition: TriangularMatrix.h:201
Eigen::TriangularView::Scalar
internal::traits< TriangularView >::Scalar Scalar
Definition: TriangularMatrix.h:193
Eigen::LvalueBit
const unsigned int LvalueBit
Definition: Constants.h:144
Eigen::TriangularViewImpl< _MatrixType, _Mode, Dense >::setZero
EIGEN_DEVICE_FUNC TriangularViewType & setZero()
Definition: TriangularMatrix.h:409
Eigen::TriangularBase::operator()
EIGEN_DEVICE_FUNC Scalar operator()(Index row, Index col) const
Definition: TriangularMatrix.h:91
Eigen::internal::triangular_assignment_loop::col
@ col
Definition: TriangularMatrix.h:882
Eigen::internal::triangular_assignment_loop::DstXprType
DstEvaluatorType::XprType DstXprType
Definition: TriangularMatrix.h:879
Eigen::TriangularViewImpl< _MatrixType, _Mode, Dense >::fill
EIGEN_DEVICE_FUNC void fill(const Scalar &value)
Definition: TriangularMatrix.h:402
Eigen::TriangularBase
Base class for triangular part in a matrix.
Definition: TriangularMatrix.h:27
Eigen::TriangularView::Mode
@ Mode
Definition: TriangularMatrix.h:209
mode
static const DiscreteKey mode(modeKey, 2)
Eigen::TriangularViewImpl< _MatrixType, _Mode, Dense >::operator*
const EIGEN_DEVICE_FUNC Product< TriangularViewType, OtherDerived > operator*(const MatrixBase< OtherDerived > &rhs) const
Definition: TriangularMatrix.h:465
Eigen::ZeroDiag
@ ZeroDiag
Definition: Constants.h:215
Eigen::TriangularBase::evalTo
EIGEN_DEVICE_FUNC void evalTo(MatrixBase< DenseDerived > &other) const
Definition: TriangularMatrix.h:616
Eigen::Dynamic
const int Dynamic
Definition: Constants.h:22
Eigen::internal::traits< TriangularView< MatrixType, _Mode > >::MatrixTypeNested
ref_selector< MatrixType >::non_const_type MatrixTypeNested
Definition: TriangularMatrix.h:172
Eigen::TriangularViewImpl< _MatrixType, _Mode, Dense >::_solve_impl
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void _solve_impl(const RhsType &rhs, DstType &dst) const
Definition: TriangularMatrix.h:549
Eigen::internal::generic_dense_assignment_kernel::SrcXprType
SrcEvaluatorTypeT::XprType SrcXprType
Definition: AssignEvaluator.h:624
Eigen::TriangularView::transpose
const EIGEN_DEVICE_FUNC ConstTransposeReturnType transpose() const
Definition: TriangularMatrix.h:276
Eigen::numext::mini
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE T mini(const T &x, const T &y)
Definition: Eigen/src/Core/MathFunctions.h:1085
Eigen::Architecture::Type
Type
Definition: Constants.h:471
Eigen::TriangularView::nestedExpression
EIGEN_DEVICE_FUNC NestedExpression & nestedExpression()
Definition: TriangularMatrix.h:237
setConstant
v setConstant(3, 5)
Eigen::internal::generic_dense_assignment_kernel::m_src
const SrcEvaluatorType & m_src
Definition: AssignEvaluator.h:719
Eigen::TriangularViewImpl< _MatrixType, _Mode, Dense >::operator-=
EIGEN_DEVICE_FUNC TriangularViewType & operator-=(const DenseBase< Other > &other)
Definition: TriangularMatrix.h:388
Eigen::internal::swap_assign_op
Definition: AssignmentFunctors.h:142
EIGEN_STRONG_INLINE
#define EIGEN_STRONG_INLINE
Definition: Macros.h:917
Eigen::TriangularBase::MaxColsAtCompileTime
@ MaxColsAtCompileTime
Definition: TriangularMatrix.h:36
Eigen::internal::Assignment< DstXprType, Product< Lhs, Rhs, DefaultProduct >, internal::sub_assign_op< Scalar, typename Product< Lhs, Rhs, DefaultProduct >::Scalar >, Dense2Triangular >::run
static void run(DstXprType &dst, const SrcXprType &src, const internal::sub_assign_op< Scalar, typename SrcXprType::Scalar > &)
Definition: TriangularMatrix.h:991
Eigen::internal::triangular_assignment_loop
Definition: TriangularMatrix.h:749
Eigen::internal::triangular_assignment_loop::Scalar
Kernel::Scalar Scalar
Definition: TriangularMatrix.h:886
Eigen::TriangularView::ConjugateReturnType
TriangularView< const MatrixConjugateReturnType, Mode > ConjugateReturnType
Definition: TriangularMatrix.h:239
Eigen::internal::evaluator_traits_base::Shape
storage_kind_to_shape< typename traits< T >::StorageKind >::Shape Shape
Definition: CoreEvaluators.h:74
Eigen::TriangularViewImpl< _MatrixType, _Mode, Dense >::DenseMatrixType
MatrixType::PlainObject DenseMatrixType
Definition: TriangularMatrix.h:355
Eigen::Product
Expression of the product of two arbitrary matrices or vectors.
Definition: Product.h:71
gtsam.examples.DogLegOptimizerExample.run
def run(args)
Definition: DogLegOptimizerExample.py:21
Eigen::StrictlyLower
@ StrictlyLower
Definition: Constants.h:221
Eigen::Product::cols
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR Index cols() const EIGEN_NOEXCEPT
Definition: Product.h:104
Eigen::Triplet< double >
Eigen::MatrixBase::triangularView
EIGEN_DEVICE_FUNC TriangularViewReturnType< Mode >::Type triangularView()
Eigen::TriangularBase::resize
EIGEN_DEVICE_FUNC void resize(Index rows, Index cols)
Definition: TriangularMatrix.h:69
Eigen::internal::triangular_dense_assignment_kernel::Scalar
Base::Scalar Scalar
Definition: TriangularMatrix.h:771
Eigen::TriangularViewImpl< _MatrixType, _Mode, Dense >::operator*=
EIGEN_DEVICE_FUNC TriangularViewType & operator*=(const typename internal::traits< MatrixType >::Scalar &other)
Definition: TriangularMatrix.h:395
Eigen::TriangularView::Base
TriangularViewImpl< _MatrixType, _Mode, typename internal::traits< _MatrixType >::StorageKind > Base
Definition: TriangularMatrix.h:192
Eigen::internal::evaluator
Definition: CoreEvaluators.h:90
Eigen::Lower
@ Lower
Definition: Constants.h:209
Eigen::TriangularView::TransposeMode
@ TransposeMode
Definition: TriangularMatrix.h:211
Eigen::internal::ref_selector
Definition: XprHelper.h:416
Eigen::TriangularViewImpl< _MatrixType, _Mode, Dense >::MatrixType
_MatrixType MatrixType
Definition: TriangularMatrix.h:354
Eigen::Product::rows
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR Index rows() const EIGEN_NOEXCEPT
Definition: Product.h:102
EIGEN_DEFAULT_COPY_CONSTRUCTOR
#define EIGEN_DEFAULT_COPY_CONSTRUCTOR(CLASS)
Definition: Macros.h:1221
XprType
CwiseBinaryOp< internal::scalar_sum_op< double, double >, const CpyMatrixXd, const CpyMatrixXd > XprType
Definition: nestbyvalue.cpp:15
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::TriangularBase::derived
EIGEN_DEVICE_FUNC Derived & derived()
Definition: TriangularMatrix.h:107
Eigen::TriangularView::MatrixType
_MatrixType MatrixType
Definition: TriangularMatrix.h:194
Eigen::internal::assign_op
Definition: AssignmentFunctors.h:21
Eigen::TriangularView::determinant
EIGEN_DEVICE_FUNC Scalar determinant() const
Definition: TriangularMatrix.h:321
Eigen::TriangularView::Flags
@ Flags
Definition: TriangularMatrix.h:210
Eigen::MatrixBase::isLowerTriangular
bool isLowerTriangular(const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const
Definition: TriangularMatrix.h:690
Eigen::LinearAccessBit
const unsigned int LinearAccessBit
Definition: Constants.h:130
Eigen::TriangularViewImpl< _MatrixType, _Mode, Dense >::setConstant
EIGEN_DEVICE_FUNC TriangularViewType & setConstant(const Scalar &value)
Definition: TriangularMatrix.h:405
Eigen::TriangularBase::ColsAtCompileTime
@ ColsAtCompileTime
Definition: TriangularMatrix.h:34
Eigen::TriangularView::NestedExpression
internal::traits< TriangularView >::MatrixTypeNestedCleaned NestedExpression
Definition: TriangularMatrix.h:206
Eigen::Solve
Pseudo expression representing a solving operation.
Definition: Solve.h:62
Eigen::TriangularView::adjoint
const EIGEN_DEVICE_FUNC AdjointReturnType adjoint() const
Definition: TriangularMatrix.h:260
Eigen::internal::traits
Definition: ForwardDeclarations.h:17
Eigen::internal::storage_kind_to_evaluator_kind::Kind
IndexBased Kind
Definition: CoreEvaluators.h:24
Eigen::TriangularBase::coeff
EIGEN_DEVICE_FUNC Scalar coeff(Index row, Index col) const
Definition: TriangularMatrix.h:77
Eigen::DenseBase
Base class for all dense matrices, vectors, and arrays.
Definition: DenseBase.h:41
Eigen::internal::triangular_dense_assignment_kernel::DstEvaluatorType
Base::DstEvaluatorType DstEvaluatorType
Definition: TriangularMatrix.h:769
EIGEN_STATIC_ASSERT
#define EIGEN_STATIC_ASSERT(CONDITION, MSG)
Definition: StaticAssert.h:127
Eigen::internal::Triangular2Dense
Definition: TriangularMatrix.h:745
Eigen::internal::Rhs
@ Rhs
Definition: TensorContractionMapper.h:18
Eigen::TriangularBase::operator()
EIGEN_DEVICE_FUNC Scalar & operator()(Index row, Index col)
Definition: TriangularMatrix.h:97
row
m row(1)
Eigen::TriangularViewImpl
Definition: TriangularMatrix.h:185
Eigen::TriangularShape
Definition: Constants.h:533
Eigen::TriangularViewImpl< _MatrixType, _Mode, Dense >::setOnes
EIGEN_DEVICE_FUNC TriangularViewType & setOnes()
Definition: TriangularMatrix.h:412
Eigen::internal::sub_assign_op
Definition: AssignmentFunctors.h:67
Eigen::TriangularView::nestedExpression
const EIGEN_DEVICE_FUNC NestedExpression & nestedExpression() const
Definition: TriangularMatrix.h:233
Eigen::internal::Assignment< DstXprType, Product< Lhs, Rhs, DefaultProduct >, internal::add_assign_op< Scalar, typename Product< Lhs, Rhs, DefaultProduct >::Scalar >, Dense2Triangular >::SrcXprType
Product< Lhs, Rhs, DefaultProduct > SrcXprType
Definition: TriangularMatrix.h:979
Eigen::internal::unary_evaluator
Definition: CoreEvaluators.h:65
Eigen::TriangularView::solve
const EIGEN_DEVICE_FUNC Solve< TriangularView, Other > solve(const MatrixBase< Other > &other) const
Definition: TriangularMatrix.h:284
Eigen::internal::is_same_dense
EIGEN_DEVICE_FUNC bool is_same_dense(const T1 &mat1, const T2 &mat2, typename enable_if< possibly_same_dense< T1, T2 >::value >::type *=0)
Definition: XprHelper.h:695
Eigen::internal::call_triangular_assignment_loop
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void call_triangular_assignment_loop(DstXprType &dst, const SrcXprType &src, const Functor &func)
Definition: TriangularMatrix.h:806
Eigen::internal::Assignment
Definition: AssignEvaluator.h:824
Eigen::TriangularViewImpl< _MatrixType, _Mode, Dense >::Scalar
internal::traits< TriangularViewType >::Scalar Scalar
Definition: TriangularMatrix.h:352
Eigen::internal::evaluator_traits_base::Kind
storage_kind_to_evaluator_kind< typename traits< T >::StorageKind >::Kind Kind
Definition: CoreEvaluators.h:73
Eigen::internal::generic_dense_assignment_kernel::DstXprType
DstEvaluatorTypeT::XprType DstXprType
Definition: AssignEvaluator.h:623
Eigen::internal::traits< TriangularView< MatrixType, _Mode > >::ExpressionType
MatrixType ExpressionType
Definition: TriangularMatrix.h:176
Eigen::TriangularBase::check_coordinates
void check_coordinates(Index row, Index col) const
Definition: TriangularMatrix.h:127
Eigen::TriangularViewImpl< _MatrixType, _Mode, Dense >::operator+=
EIGEN_DEVICE_FUNC TriangularViewType & operator+=(const DenseBase< Other > &other)
Definition: TriangularMatrix.h:381
Eigen::internal::Assignment< DstXprType, Product< Lhs, Rhs, DefaultProduct >, internal::assign_op< Scalar, typename Product< Lhs, Rhs, DefaultProduct >::Scalar >, Dense2Triangular >::SrcXprType
Product< Lhs, Rhs, DefaultProduct > SrcXprType
Definition: TriangularMatrix.h:963
Eigen::internal::triangular_dense_assignment_kernel::triangular_dense_assignment_kernel
EIGEN_DEVICE_FUNC triangular_dense_assignment_kernel(DstEvaluatorType &dst, const SrcEvaluatorType &src, const Functor &func, DstXprType &dstExpr)
Definition: TriangularMatrix.h:775
Eigen::TriangularBase::rows
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index rows() const EIGEN_NOEXCEPT
Definition: TriangularMatrix.h:59
Eigen::TriangularBase::SizeAtCompileTime
@ SizeAtCompileTime
Definition: TriangularMatrix.h:38
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::triangular_dense_assignment_kernel
Definition: TriangularMatrix.h:758
Eigen::internal::add_assign_op
Definition: AssignmentFunctors.h:46
EIGEN_NOEXCEPT
#define EIGEN_NOEXCEPT
Definition: Macros.h:1418
Eigen::TriangularViewImpl< _MatrixType, _Mode, Dense >::operator/=
EIGEN_DEVICE_FUNC TriangularViewType & operator/=(const typename internal::traits< MatrixType >::Scalar &other)
Definition: TriangularMatrix.h:398
Eigen::internal::generic_dense_assignment_kernel< DstEvaluatorTypeT, SrcEvaluatorTypeT, Functor, Specialized >::assignCoeff
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void assignCoeff(Index row, Index col)
Assign src(row,col) to dst(row,col) through the assignment functor.
Definition: AssignEvaluator.h:654
internal
Definition: BandTriangularSolver.h:13
Eigen::numext::maxi
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE T maxi(const T &x, const T &y)
Definition: Eigen/src/Core/MathFunctions.h:1093
Eigen::TriangularBase::StorageKind
internal::traits< Derived >::StorageKind StorageKind
Definition: TriangularMatrix.h:49
Eigen::MatrixBase
Base class for all dense matrices, vectors, and expressions.
Definition: MatrixBase.h:48
Eigen::internal::triangular_dense_assignment_kernel::SrcXprType
Base::SrcXprType SrcXprType
Definition: TriangularMatrix.h:763
EIGEN_STATIC_ASSERT_LVALUE
#define EIGEN_STATIC_ASSERT_LVALUE(Derived)
Definition: StaticAssert.h:202
cols
int cols
Definition: Tutorial_commainit_02.cpp:1
Base
Definition: test_virtual_functions.cpp:156
Eigen::internal::triangular_dense_assignment_kernel::assignDiagonalCoeff
EIGEN_DEVICE_FUNC void assignDiagonalCoeff(Index id)
Definition: TriangularMatrix.h:789
func
Definition: benchGeometry.cpp:23
Eigen::TriangularView::StorageKind
internal::traits< TriangularView >::StorageKind StorageKind
Definition: TriangularMatrix.h:205
Eigen::HereditaryBits
const unsigned int HereditaryBits
Definition: Constants.h:195
Eigen::TriangularView
Expression of a triangular part in a matrix.
Definition: TriangularMatrix.h:187
Eigen::UnitLower
@ UnitLower
Definition: Constants.h:217
Eigen::internal::IndexBased
Definition: Constants.h:542
swap
int EIGEN_BLAS_FUNC() swap(int *n, RealScalar *px, int *incx, RealScalar *py, int *incy)
Definition: level1_impl.h:130
Eigen::internal::Assignment< DstXprType, Product< Lhs, Rhs, DefaultProduct >, internal::add_assign_op< Scalar, typename Product< Lhs, Rhs, DefaultProduct >::Scalar >, Dense2Triangular >::run
static void run(DstXprType &dst, const SrcXprType &src, const internal::add_assign_op< Scalar, typename SrcXprType::Scalar > &)
Definition: TriangularMatrix.h:980
EIGEN_INHERIT_ASSIGNMENT_OPERATORS
#define EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Derived)
Definition: Macros.h:1231
Eigen::TriangularBase::Scalar
internal::traits< Derived >::Scalar Scalar
Definition: TriangularMatrix.h:48
Eigen::internal::call_assignment
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void call_assignment(Dst &dst, const Src &src)
Definition: AssignEvaluator.h:834
Eigen::TriangularBase::StorageIndex
internal::traits< Derived >::StorageIndex StorageIndex
Definition: TriangularMatrix.h:50
Eigen::prod
const Product< Lhs, Rhs > prod(const Lhs &lhs, const Rhs &rhs)
Definition: evaluators.cpp:8
Eigen::TriangularBase::derived
const EIGEN_DEVICE_FUNC Derived & derived() const
Definition: TriangularMatrix.h:105
test_callbacks.value
value
Definition: test_callbacks.py:160
i
int i
Definition: BiCGSTAB_step_by_step.cpp:9
pybind_wrapper_test_script.other
other
Definition: pybind_wrapper_test_script.py:42
Eigen::internal::size_at_compile_time
Definition: XprHelper.h:281
Eigen::TriangularBase::check_coordinates_internal
void check_coordinates_internal(Index, Index) const
Definition: TriangularMatrix.h:146
Eigen::internal::generic_dense_assignment_kernel::m_dst
DstEvaluatorType & m_dst
Definition: AssignEvaluator.h:718
Eigen::TriangularViewImpl< _MatrixType, _Mode, Dense >::StorageKind
internal::traits< TriangularViewType >::StorageKind StorageKind
Definition: TriangularMatrix.h:362
Eigen::SelfAdjoint
@ SelfAdjoint
Definition: Constants.h:225
Eigen::TriangularBase::toDenseMatrix
EIGEN_DEVICE_FUNC DenseMatrixType toDenseMatrix() const
Definition: TriangularMatrix.h:118
Eigen::MatrixBase::isUpperTriangular
bool isUpperTriangular(const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const
Definition: TriangularMatrix.h:665
Eigen::internal::Assignment< DstXprType, Product< Lhs, Rhs, DefaultProduct >, internal::sub_assign_op< Scalar, typename Product< Lhs, Rhs, DefaultProduct >::Scalar >, Dense2Triangular >::SrcXprType
Product< Lhs, Rhs, DefaultProduct > SrcXprType
Definition: TriangularMatrix.h:990
Eigen::internal::AssignmentKind
Definition: AssignEvaluator.h:811
Scalar
SCALAR Scalar
Definition: bench_gemm.cpp:46
Eigen::UnitDiag
@ UnitDiag
Definition: Constants.h:213
Eigen::TriangularView::selfadjointView
EIGEN_DEVICE_FUNC SelfAdjointView< MatrixTypeNestedNonRef, Mode > selfadjointView()
Definition: TriangularMatrix.h:303
Eigen::Index
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:74
Eigen::Dense
Definition: Constants.h:507


gtsam
Author(s):
autogenerated on Sun Dec 22 2024 04:18:12