11#ifndef EIGEN_ORTHOMETHODS_H
12#define EIGEN_ORTHOMETHODS_H
27template<
typename Derived>
28template<
typename OtherDerived>
29#ifndef EIGEN_PARSED_BY_DOXYGEN
30EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
31typename MatrixBase<Derived>::template cross_product_return_type<OtherDerived>::type
33typename MatrixBase<Derived>::PlainObject
37 EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(Derived,3)
45 numext::conj(lhs.coeff(1) * rhs.coeff(2) - lhs.coeff(2) * rhs.coeff(1)),
46 numext::conj(lhs.coeff(2) * rhs.coeff(0) - lhs.coeff(0) * rhs.coeff(2)),
47 numext::conj(lhs.coeff(0) * rhs.coeff(1) - lhs.coeff(1) * rhs.coeff(0))
54 typename Scalar =
typename VectorLhs::Scalar,
55 bool Vectorizable = bool((VectorLhs::Flags&VectorRhs::Flags)&
PacketAccessBit)>
61 numext::conj(lhs.coeff(1) * rhs.coeff(2) - lhs.coeff(2) * rhs.coeff(1)),
62 numext::conj(lhs.coeff(2) * rhs.coeff(0) - lhs.coeff(0) * rhs.coeff(2)),
63 numext::conj(lhs.coeff(0) * rhs.coeff(1) - lhs.coeff(1) * rhs.coeff(0)),
80template<
typename Derived>
81template<
typename OtherDerived>
85 EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(Derived,4)
94 typename internal::remove_all<DerivedNested>::type,
95 typename internal::remove_all<OtherDerivedNested>::type>::run(lhs,rhs);
107template<
typename ExpressionType,
int Direction>
108template<
typename OtherDerived>
110const typename VectorwiseOp<ExpressionType,Direction>::CrossReturnType
113 EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(
OtherDerived,3)
115 YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY)
120 CrossReturnType res(_expression().rows(),_expression().cols());
123 eigen_assert(CrossReturnType::RowsAtCompileTime==3 &&
"the matrix must have exactly 3 rows");
124 res.row(0) = (
mat.row(1) * vec.coeff(2) -
mat.row(2) * vec.coeff(1)).conjugate();
125 res.row(1) = (
mat.row(2) * vec.coeff(0) -
mat.row(0) * vec.coeff(2)).conjugate();
126 res.row(2) = (
mat.row(0) * vec.coeff(1) -
mat.row(1) * vec.coeff(0)).conjugate();
130 eigen_assert(CrossReturnType::ColsAtCompileTime==3 &&
"the matrix must have exactly 3 columns");
131 res.col(0) = (
mat.col(1) * vec.coeff(2) -
mat.col(2) * vec.coeff(1)).conjugate();
132 res.col(1) = (
mat.col(2) * vec.coeff(0) -
mat.col(0) * vec.coeff(2)).conjugate();
133 res.col(2) = (
mat.col(0) * vec.coeff(1) -
mat.col(1) * vec.coeff(0)).conjugate();
140template<
typename Derived,
int Size = Derived::SizeAtCompileTime>
148 static inline VectorType run(
const Derived&
src)
150 VectorType
perp = VectorType::Zero(
src.size());
153 src.cwiseAbs().maxCoeff(&maxi);
164template<
typename Derived>
171 static inline VectorType run(
const Derived&
src)
181 if((!isMuchSmallerThan(
src.x(),
src.z()))
182 || (!isMuchSmallerThan(
src.y(),
src.z())))
187 perp.coeffRef(2) = 0;
196 perp.coeffRef(0) = 0;
205template<
typename Derived>
210 static inline VectorType run(
const Derived&
src)
211 {
return VectorType(-numext::conj(
src.y()), numext::conj(
src.x())).normalized(); }
225template<
typename Derived>
229 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
Base class for all dense matrices, vectors, and expressions.
Definition MatrixBase.h:50
EIGEN_DEVICE_FUNC RealScalar norm() const
Definition Dot.h:103
Pseudo expression providing broadcasting and partial reduction operations.
Definition VectorwiseOp.h:187
@ Vertical
For Reverse, all columns are reversed; for PartialReduxExpr and VectorwiseOp, act on columns.
Definition Constants.h:264
const unsigned int PacketAccessBit
Short version: means the expression might be vectorized.
Definition Constants.h:94
Namespace containing all symbols from the Eigen library.
Definition LDLT.h:16
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition Meta.h:74
Definition OrthoMethods.h:56
Definition XprHelper.h:295
Definition ForwardDeclarations.h:17
Definition OrthoMethods.h:142