|
enum | { Mode = internal::traits<SelfAdjointView>::Mode
, Flags = internal::traits<SelfAdjointView>::Flags
, TransposeMode = ((int(Mode) & int(Upper)) ? Lower : 0) | ((int(Mode) & int(Lower)) ? Upper : 0)
} |
|
typedef MatrixType_ | MatrixType |
|
typedef TriangularBase< SelfAdjointView > | Base |
|
typedef internal::traits< SelfAdjointView >::MatrixTypeNested | MatrixTypeNested |
|
typedef internal::traits< SelfAdjointView >::MatrixTypeNestedCleaned | MatrixTypeNestedCleaned |
|
typedef MatrixTypeNestedCleaned | NestedExpression |
|
typedef internal::traits< SelfAdjointView >::Scalar | Scalar |
| The type of coefficients in this matrix. More...
|
|
typedef MatrixType::StorageIndex | StorageIndex |
|
typedef internal::remove_all_t< typename MatrixType::ConjugateReturnType > | MatrixConjugateReturnType |
|
typedef SelfAdjointView< std::add_const_t< MatrixType >, UpLo > | ConstSelfAdjointView |
|
typedef MatrixType::PlainObject | PlainObject |
|
typedef SelfAdjointView< const MatrixConjugateReturnType, UpLo > | ConjugateReturnType |
|
typedef SelfAdjointView< const typename MatrixType::AdjointReturnType, TransposeMode > | AdjointReturnType |
|
typedef SelfAdjointView< typename MatrixType::TransposeReturnType, TransposeMode > | TransposeReturnType |
|
typedef SelfAdjointView< const typename MatrixType::ConstTransposeReturnType, TransposeMode > | ConstTransposeReturnType |
|
typedef NumTraits< Scalar >::Real | RealScalar |
|
typedef Matrix< RealScalar, internal::traits< MatrixType >::ColsAtCompileTime, 1 > | EigenvaluesReturnType |
|
enum | |
|
typedef internal::traits< SelfAdjointView< MatrixType_, UpLo > >::Scalar | Scalar |
|
typedef internal::traits< SelfAdjointView< MatrixType_, UpLo > >::StorageKind | StorageKind |
|
typedef internal::traits< SelfAdjointView< MatrixType_, UpLo > >::StorageIndex | StorageIndex |
|
typedef internal::traits< SelfAdjointView< MatrixType_, UpLo > >::FullMatrixType | DenseMatrixType |
|
typedef DenseMatrixType | DenseType |
|
typedef SelfAdjointView< MatrixType_, UpLo > const & | Nested |
|
typedef Eigen::Index | Index |
| The interface type of indices. More...
|
|
typedef internal::traits< Derived >::StorageKind | StorageKind |
|
|
EIGEN_DEVICE_FUNC | SelfAdjointView (MatrixType &matrix) |
|
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index | rows () const EIGEN_NOEXCEPT |
|
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index | cols () const EIGEN_NOEXCEPT |
|
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index | outerStride () const EIGEN_NOEXCEPT |
|
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index | innerStride () const EIGEN_NOEXCEPT |
|
EIGEN_DEVICE_FUNC Scalar | coeff (Index row, Index col) const |
|
EIGEN_DEVICE_FUNC Scalar & | coeffRef (Index row, Index col) |
|
EIGEN_DEVICE_FUNC const MatrixTypeNestedCleaned & | _expression () const |
|
EIGEN_DEVICE_FUNC const MatrixTypeNestedCleaned & | nestedExpression () const |
|
EIGEN_DEVICE_FUNC MatrixTypeNestedCleaned & | nestedExpression () |
|
template<typename OtherDerived > |
EIGEN_DEVICE_FUNC const Product< SelfAdjointView, OtherDerived > | operator* (const MatrixBase< OtherDerived > &rhs) const |
|
template<typename DerivedU , typename DerivedV > |
EIGEN_DEVICE_FUNC SelfAdjointView & | rankUpdate (const MatrixBase< DerivedU > &u, const MatrixBase< DerivedV > &v, const Scalar &alpha=Scalar(1)) |
|
template<typename DerivedU > |
EIGEN_DEVICE_FUNC SelfAdjointView & | rankUpdate (const MatrixBase< DerivedU > &u, const Scalar &alpha=Scalar(1)) |
|
template<unsigned int TriMode> |
EIGEN_DEVICE_FUNC std::conditional_t<(TriMode &(Upper|Lower))==(UpLo &(Upper|Lower)), TriangularView< MatrixType, TriMode >, TriangularView< typename MatrixType::AdjointReturnType, TriMode > > | triangularView () const |
|
EIGEN_DEVICE_FUNC const ConjugateReturnType | conjugate () const |
|
template<bool Cond> |
EIGEN_DEVICE_FUNC std::conditional_t< Cond, ConjugateReturnType, ConstSelfAdjointView > | conjugateIf () const |
|
EIGEN_DEVICE_FUNC const AdjointReturnType | adjoint () const |
|
template<class Dummy = int> |
EIGEN_DEVICE_FUNC TransposeReturnType | transpose (std::enable_if_t< Eigen::internal::is_lvalue< MatrixType >::value, Dummy * >=nullptr) |
|
EIGEN_DEVICE_FUNC const ConstTransposeReturnType | transpose () const |
|
EIGEN_DEVICE_FUNC MatrixType::ConstDiagonalReturnType | diagonal () const |
|
const LLT< PlainObject, UpLo > | llt () const |
|
const LDLT< PlainObject, UpLo > | ldlt () const |
|
EIGEN_DEVICE_FUNC EigenvaluesReturnType | eigenvalues () const |
| Computes the eigenvalues of a matrix. More...
|
|
EIGEN_DEVICE_FUNC RealScalar | operatorNorm () const |
| Computes the L2 operator norm. More...
|
|
template<typename DerivedU > |
EIGEN_DEVICE_FUNC SelfAdjointView< MatrixType, UpLo > & | rankUpdate (const MatrixBase< DerivedU > &u, const Scalar &alpha) |
|
template<typename DerivedU , typename DerivedV > |
EIGEN_DEVICE_FUNC SelfAdjointView< MatrixType, UpLo > & | rankUpdate (const MatrixBase< DerivedU > &u, const MatrixBase< DerivedV > &v, const Scalar &alpha) |
|
EIGEN_DEVICE_FUNC | TriangularBase () |
|
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index | rows () const EIGEN_NOEXCEPT |
|
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index | cols () const EIGEN_NOEXCEPT |
|
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index | outerStride () const EIGEN_NOEXCEPT |
|
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index | innerStride () const EIGEN_NOEXCEPT |
|
EIGEN_DEVICE_FUNC void | resize (Index rows, Index cols) |
|
EIGEN_DEVICE_FUNC Scalar | coeff (Index row, Index col) const |
|
EIGEN_DEVICE_FUNC Scalar & | coeffRef (Index row, Index col) |
|
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void | copyCoeff (Index row, Index col, Other &other) |
|
EIGEN_DEVICE_FUNC Scalar | operator() (Index row, Index col) const |
|
EIGEN_DEVICE_FUNC Scalar & | operator() (Index row, Index col) |
|
EIGEN_DEVICE_FUNC const SelfAdjointView< MatrixType_, UpLo > & | derived () const |
|
EIGEN_DEVICE_FUNC SelfAdjointView< MatrixType_, UpLo > & | derived () |
|
EIGEN_DEVICE_FUNC void | evalTo (MatrixBase< DenseDerived > &other) const |
|
EIGEN_DEVICE_FUNC void | evalToLazy (MatrixBase< DenseDerived > &other) const |
|
EIGEN_DEVICE_FUNC DenseMatrixType | toDenseMatrix () const |
|
constexpr EIGEN_DEVICE_FUNC Derived & | derived () |
|
constexpr EIGEN_DEVICE_FUNC const Derived & | derived () const |
|
EIGEN_DEVICE_FUNC Derived & | const_cast_derived () const |
|
EIGEN_DEVICE_FUNC const Derived & | const_derived () const |
|
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index | rows () const EIGEN_NOEXCEPT |
|
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index | cols () const EIGEN_NOEXCEPT |
|
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index | size () const EIGEN_NOEXCEPT |
|
template<typename Dest > |
EIGEN_DEVICE_FUNC void | evalTo (Dest &dst) const |
|
template<typename Dest > |
EIGEN_DEVICE_FUNC void | addTo (Dest &dst) const |
|
template<typename Dest > |
EIGEN_DEVICE_FUNC void | subTo (Dest &dst) const |
|
template<typename Dest > |
EIGEN_DEVICE_FUNC void | applyThisOnTheRight (Dest &dst) const |
|
template<typename Dest > |
EIGEN_DEVICE_FUNC void | applyThisOnTheLeft (Dest &dst) const |
|
template<typename Device > |
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE DeviceWrapper< Derived, Device > | device (Device &device) |
|
template<typename Device > |
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE DeviceWrapper< const Derived, Device > | device (Device &device) const |
|
template<typename MatrixType_, unsigned int UpLo>
class Eigen::SelfAdjointView< MatrixType_, UpLo >
Expression of a selfadjoint matrix from a triangular part of a dense matrix.
- Template Parameters
-
MatrixType | the type of the dense matrix storing the coefficients |
TriangularPart | can be either Lower or Upper |
This class is an expression of a sefladjoint matrix from a triangular part of a matrix with given dense storage of the coefficients. It is the return type of MatrixBase::selfadjointView() and most of the time this is the only way that it is used.
- See also
- class TriangularBase, MatrixBase::selfadjointView()
template<typename MatrixType , unsigned int UpLo>
Computes the L2 operator norm.
- Returns
- Operator norm of the matrix.
\eigenvalues_module This function computes the L2 operator norm of a self-adjoint matrix. For a self-adjoint matrix, the operator norm is the largest eigenvalue.
The current implementation uses the eigenvalues of the matrix, as computed by eigenvalues(), to compute the operator norm of the matrix.
Example:
MatrixXd
ones = MatrixXd::Ones(3, 3);
cout <<
"The operator norm of the 3x3 matrix of ones is " <<
ones.selfadjointView<
Lower>().
operatorNorm() << endl;
EIGEN_DEVICE_FUNC RealScalar operatorNorm() const
Computes the L2 operator norm.
Definition: MatrixBaseEigenvalues.h:136
Output:
- See also
- eigenvalues(), MatrixBase::operatorNorm()
template<typename MatrixType_ , unsigned int UpLo>
template<typename DerivedU , typename DerivedV >
60 typedef internal::blas_traits<DerivedU> UBlasTraits;
61 typedef typename UBlasTraits::DirectLinearAccessType ActualUType;
62 typedef internal::remove_all_t<ActualUType> ActualUType_;
63 internal::add_const_on_value_type_t<ActualUType> actualU = UBlasTraits::extract(u.derived());
65 typedef internal::blas_traits<DerivedV> VBlasTraits;
66 typedef typename VBlasTraits::DirectLinearAccessType ActualVType;
67 typedef internal::remove_all_t<ActualVType> ActualVType_;
68 internal::add_const_on_value_type_t<ActualVType> actualV = VBlasTraits::extract(
v.derived());
73 enum { IsRowMajor = (internal::traits<MatrixType>::Flags &
RowMajorBit) ? 1 : 0 };
74 Scalar actualAlpha =
alpha * UBlasTraits::extractScalarFactor(u.derived()) *
84 internal::selfadjoint_rank2_update_selector<
Scalar,
Index, UType, VType,
88 VType(actualV), actualAlpha);
AnnoyingScalar conj(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:133
Array< int, Dynamic, 1 > v
Definition: Array_initializer_list_vector_cxx11.cpp:1
int data[]
Definition: Map_placement_new.cpp:1
SCALAR Scalar
Definition: bench_gemm.cpp:45
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index outerStride() const EIGEN_NOEXCEPT
Definition: SelfAdjointView.h:78
EIGEN_DEVICE_FUNC const MatrixTypeNestedCleaned & _expression() const
Definition: SelfAdjointView.h:99
internal::traits< SelfAdjointView >::Scalar Scalar
The type of coefficients in this matrix.
Definition: SelfAdjointView.h:62
const unsigned int RowMajorBit
Definition: Constants.h:70
RealScalar alpha
Definition: level1_cplx_impl.h:151
std::conditional<!Cond, const T &, CwiseUnaryOp< scalar_conjugate_op< typename traits< T >::Scalar >, T > > conj_expr_if
Definition: SelfadjointRank2Update.h:52
typename remove_all< T >::type remove_all_t
Definition: Meta.h:142
auto run(Kernel kernel, Args &&... args) -> decltype(kernel(args...))
Definition: gpu_test_helper.h:414
type
Definition: compute_granudrum_aor.py:141
Eigen::Index Index
The interface type of indices.
Definition: EigenBase.h:43
EIGEN_DEVICE_FUNC Derived & const_cast_derived() const
Definition: EigenBase.h:53
References alpha, conj(), int(), Eigen::Lower, Eigen::RowMajorBit, Eigen::run(), compute_granudrum_aor::type, Eigen::Upper, and v.
template<typename MatrixType_ , unsigned int UpLo>
template<typename DerivedU , typename DerivedV >
Perform a symmetric rank 2 update of the selfadjoint matrix *this
: \( this = this + \alpha u v^* + conj(\alpha) v u^* \)
- Returns
- a reference to
*this
The vectors u and v
must be column vectors, however they can be a adjoint expression without any overhead. Only the meaningful triangular part of the matrix is updated, the rest is left unchanged.
- See also
- rankUpdate(const MatrixBase<DerivedU>&, Scalar)
template<typename MatrixType_ , unsigned int UpLo>
template<unsigned int TriMode>
- Returns
- an expression of a triangular view extracted from the current selfadjoint view of a given triangular part
The parameter TriMode can have the following values: Upper
, StrictlyUpper
, UnitUpper
, Lower
, StrictlyLower
, UnitLower
.
If TriMode
references the same triangular part than *this
, then this method simply return a TriangularView
of the nested expression, otherwise, the nested expression is first transposed, thus returning a TriangularView<Transpose<MatrixType>>
object.
- See also
- MatrixBase::triangularView(), class TriangularView
167 typename MatrixType::ConstTransposeReturnType>
170 typename MatrixType::AdjointReturnType>
173 TriangularView<MatrixType, TriMode>,
174 TriangularView<typename MatrixType::AdjointReturnType, TriMode> >(tmp2);
MatrixXf MatrixType
Definition: benchmark-blocking-sizes.cpp:52
References Eigen::Lower, Eigen::SelfAdjointView< MatrixType_, UpLo >::m_matrix, and Eigen::Upper.