10#ifndef EIGEN_SELFADJOINTRANK2UPTADE_H
11#define EIGEN_SELFADJOINTRANK2UPTADE_H
21template<
typename Scalar,
typename Index,
typename UType,
typename VType,
int UpLo>
24template<
typename Scalar,
typename Index,
typename UType,
typename VType>
28 void run(Scalar* mat,
Index stride,
const UType& u,
const VType& v,
const Scalar& alpha)
34 (numext::conj(alpha) * numext::conj(u.coeff(i))) * v.tail(
size-i)
35 + (alpha * numext::conj(v.coeff(i))) * u.tail(
size-i);
40template<
typename Scalar,
typename Index,
typename UType,
typename VType>
43 static void run(Scalar* mat,
Index stride,
const UType& u,
const VType& v,
const Scalar& alpha)
48 (numext::conj(alpha) * numext::conj(u.coeff(i))) * v.head(i+1)
49 + (alpha * numext::conj(v.coeff(i))) * u.head(i+1);
55 CwiseUnaryOp<scalar_conjugate_op<typename traits<T>::Scalar>,T> > {};
59template<
typename MatrixType,
unsigned int UpLo>
60template<
typename DerivedU,
typename DerivedV>
65 typedef typename UBlasTraits::DirectLinearAccessType ActualUType;
70 typedef typename VBlasTraits::DirectLinearAccessType ActualVType;
78 Scalar actualAlpha = alpha * UBlasTraits::extractScalarFactor(u.derived())
79 * numext::conj(VBlasTraits::extractScalarFactor(v.derived()));
81 actualAlpha = numext::conj(actualAlpha);
87 ::run(_expression().const_cast_derived().data(),_expression().outerStride(),UType(actualU),VType(actualV),actualAlpha);
#define EIGEN_DEVICE_FUNC
Definition: Macros.h:986
A matrix or vector expression mapping an existing array of data.
Definition: Map.h:96
Base class for all dense matrices, vectors, and expressions.
Definition: MatrixBase.h:50
Expression of a selfadjoint matrix from a triangular part of a dense matrix.
Definition: SelfAdjointView.h:51
EIGEN_DEVICE_FUNC SelfAdjointView & rankUpdate(const MatrixBase< DerivedU > &u, const MatrixBase< DerivedV > &v, const Scalar &alpha=Scalar(1))
Perform a symmetric rank 2 update of the selfadjoint matrix *this: .
internal::traits< SelfAdjointView >::Scalar Scalar
The type of coefficients in this matrix.
Definition: SelfAdjointView.h:61
type
Definition: core.h:575
@ Lower
View matrix as a lower triangular matrix.
Definition: Constants.h:209
@ Upper
View matrix as an upper triangular matrix.
Definition: Constants.h:211
const unsigned int RowMajorBit
for a matrix, this means that the storage order is row-major.
Definition: Constants.h:66
EIGEN_CONSTEXPR Index size(const T &x)
Definition: Meta.h:479
Namespace containing all symbols from the Eigen library.
Definition: MatrixExponential.h:16
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:74
Definition: Eigen_Colamd.h:50
const T type
Definition: Meta.h:214
Definition: BlasUtil.h:403
Definition: SelfadjointRank2Update.h:55
T type
Definition: Meta.h:126
static EIGEN_DEVICE_FUNC void run(Scalar *mat, Index stride, const UType &u, const VType &v, const Scalar &alpha)
Definition: SelfadjointRank2Update.h:28
static void run(Scalar *mat, Index stride, const UType &u, const VType &v, const Scalar &alpha)
Definition: SelfadjointRank2Update.h:43
Definition: SelfadjointRank2Update.h:22
Definition: ForwardDeclarations.h:17