Eigen::internal::unitOrthogonal_selector< Derived, Size > Struct Template Reference

#include <OrthoMethods.h>

Public Types

typedef plain_matrix_type< Derived >::type VectorType
 
typedef traits< Derived >::Scalar Scalar
 
typedef NumTraits< Scalar >::Real RealScalar
 
typedef Matrix< Scalar, 2, 1 > Vector2
 

Static Public Member Functions

static EIGEN_DEVICE_FUNC VectorType run (const Derived &src)
 

Member Typedef Documentation

◆ RealScalar

template<typename Derived , int Size = Derived::SizeAtCompileTime>
typedef NumTraits<Scalar>::Real Eigen::internal::unitOrthogonal_selector< Derived, Size >::RealScalar

◆ Scalar

template<typename Derived , int Size = Derived::SizeAtCompileTime>
typedef traits<Derived>::Scalar Eigen::internal::unitOrthogonal_selector< Derived, Size >::Scalar

◆ Vector2

template<typename Derived , int Size = Derived::SizeAtCompileTime>
typedef Matrix<Scalar, 2, 1> Eigen::internal::unitOrthogonal_selector< Derived, Size >::Vector2

◆ VectorType

template<typename Derived , int Size = Derived::SizeAtCompileTime>
typedef plain_matrix_type<Derived>::type Eigen::internal::unitOrthogonal_selector< Derived, Size >::VectorType

Member Function Documentation

◆ run()

template<typename Derived , int Size = Derived::SizeAtCompileTime>
static EIGEN_DEVICE_FUNC VectorType Eigen::internal::unitOrthogonal_selector< Derived, Size >::run ( const Derived &  src)
inlinestatic
185  {
186  VectorType perp = VectorType::Zero(src.size());
187  Index maxi = 0;
188  Index sndi = 0;
189  src.cwiseAbs().maxCoeff(&maxi);
190  if (maxi == 0) sndi = 1;
191  RealScalar invnm = RealScalar(1) / (Vector2() << src.coeff(sndi), src.coeff(maxi)).finished().norm();
192  perp.coeffRef(maxi) = -numext::conj(src.coeff(sndi)) * invnm;
193  perp.coeffRef(sndi) = numext::conj(src.coeff(maxi)) * invnm;
194 
195  return perp;
196  }
AnnoyingScalar conj(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:133
NumTraits< Scalar >::Real RealScalar
Definition: bench_gemm.cpp:46
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE T maxi(const T &x, const T &y)
Definition: MathFunctions.h:926
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:83
bool finished
Definition: MergeRestartFiles.py:79
double Zero
Definition: pseudosolid_node_update_elements.cc:35
NumTraits< Scalar >::Real RealScalar
Definition: OrthoMethods.h:183
Matrix< Scalar, 2, 1 > Vector2
Definition: OrthoMethods.h:184
Definition: fft_test_shared.h:66

References conj(), MergeRestartFiles::finished, Eigen::numext::maxi(), and oomph::PseudoSolidHelper::Zero.

Referenced by Eigen::MatrixBase< Derived >::unitOrthogonal().


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