10#ifndef EIGEN_INVERSE_H
11#define EIGEN_INVERSE_H
14#include "./InternalHeaderCheck.h"
18template <
typename XprType,
typename StorageKind>
23template <
typename XprType>
24struct traits<Inverse<XprType> > : traits<typename XprType::PlainObject> {
25 typedef typename XprType::PlainObject PlainObject;
26 typedef traits<PlainObject> BaseTraits;
42template <
typename XprType>
43class Inverse :
public InverseImpl<XprType, typename internal::traits<XprType>::StorageKind> {
45 typedef typename XprType::StorageIndex StorageIndex;
46 typedef typename XprType::Scalar Scalar;
47 typedef typename internal::ref_selector<XprType>::type XprTypeNested;
48 typedef internal::remove_all_t<XprTypeNested> XprTypeNestedCleaned;
49 typedef typename internal::ref_selector<Inverse>::type Nested;
50 typedef internal::remove_all_t<XprType> NestedExpression;
52 explicit EIGEN_DEVICE_FUNC Inverse(
const XprType& xpr) : m_xpr(xpr) {}
54 EIGEN_DEVICE_FUNC
constexpr Index rows()
const noexcept {
return m_xpr.cols(); }
55 EIGEN_DEVICE_FUNC
constexpr Index cols()
const noexcept {
return m_xpr.rows(); }
57 EIGEN_DEVICE_FUNC
const XprTypeNestedCleaned& nestedExpression()
const {
return m_xpr; }
64template <
typename XprType,
typename StorageKind>
65class InverseImpl :
public internal::generic_xpr_base<Inverse<XprType> >::type {
67 typedef typename internal::generic_xpr_base<Inverse<XprType> >::type Base;
68 typedef typename XprType::Scalar
Scalar;
87template <
typename ArgType>
88struct unary_evaluator<Inverse<ArgType> > :
public evaluator<typename Inverse<ArgType>::PlainObject> {
89 typedef Inverse<ArgType> InverseType;
90 typedef typename InverseType::PlainObject PlainObject;
91 typedef evaluator<PlainObject> Base;
95 EIGEN_DEVICE_FUNC unary_evaluator(
const InverseType& inv_xpr) : m_result(inv_xpr.rows(), inv_xpr.cols()) {
96 internal::construct_at<Base>(
this, m_result);
97 internal::call_assignment_no_alias(m_result, inv_xpr);
101 PlainObject m_result;
const unsigned int EvalBeforeNestingBit
Definition Constants.h:74
const unsigned int RowMajorBit
Definition Constants.h:70
Namespace containing all symbols from the Eigen library.
Definition B01_Experimental.dox:1
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition Meta.h:82