Home
last modified time | relevance | path

Searched refs:diagonal (Results 1 – 25 of 143) sorted by relevance

123456

/external/eigen/test/
Ddiagonal.cpp12 template<typename MatrixType> void diagonal(const MatrixType& m) in diagonal() function
24 VERIFY_IS_APPROX(m1.diagonal(), m1.transpose().diagonal()); in diagonal()
25 m2.diagonal() = 2 * m1.diagonal(); in diagonal()
26 m2.diagonal()[0] *= 3; in diagonal()
38 VERIFY(m1.template diagonal<N1>().RowsAtCompileTime == m1.diagonal(N1).size()); in diagonal()
39 VERIFY(m1.template diagonal<N2>().RowsAtCompileTime == m1.diagonal(N2).size()); in diagonal()
42 m2.template diagonal<N1>() = 2 * m1.template diagonal<N1>(); in diagonal()
43 VERIFY_IS_APPROX(m2.template diagonal<N1>(), static_cast<Scalar>(2) * m1.diagonal(N1)); in diagonal()
44 m2.template diagonal<N1>()[0] *= 3; in diagonal()
45 …VERIFY_IS_APPROX(m2.template diagonal<N1>()[0], static_cast<Scalar>(6) * m1.template diagonal<N1>(… in diagonal()
[all …]
Ddiagonalmatrices.cpp46 VERIFY_IS_APPROX(ldm1.diagonal(), ldm3.diagonal()); in diagonalmatrices()
48 VERIFY_IS_APPROX(ldm1.diagonal(), ldm4.diagonal()); in diagonalmatrices()
58 VERIFY_IS_APPROX( ((ldm1 * m1)(i,j)) , ldm1.diagonal()(i) * m1(i,j) ); in diagonalmatrices()
59 VERIFY_IS_APPROX( ((ldm1 * (m1+m2))(i,j)) , ldm1.diagonal()(i) * (m1+m2)(i,j) ); in diagonalmatrices()
60 VERIFY_IS_APPROX( ((m1 * rdm1)(i,j)) , rdm1.diagonal()(j) * m1(i,j) ); in diagonalmatrices()
82 VERIFY_IS_APPROX(LeftDiagonalMatrix(ldm1*s1).diagonal(), ldm1.diagonal() * s1); in diagonalmatrices()
83 VERIFY_IS_APPROX(LeftDiagonalMatrix(s1*ldm1).diagonal(), s1 * ldm1.diagonal()); in diagonalmatrices()
Dbandmatrix.cpp29 m.diagonal().setConstant(123); in bandmatrix()
30 dm1.diagonal().setConstant(123); in bandmatrix()
33 m.diagonal(i).setConstant(static_cast<RealScalar>(i)); in bandmatrix()
34 dm1.diagonal(i).setConstant(static_cast<RealScalar>(i)); in bandmatrix()
38 m.diagonal(-i).setConstant(-static_cast<RealScalar>(i)); in bandmatrix()
39 dm1.diagonal(-i).setConstant(-static_cast<RealScalar>(i)); in bandmatrix()
Dnesting_ops.cpp21 VERIFY_IS_APPROX( (m.transpose() * m).diagonal().sum(), (m.transpose() * m).diagonal().sum() ); in run_nesting_ops()
22 …VERIFY_IS_APPROX( (m.transpose() * m).diagonal().array().abs().sum(), (m.transpose() * m).diagonal in run_nesting_ops()
Dtriangular.cpp179 VERIFY(m2.diagonal().isMuchSmallerThan(RealScalar(1))); in triangular_rect()
182 m2.diagonal().array() -= Scalar(1); in triangular_rect()
183 VERIFY(m2.diagonal().isMuchSmallerThan(RealScalar(1))); in triangular_rect()
189 VERIFY(m2.diagonal().isMuchSmallerThan(RealScalar(1))); in triangular_rect()
192 m2.diagonal().array() -= Scalar(1); in triangular_rect()
193 VERIFY(m2.diagonal().isMuchSmallerThan(RealScalar(1))); in triangular_rect()
Dselfadjoint.cpp26 m1.diagonal() = m1.diagonal().real().template cast<Scalar>(); in selfadjoint()
/external/eigen/Eigen/src/Core/
DDiagonalMatrix.h48 { other.diagonal() += diagonal(); } in addTo()
51 { other.diagonal() -= diagonal(); } in subTo()
53 inline const DiagonalVectorType& diagonal() const { return derived().diagonal(); } in diagonal() function
54 inline DiagonalVectorType& diagonal() { return derived().diagonal(); } in diagonal() function
56 inline Index rows() const { return diagonal().size(); } in rows()
57 inline Index cols() const { return diagonal().size(); } in cols()
71 return diagonal().cwiseInverse(); in inverse()
77 return diagonal() * scalar;
82 return other.diagonal() * scalar;
89 return diagonal().isApprox(other.diagonal(), precision);
[all …]
DBandMatrix.h84 inline Block<CoefficientsType,1,SizeAtCompileTime> diagonal() in diagonal() function
88 inline const Block<const CoefficientsType,1,SizeAtCompileTime> diagonal() const in diagonal() function
109 template<int N> inline typename DiagonalIntReturnType<N>::Type diagonal() in diagonal() function
115 template<int N> inline const typename DiagonalIntReturnType<N>::Type diagonal() const in diagonal() function
121 inline Block<CoefficientsType,1,Dynamic> diagonal(Index i) in diagonal() function
128 inline const Block<const CoefficientsType,1,Dynamic> diagonal(Index i) const in diagonal() function
138 dst.diagonal() = diagonal(); in evalTo()
140 dst.diagonal(i) = diagonal(i); in evalTo()
142 dst.diagonal(-i) = diagonal(-i); in evalTo()
320 { return Base::template diagonal<1>(); }
[all …]
DDiagonalProduct.h52 inline DiagonalProduct(const MatrixType& matrix, const DiagonalType& diagonal)
53 : m_matrix(matrix), m_diagonal(diagonal)
55 …eigen_assert(diagonal.diagonal().size() == (ProductOrder == OnTheLeft ? matrix.rows() : matrix.col…
63 …return m_diagonal.diagonal().coeff(ProductOrder == OnTheLeft ? row : col) * m_matrix.coeff(row, co…
100 internal::pset1<PacketScalar>(m_diagonal.diagonal().coeff(id)));
111 m_diagonal.diagonal().template packet<DiagonalVectorPacketLoadMode>(id));
DDiagonal.h168 MatrixBase<Derived>::diagonal()
176 MatrixBase<Derived>::diagonal() const
194 MatrixBase<Derived>::diagonal(Index index)
202 MatrixBase<Derived>::diagonal(Index index) const
221 MatrixBase<Derived>::diagonal()
230 MatrixBase<Derived>::diagonal() const
DMatrixBase.h192 operator*(const DiagonalBase<DiagonalDerived> &diagonal) const;
215 DiagonalReturnType diagonal();
217 ConstDiagonalReturnType diagonal() const;
222 template<int Index> typename DiagonalIndexReturnType<Index>::Type diagonal();
223 template<int Index> typename ConstDiagonalIndexReturnType<Index>::Type diagonal() const;
228 DiagonalDynamicIndexReturnType diagonal(Index index);
229 ConstDiagonalDynamicIndexReturnType diagonal(Index index) const;
239 { return diagonal().asDiagonal(); } in part()
/external/ceres-solver/internal/ceres/
Dlevenberg_marquardt_strategy_test.cc56 RegularizationCheckingLinearSolver(const int num_cols, const double* diagonal) in RegularizationCheckingLinearSolver() argument
58 diagonal_(diagonal) { in RegularizationCheckingLinearSolver()
131 double diagonal[3]; in TEST() local
132 diagonal[0] = options.min_lm_diagonal; in TEST()
133 diagonal[1] = 2.0; in TEST()
134 diagonal[2] = options.max_lm_diagonal; in TEST()
136 diagonal[i] = sqrt(diagonal[i] / options.initial_radius); in TEST()
139 RegularizationCheckingLinearSolver linear_solver(3, diagonal); in TEST()
Dcompressed_row_sparse_matrix_test.cc170 scoped_array<double> diagonal(new double[num_diagonal_rows]); in TEST_F() local
172 diagonal[i] =i; in TEST_F()
185 diagonal.get(), row_and_column_blocks)); in TEST_F()
243 Vector diagonal(5); in TEST() local
245 diagonal(i) = i + 1; in TEST()
250 diagonal.data(), blocks)); in TEST()
264 for (int i = 0; i < diagonal.size(); ++i) { in TEST()
265 EXPECT_EQ(y[i], diagonal[i]); in TEST()
270 for (int i = 0; i < diagonal.size(); ++i) { in TEST()
271 EXPECT_EQ(y[i], diagonal[i]); in TEST()
[all …]
Dpolynomial.cc55 companion_matrix_offdiagonal.diagonal().setZero(); in BalanceCompanionMatrix()
97 companion_matrix_offdiagonal.diagonal() = companion_matrix.diagonal(); in BalanceCompanionMatrix()
111 companion_matrix.diagonal(-1).setOnes(); in BuildCompanionMatrix()
/external/eigen/Eigen/src/Eigenvalues/
DTridiagonalization.h282 DiagonalReturnType diagonal() const;
305 Tridiagonalization<MatrixType>::diagonal() const
308 return m_matrix.diagonal();
317 return Block<const MatrixType,SizeMinusOne,SizeMinusOne>(m_matrix, 1, 0, n-1,n-1).diagonal();
447 diag = mat.diagonal().real();
448 subdiag = mat.template diagonal<-1>().real();
541 result.template diagonal<1>() = m_matrix.template diagonal<-1>().conjugate();
542 result.diagonal() = m_matrix.diagonal();
543 result.template diagonal<-1>() = m_matrix.template diagonal<-1>();
/external/eigen/doc/
DQuickReference.dox546 view a vector \link MatrixBase::asDiagonal() as a diagonal matrix \endlink \n </td><td>\code
550 Declare a diagonal matrix</td><td>\code
552 diag1.diagonal() = vector;\endcode
554 <tr><td>Access the \link MatrixBase::diagonal() diagonal \endlink and \link MatrixBase::diagonal(In…
556 vec1 = mat1.diagonal(); mat1.diagonal() = vec1; // main diagonal
557 vec1 = mat1.diagonal(+n); mat1.diagonal(+n) = vec1; // n-th super diagonal
558 vec1 = mat1.diagonal(-n); mat1.diagonal(-n) = vec1; // n-th sub diagonal
559 vec1 = mat1.diagonal<1>(); mat1.diagonal<1>() = vec1; // first super diagonal
560 vec1 = mat1.diagonal<-2>(); mat1.diagonal<-2>() = vec1; // second sub diagonal
586 unit or null diagonal (read/write):
[all …]
Dtutorial.cpp15 m3.diagonal().setOnes(); in main()
33 m4.diagonal().block(1,2).setOnes(); in main()
34 std::cout << "*** Step 5 ***\nm4.diagonal():\n" << m4.diagonal() << std::endl; in main()
35 std::cout << "m4.diagonal().start(3)\n" << m4.diagonal().start(3) << std::endl; in main()
/external/eigen/test/eigen2/
Deigen2_submatrices.cpp88 VERIFY_IS_APPROX(m1.diagonal(), m1.transpose().diagonal()); in submatrices()
89 m2.diagonal() = 2 * m1.diagonal(); in submatrices()
90 m2.diagonal()[0] *= 3; in submatrices()
91 VERIFY_IS_APPROX(m2.diagonal()[0], static_cast<Scalar>(6) * m1.diagonal()[0]); in submatrices()
/external/apache-commons-math/src/main/java/org/apache/commons/math/linear/
DMatrixUtils.java202 public static RealMatrix createRealDiagonalMatrix(final double[] diagonal) { in createRealDiagonalMatrix() argument
203 final RealMatrix m = createRealMatrix(diagonal.length, diagonal.length); in createRealDiagonalMatrix()
204 for (int i = 0; i < diagonal.length; ++i) { in createRealDiagonalMatrix()
205 m.setEntry(i, i, diagonal[i]); in createRealDiagonalMatrix()
220 createFieldDiagonalMatrix(final T[] diagonal) { in createFieldDiagonalMatrix() argument
222 createFieldMatrix(diagonal[0].getField(), diagonal.length, diagonal.length); in createFieldDiagonalMatrix()
223 for (int i = 0; i < diagonal.length; ++i) { in createFieldDiagonalMatrix()
224 m.setEntry(i, i, diagonal[i]); in createFieldDiagonalMatrix()
/external/eigen/Eigen/src/SVD/
DUpperBidiagonalization.h71 return HouseholderUSequenceType(m_householder, m_householder.diagonal().conjugate()); in householderU()
77 …olderVSequenceType(m_householder.conjugate(), m_householder.const_derived().template diagonal<1>()) in householderV()
108 m_bidiagonal.template diagonal<0>().coeffRef(k)); in compute()
120 m_bidiagonal.template diagonal<1>().coeffRef(k)); in compute()
/external/eigen/doc/snippets/
DMatrixBase_diagonal_template_int.cpp4 << m.diagonal<1>().transpose() << endl
5 << m.diagonal<-2>().transpose() << endl;
DMatrixBase_diagonal_int.cpp4 << m.diagonal(1).transpose() << endl
5 << m.diagonal(-2).transpose() << endl;
/external/eigen/unsupported/Eigen/src/NonLinearOptimization/
Dqrsolv.h32 x = s.diagonal(); in qrsolv()
82 sdiag = s.diagonal(); in qrsolv()
83 s.diagonal() = x; in qrsolv()
/external/eigen/unsupported/Eigen/src/LevenbergMarquardt/
DLMqrsolv.h45 x = s.diagonal(); in lmqrsolv()
95 sdiag = s.diagonal(); in lmqrsolv()
96 s.diagonal() = x; in lmqrsolv()
181 sdiag = R.diagonal(); in lmqrsolv()
/external/eigen/Eigen/src/SparseCore/
DSparseDiagonalProduct.h116 : Base(expr.rhs()*(expr.lhs().diagonal().coeff(outer)), outer)
137 : Base(expr.rhs().innerVector(outer) .cwiseProduct(expr.lhs().diagonal()), 0), m_outer(outer)
154 : Base(expr.lhs()*expr.rhs().diagonal().coeff(outer), outer)
175 …: Base(expr.lhs().innerVector(outer) .cwiseProduct(expr.rhs().diagonal().transpose()), 0), m_outer…

123456