MOAB
4.9.3pre
|
#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) |
Definition at line 139 of file OrthoMethods.h.
typedef NumTraits<Scalar>::Real Eigen::internal::unitOrthogonal_selector< Derived, Size >::RealScalar |
Definition at line 143 of file OrthoMethods.h.
typedef traits<Derived>::Scalar Eigen::internal::unitOrthogonal_selector< Derived, Size >::Scalar |
Definition at line 142 of file OrthoMethods.h.
typedef Matrix<Scalar,2,1> Eigen::internal::unitOrthogonal_selector< Derived, Size >::Vector2 |
Definition at line 144 of file OrthoMethods.h.
typedef plain_matrix_type<Derived>::type Eigen::internal::unitOrthogonal_selector< Derived, Size >::VectorType |
Definition at line 141 of file OrthoMethods.h.
static EIGEN_DEVICE_FUNC VectorType Eigen::internal::unitOrthogonal_selector< Derived, Size >::run | ( | const Derived & | src | ) | [inline, static] |
Definition at line 146 of file OrthoMethods.h.
{ VectorType perp = VectorType::Zero(src.size()); Index maxi = 0; Index sndi = 0; src.cwiseAbs().maxCoeff(&maxi); if (maxi==0) sndi = 1; RealScalar invnm = RealScalar(1)/(Vector2() << src.coeff(sndi),src.coeff(maxi)).finished().norm(); perp.coeffRef(maxi) = -numext::conj(src.coeff(sndi)) * invnm; perp.coeffRef(sndi) = numext::conj(src.coeff(maxi)) * invnm; return perp; }