Prusa Slicer 2.6.0
Loading...
Searching...
No Matches
Eigen::internal::unitOrthogonal_selector< Derived, Size > Struct Template Reference

#include <src/eigen/Eigen/src/Geometry/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)
 

Detailed Description

template<typename Derived, int Size = Derived::SizeAtCompileTime>
struct Eigen::internal::unitOrthogonal_selector< Derived, Size >

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
148 {
149 VectorType perp = VectorType::Zero(src.size());
150 Index maxi = 0;
151 Index sndi = 0;
152 src.cwiseAbs().maxCoeff(&maxi);
153 if (maxi==0)
154 sndi = 1;
155 RealScalar invnm = RealScalar(1)/(Vector2() << src.coeff(sndi),src.coeff(maxi)).finished().norm();
156 perp.coeffRef(maxi) = -numext::conj(src.coeff(sndi)) * invnm;
157 perp.coeffRef(sndi) = numext::conj(src.coeff(maxi)) * invnm;
158
159 return perp;
160 }
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE T maxi(const T &x, const T &y)
Definition MathFunctions.h:823
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition Meta.h:33
Pt perp(const Pt &p)
Definition geometry_traits.hpp:335
NumTraits< Scalar >::Real RealScalar
Definition OrthoMethods.h:144
Matrix< Scalar, 2, 1 > Vector2
Definition OrthoMethods.h:145
plain_matrix_type< Derived >::type VectorType
Definition OrthoMethods.h:142

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

+ Here is the caller graph for this function:

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