adjoint_specific< true > Struct Reference

Static Public Member Functions

template<typename Vec , typename Mat , typename Scalar >
static void run (const Vec &v1, const Vec &v2, Vec &v3, const Mat &square, Scalar s1, Scalar s2)
 

Member Function Documentation

◆ run()

template<typename Vec , typename Mat , typename Scalar >
static void adjoint_specific< true >::run ( const Vec v1,
const Vec v2,
Vec v3,
const Mat square,
Scalar  s1,
Scalar  s2 
)
inlinestatic
18  {
19  VERIFY(test_isApproxWithRef((s1 * v1 + s2 * v2).dot(v3),
20  numext::conj(s1) * v1.dot(v3) + numext::conj(s2) * v2.dot(v3), 0));
21  VERIFY(test_isApproxWithRef(v3.dot(s1 * v1 + s2 * v2), s1 * v3.dot(v1) + s2 * v3.dot(v2), 0));
22 
23  // check compatibility of dot and adjoint
24  VERIFY(test_isApproxWithRef(v1.dot(square * v2), (square.adjoint() * v1).dot(v2), 0));
25  }
AnnoyingScalar conj(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:133
Map< RowVectorXf > v2(M2.data(), M2.size())
M1<< 1, 2, 3, 4, 5, 6, 7, 8, 9;Map< RowVectorXf > v1(M1.data(), M1.size())
Scalar EIGEN_BLAS_FUNC_NAME() dot(int *n, Scalar *px, int *incx, Scalar *py, int *incy)
Definition: level1_real_impl.h:52
#define VERIFY(a)
Definition: main.h:362
squared absolute sa ArrayBase::abs2 DOXCOMMA MatrixBase::cwiseAbs2 square(power 2)
bool test_isApproxWithRef(const Scalar &a, const Scalar &b, const ScalarRef &ref)
Definition: main.h:642

References conj(), dot(), Eigen::square(), Eigen::test_isApproxWithRef(), v1(), v2(), and VERIFY.


The documentation for this struct was generated from the following file: