| /external/eigen/test/ |
| D | diagonal.cpp | 12 template<typename MatrixType> void diagonal(const MatrixType& m) in diagonal() function 24 //check diagonal() in diagonal() 25 VERIFY_IS_APPROX(m1.diagonal(), m1.transpose().diagonal()); in diagonal() 26 m2.diagonal() = 2 * m1.diagonal(); in diagonal() 27 m2.diagonal()[0] *= 3; in diagonal() 36 // check sub/super diagonal in diagonal() 39 VERIFY(m1.template diagonal<N1>().RowsAtCompileTime == m1.diagonal(N1).size()); in diagonal() 40 VERIFY(m1.template diagonal<N2>().RowsAtCompileTime == m1.diagonal(N2).size()); in diagonal() 43 m2.template diagonal<N1>() = 2 * m1.template diagonal<N1>(); in diagonal() 44 VERIFY_IS_APPROX(m2.template diagonal<N1>(), static_cast<Scalar>(2) * m1.diagonal(N1)); in diagonal() [all …]
|
| /external/eigen/Eigen/src/Core/ |
| D | Diagonal.h | 16 /** \class Diagonal 19 * \brief Expression of a diagonal/subdiagonal/superdiagonal in a matrix 21 * \param MatrixType the type of the object in which we are taking a sub/main/super diagonal 22 …* \param DiagIndex the index of the sub/super diagonal. The default is 0 and it means the main dia… 28 * This class represents an expression of the main diagonal, or any sub/super diagonal 29 …* of a square matrix. It is the return type of MatrixBase::diagonal() and MatrixBase::diagonal(Ind… 32 * \sa MatrixBase::diagonal(), MatrixBase::diagonal(Index) 37 struct traits<Diagonal<MatrixType,DiagIndex> > 63 template<typename MatrixType, int _DiagIndex> class Diagonal 64 : public internal::dense_xpr_base< Diagonal<MatrixType,_DiagIndex> >::type [all …]
|
| D | DiagonalMatrix.h | 49 inline const DiagonalVectorType& diagonal() const { return derived().diagonal(); } in diagonal() function 51 inline DiagonalVectorType& diagonal() { return derived().diagonal(); } in diagonal() function 54 inline Index rows() const { return diagonal().size(); } in rows() 56 inline Index cols() const { return diagonal().size(); } in cols() 71 return InverseReturnType(diagonal().cwiseInverse()); in inverse() 78 …t EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(DiagonalVectorType,Scalar,product) >(diagonal() * scalar); 84 …N_SCALAR_BINARYOP_EXPR_RETURN_TYPE(Scalar,DiagonalVectorType,product) >(scalar * other.diagonal()); 96 return (diagonal() + other.diagonal()).asDiagonal(); 108 return (diagonal() - other.diagonal()).asDiagonal(); 117 * \brief Represents a diagonal matrix with its storage [all …]
|
| D | BandMatrix.h | 83 /** \returns a vector expression of the main diagonal */ 84 inline Block<CoefficientsType,1,SizeAtCompileTime> diagonal() in diagonal() function 87 /** \returns a vector expression of the main diagonal (const version) */ 88 inline const Block<const CoefficientsType,1,SizeAtCompileTime> diagonal() const in diagonal() function 108 /** \returns a vector expression of the \a N -th sub or super diagonal */ 109 template<int N> inline typename DiagonalIntReturnType<N>::Type diagonal() in diagonal() function 114 /** \returns a vector expression of the \a N -th sub or super diagonal */ 115 template<int N> inline const typename DiagonalIntReturnType<N>::Type diagonal() const in diagonal() function 120 /** \returns a vector expression of the \a i -th sub or super diagonal */ 121 inline Block<CoefficientsType,1,Dynamic> diagonal(Index i) in diagonal() function [all …]
|
| /external/tensorflow/tensorflow/core/api_def/base_api/ |
| D | api_def_MatrixDiagV2.pbtxt | 4 name: "diagonal" 10 Diagonal offset(s). Positive value means superdiagonal, 0 refers to the main 11 diagonal, and negative value means subdiagonals. `k` can be a single integer 12 (for a single diagonal) or a pair of integers specifying the low and high ends 21 innermost dimension of `diagonal`. 29 k and the innermost dimension of `diagonal`. 35 The number to fill the area outside the specified diagonal band with. 46 "Returns a batched diagonal tensor with given batched diagonal values." 48 Returns a tensor with the contents in `diagonal` as `k[0]`-th to `k[1]`-th 52 its size from `k` and the innermost dimension of `diagonal`. If only one of them [all …]
|
| D | api_def_MatrixDiag.pbtxt | 4 name: "diagonal" 12 Rank `k+1`, with `output.shape = diagonal.shape + [diagonal.shape[-1]]`. 15 summary: "Returns a batched diagonal tensor with a given batched diagonal values." 17 Given a `diagonal`, this operation returns a tensor with the `diagonal` and 18 everything else padded with zeros. The diagonal is computed as follows: 20 Assume `diagonal` has `k` dimensions `[I, J, K, ..., N]`, then the output is a 23 `output[i, j, k, ..., m, n] = 1{m=n} * diagonal[i, j, k, ..., n]`. 28 # 'diagonal' is [[1, 2, 3, 4], [5, 6, 7, 8]] 30 and diagonal.shape = (2, 4) 32 tf.matrix_diag(diagonal) ==> [[[1, 0, 0, 0]
|
| D | api_def_MatrixDiagV3.pbtxt | 4 name: "diagonal" 10 Diagonal offset(s). Positive value means superdiagonal, 0 refers to the main 11 diagonal, and negative value means subdiagonals. `k` can be a single integer 12 (for a single diagonal) or a pair of integers specifying the low and high ends 21 innermost dimension of `diagonal`. 29 k and the innermost dimension of `diagonal`. 35 The number to fill the area outside the specified diagonal band with. 58 "Returns a batched diagonal tensor with given batched diagonal values." 60 Returns a tensor with the contents in `diagonal` as `k[0]`-th to `k[1]`-th 64 its size from `k` and the innermost dimension of `diagonal`. If only one of them [all …]
|
| D | api_def_Diag.pbtxt | 4 name: "diagonal" 9 summary: "Returns a diagonal tensor with a given diagonal values." 11 Given a `diagonal`, this operation returns a tensor with the `diagonal` and 12 everything else padded with zeros. The diagonal is computed as follows: 14 Assume `diagonal` has dimensions [D1,..., Dk], then the output is a tensor of 17 `output[i1,..., ik, i1,..., ik] = diagonal[i1, ..., ik]` and 0 everywhere else. 22 # 'diagonal' is [1, 2, 3, 4] 23 tf.diag(diagonal) ==> [[1, 0, 0, 0]
|
| D | api_def_MatrixSetDiagV2.pbtxt | 8 name: "diagonal" 17 Diagonal offset(s). Positive value means superdiagonal, 0 refers to the main 18 diagonal, and negative value means subdiagonals. `k` can be a single integer 19 (for a single diagonal) or a pair of integers specifying the low and high ends 29 summary: "Returns a batched matrix tensor with new batched diagonal values." 31 Given `input` and `diagonal`, this operation returns a tensor with the 33 innermost matrices. These will be overwritten by the values in `diagonal`. 36 `k[0] == k[1]`, `diagonal` has `r` dimensions `[I, J, ..., L, max_diag_len]`. 39 `max_diag_len` is the longest diagonal in the range `[k[0], k[1]]`, 47 = diagonal[i, j, ..., l, n-max(k[1], 0)] ; if n - m == k[1] [all …]
|
| D | api_def_MatrixSetDiagV3.pbtxt | 8 name: "diagonal" 17 Diagonal offset(s). Positive value means superdiagonal, 0 refers to the main 18 diagonal, and negative value means subdiagonals. `k` can be a single integer 19 (for a single diagonal) or a pair of integers specifying the low and high ends 41 summary: "Returns a batched matrix tensor with new batched diagonal values." 43 Given `input` and `diagonal`, this operation returns a tensor with the 45 innermost matrices. These will be overwritten by the values in `diagonal`. 48 `k[0] == k[1]`, `diagonal` has `r` dimensions `[I, J, ..., L, max_diag_len]`. 51 `max_diag_len` is the longest diagonal in the range `[k[0], k[1]]`, 59 = diagonal[i, j, ..., l, n-max(k[1], 0)] ; if n - m == k[1] [all …]
|
| D | api_def_MatrixDiagPartV3.pbtxt | 10 Diagonal offset(s). Positive value means superdiagonal, 0 refers to the main 11 diagonal, and negative value means subdiagonals. `k` can be a single integer 12 (for a single diagonal) or a pair of integers specifying the low and high ends 19 The value to fill the area outside the specified diagonal band with. 24 name: "diagonal" 25 description: "The extracted diagonal(s)." 39 summary: "Returns the batched diagonal part of a batched tensor." 54 diagonal[i, j, ..., l, n] 64 diagonal[i, j, ..., l, m, n] 70 `offset` is zero except when the alignment of the diagonal is to the right. [all …]
|
| D | api_def_MatrixSetDiag.pbtxt | 10 name: "diagonal" 21 summary: "Returns a batched matrix tensor with new batched diagonal values." 23 Given `input` and `diagonal`, this operation returns a tensor with the 24 same shape and values as `input`, except for the main diagonal of the 25 innermost matrices. These will be overwritten by the values in `diagonal`. 29 Assume `input` has `k+1` dimensions `[I, J, K, ..., M, N]` and `diagonal` has 33 * `output[i, j, k, ..., m, n] = diagonal[i, j, k, ..., n]` for `m == n`.
|
| D | api_def_MatrixDiagPartV2.pbtxt | 10 Diagonal offset(s). Positive value means superdiagonal, 0 refers to the main 11 diagonal, and negative value means subdiagonals. `k` can be a single integer 12 (for a single diagonal) or a pair of integers specifying the low and high ends 19 The value to fill the area outside the specified diagonal band with. 24 name: "diagonal" 25 description: "The extracted diagonal(s)." 27 summary: "Returns the batched diagonal part of a batched tensor." 42 diagonal[i, j, ..., l, n] 52 diagonal[i, j, ..., l, m, n] 70 # A main diagonal from each batch.
|
| D | api_def_MatrixDiagPart.pbtxt | 10 name: "diagonal" 12 The extracted diagonal(s) having shape 13 `diagonal.shape = input.shape[:-2] + [min(input.shape[-2:])]`. 16 summary: "Returns the batched diagonal part of a batched tensor." 18 This operation returns a tensor with the `diagonal` part 19 of the batched `input`. The `diagonal` part is computed as follows: 24 `diagonal[i, j, k, ..., n] = input[i, j, k, ..., n, n]`.
|
| /external/pytorch/benchmarks/operator_benchmark/pt/ |
| D | diag_test.py | 11 attr_names=["dim", "M", "N", "diagonal", "out"], 25 def init(self, dim, M, N, diagonal, out, device): argument 30 "diagonal": diagonal, 39 def forward(self, input, diagonal: int, out: bool, out_tensor): 41 return torch.diag(input, diagonal=diagonal, out=out_tensor) 43 return torch.diag(input, diagonal=diagonal)
|
| /external/oboe/samples/RhythmGame/third_party/glm/gtx/ |
| D | matrix_operation.hpp | 9 /// @brief Build diagonal matrices from vectors. 27 //! Build a diagonal matrix. 33 //! Build a diagonal matrix. 39 //! Build a diagonal matrix. 45 //! Build a diagonal matrix. 51 //! Build a diagonal matrix. 57 //! Build a diagonal matrix. 63 //! Build a diagonal matrix. 69 //! Build a diagonal matrix. 75 //! Build a diagonal matrix.
|
| /external/pytorch/torch/ao/pruning/sparsifier/ |
| D | nearly_diagonal_sparsifier.py | 8 r"""Nearly Diagonal Sparsifier 10 This sparsifier creates a nearly diagonal mask to be applied to the weight matrix. 11 …Nearly Diagonal Matrix is a matrix that contains non-zero elements near the diagonal and the rest … 12 …An example of a nearly diagonal matrix with degree (or nearliness) 3 and 5 are follows respectivel… 17 Note that a nearly diagonal matrix with degree 1 is just a matrix with main diagonal populated 20 …1. `nearliness` defines the number of non-zero diagonal lines that are closest to the main diagona…
|
| /external/eigen/unsupported/Eigen/src/LevenbergMarquardt/ |
| D | LMqrsolv.h | 40 // the diagonal, though the diagonal is restored afterward in lmqrsolv() 43 /* in particular, save the diagonal elements of r in x. */ in lmqrsolv() 44 x = s.diagonal(); in lmqrsolv() 49 /* eliminate the diagonal matrix d using a givens rotation. */ in lmqrsolv() 53 /* diagonal element using p from the qr factorization. */ in lmqrsolv() 69 /* compute the modified diagonal element of r and */ in lmqrsolv() 94 sdiag = s.diagonal(); in lmqrsolv() 95 s.diagonal() = x; in lmqrsolv() 120 // the diagonal, though the diagonal is restored afterward in lmqrsolv() 125 // Eliminate the diagonal matrix d using a givens rotation in lmqrsolv() [all …]
|
| /external/apache-commons-math/src/main/java/org/apache/commons/math/linear/ |
| D | BiDiagonalTransformer.java | 24 * Class transforming any matrix to bi-diagonal shape. 27 * B an m × n bi-diagonal matrix (lower diagonal if m < n, upper diagonal 29 * <p>Transformation to bi-diagonal shape is often not a goal by itself, but it is 43 /** Main diagonal. */ 46 /** Secondary diagonal. */ 59 * Build the transformation to bi-diagonal shape of a matrix. 96 final double[] diagonal = (m >= n) ? main : secondary; in getU() local 114 alpha /= diagonal[k - diagOffset] * hK[k - diagOffset]; in getU() 134 * Returns the bi-diagonal matrix B of the transform. 177 final double[] diagonal = (m >= n) ? secondary : main; in getV() local [all …]
|
| /external/apache-commons-math/src/main/java/org/apache/commons/math3/linear/ |
| D | BiDiagonalTransformer.java | 23 * Class transforming any matrix to bi-diagonal shape. 26 * × V<sup>T</sup> with U an m × m orthogonal matrix, B an m × n bi-diagonal 27 * matrix (lower diagonal if m < n, upper diagonal otherwise), and V an n × n orthogonal 30 * <p>Transformation to bi-diagonal shape is often not a goal by itself, but it is an intermediate 43 /** Main diagonal. */ 46 /** Secondary diagonal. */ 59 * Build the transformation to bi-diagonal shape of a matrix. 98 final double[] diagonal = (m >= n) ? main : secondary; in getU() local 116 alpha /= diagonal[k - diagOffset] * hK[k - diagOffset]; in getU() 135 * Returns the bi-diagonal matrix B of the transform. [all …]
|
| /external/executorch/kernels/portable/cpu/ |
| D | op_tril.cpp | 42 int64_t diagonal, in apply_tril() argument 48 for (int64_t j = 0; j < std::min(num_cols, i + diagonal + 1); j++) { in apply_tril() 62 int64_t diagonal, in tril_kernel() argument 112 diagonal, in tril_kernel() 125 * other elements are set to 0, by default. Further, `diagonal` controls how the 127 * 1. `diagonal = 0`: Elements on and below the main diagonal are retained. 128 * 2. `diagonal > 0`: Similar to case (1); additional diagonals above the 130 * 3. `diagonal < 0`: Similar to case (1); additional diagonals below the 136 int64_t diagonal, in tril_out() argument 162 tril_kernel<CTYPE>(ctx, self, diagonal, out); in tril_out()
|
| /external/tensorflow/tensorflow/compiler/xla/client/lib/ |
| D | matrix.h | 32 // Returns an m x n matrix with 1s on the diagonal elements, zeros everywhere 37 // Returns a mask where the 'diagonal'-th diagonal is true and everything else 39 XlaOp GetDiagonalMask(XlaOp x, int diagonal = 0); 42 // main diagonal, and k<0 for diagonals below the main diagonal. 46 // diagonal elements (i.e., with indices [..., i, i + k]). 48 // diagonal elements (i.e., with indices [..., i - k, i]). 52 // Places diag along the kth diagonal of target. 56 // `diagonal`-th diagonal and false above that diagonal. 57 XlaOp TriangleMask(XlaOp x, int diagonal); 72 // complex diagonal to zero.
|
| /external/eigen/Eigen/src/Eigenvalues/ |
| D | Tridiagonalization.h | 47 * main diagonal and the first diagonal below and above it. The Hessenberg 90 …typename internal::add_const_on_value_type<typename Diagonal<const MatrixType>::RealReturnType>::t… 91 const Diagonal<const MatrixType> 95 …typename internal::add_const_on_value_type<typename Diagonal<const MatrixType, -1>::RealReturnType… 96 const Diagonal<const MatrixType, -1> 200 * - the diagonal and lower sub-diagonal represent the real tridiagonal 260 * returned by diagonal() and subDiagonal() instead of creating a new 264 * matrixQ(), packedMatrix(), diagonal(), subDiagonal() 272 /** \brief Returns the diagonal of the tridiagonal matrix T in the decomposition. 274 * \returns expression representing the diagonal of T [all …]
|
| /external/eigen/unsupported/Eigen/src/NonLinearOptimization/ |
| D | qrsolv.h | 28 // the diagonal, though the diagonal is restored afterward in qrsolv() 31 /* in particular, save the diagonal elements of r in x. */ in qrsolv() 32 x = s.diagonal(); in qrsolv() 37 /* eliminate the diagonal matrix d using a givens rotation. */ in qrsolv() 41 /* diagonal element using p from the qr factorization. */ in qrsolv() 57 /* compute the modified diagonal element of r and */ in qrsolv() 82 sdiag = s.diagonal(); in qrsolv() 83 s.diagonal() = x; in qrsolv()
|
| /external/tensorflow/tensorflow/core/kernels/linalg/ |
| D | matrix_diag_op.h | 30 // Reads the diagonal packing alignment. 35 // Calculates diagonal length and content offset (from aligning) of a diagonal. 37 // - diag_len: The length of the diag_index-th diagonal. 38 // - content_offset: Each diagonal is stored as a row in the compact format. 39 // If the diagonal is shorter than max_diag_len, its content is aligned 41 // where the first element of the diag-index-th diagonal is stored. It is 42 // always zero when the diagonal is left-aligned.
|