11 #ifndef EIGEN_ORTHOMETHODS_H
12 #define EIGEN_ORTHOMETHODS_H
22 template <
typename Derived,
typename OtherDerived,
int Size>
38 numext::conj(lhs.coeff(2) * rhs.coeff(0) - lhs.coeff(0) * rhs.coeff(2)),
39 numext::conj(lhs.coeff(0) * rhs.coeff(1) - lhs.coeff(1) * rhs.coeff(0)));
44 template <
typename Derived,
typename OtherDerived>
56 return numext::conj(lhs.coeff(0) * rhs.coeff(1) - lhs.coeff(1) * rhs.coeff(0));
88 template <
typename Derived>
89 template <
typename OtherDerived>
91 #ifndef EIGEN_PARSED_BY_DOXYGEN
94 inline std::conditional_t<SizeAtCompileTime == 2, Scalar, PlainObject>
103 bool Vectorizable =
bool((evaluator<VectorLhs>::Flags & evaluator<VectorRhs>::Flags) &
PacketAccessBit)>
106 const VectorRhs& rhs) {
108 numext::conj(lhs.coeff(1) * rhs.coeff(2) - lhs.coeff(2) * rhs.coeff(1)),
109 numext::conj(lhs.coeff(2) * rhs.coeff(0) - lhs.coeff(0) * rhs.coeff(2)),
110 numext::conj(lhs.coeff(0) * rhs.coeff(1) - lhs.coeff(1) * rhs.coeff(0)), 0);
125 template <
typename Derived>
126 template <
typename OtherDerived>
134 DerivedNested lhs(derived());
135 OtherDerivedNested rhs(other.derived());
150 template <
typename ExpressionType,
int Direction>
151 template <
typename OtherDerived>
157 YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY)
164 eigen_assert(CrossReturnType::RowsAtCompileTime == 3 &&
"the matrix must have exactly 3 rows");
165 res.row(0) = (
mat.row(1) * vec.coeff(2) -
mat.row(2) * vec.coeff(1)).conjugate();
166 res.row(1) = (
mat.row(2) * vec.coeff(0) -
mat.row(0) * vec.coeff(2)).conjugate();
167 res.row(2) = (
mat.row(0) * vec.coeff(1) -
mat.row(1) * vec.coeff(0)).conjugate();
169 eigen_assert(CrossReturnType::ColsAtCompileTime == 3 &&
"the matrix must have exactly 3 columns");
170 res.col(0) = (
mat.col(1) * vec.coeff(2) -
mat.col(2) * vec.coeff(1)).conjugate();
171 res.col(1) = (
mat.col(2) * vec.coeff(0) -
mat.col(0) * vec.coeff(2)).conjugate();
172 res.col(2) = (
mat.col(0) * vec.coeff(1) -
mat.col(1) * vec.coeff(0)).conjugate();
179 template <
typename Derived,
int Size = Derived::SizeAtCompileTime>
189 src.cwiseAbs().maxCoeff(&
maxi);
190 if (
maxi == 0) sndi = 1;
199 template <
typename Derived>
217 perp.coeffRef(2) = 0;
225 perp.coeffRef(0) = 0;
234 template <
typename Derived>
253 template <
typename Derived>
AnnoyingScalar conj(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:133
Eigen::SparseMatrix< double > mat
Definition: EigenUnitTest.cpp:10
Direction
An enum that indicates the direction in Cartesian coordinates.
Definition: GeneralDefine.h:56
#define EIGEN_DEVICE_FUNC
Definition: Macros.h:892
#define eigen_assert(x)
Definition: Macros.h:910
#define EIGEN_STRONG_INLINE
Definition: Macros.h:834
cout<< "Here is the matrix m:"<< endl<< m<< endl;Matrix< ptrdiff_t, 3, 1 > res
Definition: PartialRedux_count.cpp:3
#define EIGEN_STATIC_ASSERT(X, MSG)
Definition: StaticAssert.h:26
#define EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(TYPE, SIZE)
Definition: StaticAssert.h:50
#define EIGEN_STATIC_ASSERT_VECTOR_ONLY(TYPE)
Definition: StaticAssert.h:36
int rows
Definition: Tutorial_commainit_02.cpp:1
int cols
Definition: Tutorial_commainit_02.cpp:1
SCALAR Scalar
Definition: bench_gemm.cpp:45
Base class for all dense matrices, vectors, and expressions.
Definition: MatrixBase.h:52
EIGEN_DEVICE_FUNC internal::cross_impl< Derived, OtherDerived >::return_type cross(const MatrixBase< OtherDerived > &other) const
Base::PlainObject PlainObject
Definition: MatrixBase.h:104
The matrix class, also used for vectors and row-vectors.
Definition: Eigen/Eigen/src/Core/Matrix.h:186
ExpressionType::PlainObject CrossReturnType
Definition: VectorwiseOp.h:653
EIGEN_DEVICE_FUNC PlainObject unitOrthogonal(void) const
Definition: OrthoMethods.h:254
EIGEN_DEVICE_FUNC const CrossReturnType cross(const MatrixBase< OtherDerived > &other) const
Definition: OrthoMethods.h:153
EIGEN_DEVICE_FUNC PlainObject cross3(const MatrixBase< OtherDerived > &other) const
Definition: OrthoMethods.h:127
@ Vertical
Definition: Constants.h:266
const unsigned int PacketAccessBit
Definition: Constants.h:97
EIGEN_DEVICE_FUNC bool isMuchSmallerThan(const Scalar &x, const OtherScalar &y, const typename NumTraits< Scalar >::Real &precision=NumTraits< Scalar >::dummy_precision())
Definition: MathFunctions.h:1916
typename remove_all< T >::type remove_all_t
Definition: Meta.h:142
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE T maxi(const T &x, const T &y)
Definition: MathFunctions.h:926
Namespace containing all symbols from the Eigen library.
Definition: bench_norm.cpp:70
auto run(Kernel kernel, Args &&... args) -> decltype(kernel(args...))
Definition: gpu_test_helper.h:414
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:83
bool finished
Definition: MergeRestartFiles.py:79
type
Definition: compute_granudrum_aor.py:141
Definition: Eigen_Colamd.h:49
double Zero
Definition: pseudosolid_node_update_elements.cc:35
Holds information about the various numeric (i.e. scalar) types allowed by Eigen.
Definition: NumTraits.h:217
Determines whether the given binary operation of two numeric types is allowed and what the scalar ret...
Definition: XprHelper.h:1043
Definition: OrthoMethods.h:104
static EIGEN_DEVICE_FUNC internal::plain_matrix_type< VectorLhs >::type run(const VectorLhs &lhs, const VectorRhs &rhs)
Definition: OrthoMethods.h:105
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE return_type run(const MatrixBase< Derived > &first, const MatrixBase< OtherDerived > &second)
Definition: OrthoMethods.h:50
Scalar return_type
Definition: OrthoMethods.h:48
ScalarBinaryOpTraits< typename internal::traits< Derived >::Scalar, typename internal::traits< OtherDerived >::Scalar >::ReturnType Scalar
Definition: OrthoMethods.h:47
Definition: OrthoMethods.h:23
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE return_type run(const MatrixBase< Derived > &first, const MatrixBase< OtherDerived > &second)
Definition: OrthoMethods.h:28
ScalarBinaryOpTraits< typename internal::traits< Derived >::Scalar, typename internal::traits< OtherDerived >::Scalar >::ReturnType Scalar
Definition: OrthoMethods.h:25
Matrix< Scalar, MatrixBase< Derived >::RowsAtCompileTime, MatrixBase< Derived >::ColsAtCompileTime > return_type
Definition: OrthoMethods.h:26
std::conditional_t< Evaluate, PlainObject, typename ref_selector< T >::type > type
Definition: XprHelper.h:549
Definition: XprHelper.h:389
Definition: ForwardDeclarations.h:21
static EIGEN_DEVICE_FUNC VectorType run(const Derived &src)
Definition: OrthoMethods.h:237
plain_matrix_type< Derived >::type VectorType
Definition: OrthoMethods.h:236
NumTraits< Scalar >::Real RealScalar
Definition: OrthoMethods.h:203
plain_matrix_type< Derived >::type VectorType
Definition: OrthoMethods.h:201
traits< Derived >::Scalar Scalar
Definition: OrthoMethods.h:202
static EIGEN_DEVICE_FUNC VectorType run(const Derived &src)
Definition: OrthoMethods.h:204
Definition: OrthoMethods.h:180
traits< Derived >::Scalar Scalar
Definition: OrthoMethods.h:182
NumTraits< Scalar >::Real RealScalar
Definition: OrthoMethods.h:183
Matrix< Scalar, 2, 1 > Vector2
Definition: OrthoMethods.h:184
plain_matrix_type< Derived >::type VectorType
Definition: OrthoMethods.h:181
static EIGEN_DEVICE_FUNC VectorType run(const Derived &src)
Definition: OrthoMethods.h:185
Definition: fft_test_shared.h:66