10 #ifndef EIGEN_TRANSPOSITIONS_H 11 #define EIGEN_TRANSPOSITIONS_H 15 template<
typename Derived>
27 Derived&
derived() {
return *
static_cast<Derived*
>(
this); }
29 const Derived&
derived()
const {
return *
static_cast<const Derived*
>(
this); }
32 template<
typename OtherDerived>
51 inline const StorageIndex&
coeff(Index
i)
const {
return indices().coeff(i); }
79 for(StorageIndex
i = 0;
i <
indices().size(); ++
i)
116 template<
int SizeAtCompileTime,
int MaxSizeAtCompileTime,
typename _StorageIndex>
118 :
traits<PermutationMatrix<SizeAtCompileTime,MaxSizeAtCompileTime,_StorageIndex> >
154 template<
int SizeAtCompileTime,
int MaxSizeAtCompileTime,
typename _StorageIndex>
167 template<
typename OtherDerived>
169 : m_indices(other.
indices()) {}
172 template<
typename Other>
177 template<
typename OtherDerived>
180 return Base::operator=(other);
190 const IndicesType&
indices()
const {
return m_indices; }
202 template<
int SizeAtCompileTime,
int MaxSizeAtCompileTime,
typename _StorageIndex,
int _PacketAccess>
204 :
traits<PermutationMatrix<SizeAtCompileTime,MaxSizeAtCompileTime,_StorageIndex> >
212 template<
int SizeAtCompileTime,
int MaxSizeAtCompileTime,
typename _StorageIndex,
int PacketAccess>
214 :
public TranspositionsBase<Map<Transpositions<SizeAtCompileTime,MaxSizeAtCompileTime,_StorageIndex>,PacketAccess> >
223 explicit inline Map(
const StorageIndex* indicesPtr)
224 : m_indices(indicesPtr)
228 : m_indices(indicesPtr,size)
232 template<
typename OtherDerived>
235 return Base::operator=(other);
238 #ifndef EIGEN_PARSED_BY_DOXYGEN 244 m_indices = other.m_indices;
251 const IndicesType&
indices()
const {
return m_indices; }
263 template<
typename _IndicesType>
265 :
traits<PermutationWrapper<_IndicesType> >
271 template<
typename _IndicesType>
287 template<
typename OtherDerived>
290 return Base::operator=(other);
295 const IndicesType&
indices()
const {
return m_indices; }
310 template<
typename MatrixDerived,
typename TranspositionsDerived>
317 (matrix.derived(), transpositions.
derived());
322 template<
typename TranspositionsDerived,
typename MatrixDerived>
329 (transpositions.
derived(), matrix.derived());
336 template<
typename Derived>
343 template<
typename TranspositionsDerived>
350 explicit Transpose(
const TranspositionType&
t) : m_transpositions(t) {}
361 template<
typename OtherDerived>
friend 370 template<
typename OtherDerived>
386 #endif // EIGEN_TRANSPOSITIONS_H EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index cols() const EIGEN_NOEXCEPT
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index rows() const EIGEN_NOEXCEPT
internal::traits< Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::Scalar Scalar
Traits::IndicesType IndicesType
Expression of the product of two arbitrary matrices or vectors.
Derived & operator=(const TranspositionsBase< OtherDerived > &other)
Map(const StorageIndex *indicesPtr)
A matrix or vector expression mapping an existing array of data.
Expression of the transpose of a matrix.
Traits::IndicesType IndicesType
EIGEN_DEVICE_FUNC const Derived & derived() const
TranspositionsDerived TranspositionType
Namespace containing all symbols from the Eigen library.
TranspositionsStorage StorageKind
TranspositionType::IndicesType IndicesType
_StorageIndex StorageIndex
TranspositionsBase< Map > Base
internal::traits< Map > Traits
EIGEN_DEVICE_FUNC IndicesType & indices()
IndicesType::Scalar StorageIndex
Transpositions(const TranspositionsBase< OtherDerived > &other)
EIGEN_DEVICE_FUNC IndicesType & indices()
EIGEN_DEVICE_FUNC const IndicesType & indices() const
internal::traits< Transpositions > Traits
Traits::IndicesType IndicesType
EIGEN_DEVICE_FUNC const StorageIndex & coeff(Index i) const
StorageIndex & coeffRef(Index i)
Traits::IndicesType IndicesType
Transpose< TranspositionsBase > inverse() const
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index size() const EIGEN_NOEXCEPT
EIGEN_DEVICE_FUNC const IndicesType & indices() const
const Product< Transpose, OtherDerived, AliasFreeProduct > operator*(const MatrixBase< OtherDerived > &matrix) const
TranspositionsStorage StorageKind
const StorageIndex & operator[](Index i) const
const TranspositionType & m_transpositions
EIGEN_DEVICE_FUNC const TranspositionType & nestedExpression() const
EIGEN_DEVICE_FUNC const IndicesType & indices() const
EIGEN_DEVICE_FUNC const IndicesType & indices() const
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Transpositions(Index size)
EIGEN_DEVICE_FUNC IndicesType & indices()
TranspositionsWrapper(IndicesType &indices)
Map & operator=(const TranspositionsBase< OtherDerived > &other)
EIGEN_DEVICE_FUNC Index size() const
Map & operator=(const Map &other)
void resize(Index newSize)
EIGEN_DEVICE_FUNC const Product< MatrixDerived, PermutationDerived, AliasFreeProduct > operator*(const MatrixBase< MatrixDerived > &matrix, const PermutationBase< PermutationDerived > &permutation)
Transpositions(const MatrixBase< Other > &indices)
TranspositionsBase< TranspositionsWrapper > Base
IndicesType::Scalar StorageIndex
Transpose< TranspositionsBase > transpose() const
internal::traits< TranspositionsWrapper > Traits
#define EIGEN_DEVICE_FUNC
StorageIndex & operator()(Index i)
Map(const StorageIndex *indicesPtr, Index size)
Transpositions & operator=(const TranspositionsBase< OtherDerived > &other)
Map< const Matrix< _StorageIndex, SizeAtCompileTime, 1, 0, MaxSizeAtCompileTime, 1 >, _PacketAccess > IndicesType
StorageIndex & operator[](Index i)
Matrix< _StorageIndex, SizeAtCompileTime, 1, 0, MaxSizeAtCompileTime, 1 > IndicesType
TranspositionsWrapper & operator=(const TranspositionsBase< OtherDerived > &other)
EIGEN_DEVICE_FUNC Index rows() const
EIGEN_DEVICE_FUNC IndicesType & indices()
friend const Product< OtherDerived, Transpose, AliasFreeProduct > operator*(const MatrixBase< OtherDerived > &matrix, const Transpose &trt)
EIGEN_DEVICE_FUNC Index cols() const
IndicesType::Scalar StorageIndex
IndicesType::Scalar StorageIndex
const StorageIndex & operator()(Index i) const
Map< Matrix< T, Dynamic, Dynamic, ColMajor >, 0, OuterStride<> > matrix(T *data, int rows, int cols, int stride)
The matrix class, also used for vectors and row-vectors.
TranspositionsStorage StorageKind
Transpose(const TranspositionType &t)
TranspositionsBase< Transpositions > Base
Base class for all dense matrices, vectors, and expressions.
EIGEN_DEVICE_FUNC Derived & derived()
Represents a sequence of transpositions (row/column interchange)
IndicesType::Nested m_indices
internal::traits< Derived > Traits