10#ifndef EIGEN_TRANSPOSITIONS_H
11#define EIGEN_TRANSPOSITIONS_H
15template<
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>
116template<
int SizeAtCompileTime,
int MaxSizeAtCompileTime,
typename _StorageIndex>
118 :
traits<PermutationMatrix<SizeAtCompileTime,MaxSizeAtCompileTime,_StorageIndex> >
154template<
int SizeAtCompileTime,
int MaxSizeAtCompileTime,
typename _StorageIndex>
167 template<
typename OtherDerived>
172 template<
typename Other>
177 template<
typename OtherDerived>
202template<
int SizeAtCompileTime,
int MaxSizeAtCompileTime,
typename _StorageIndex,
int _PacketAccess>
204 :
traits<PermutationMatrix<SizeAtCompileTime,MaxSizeAtCompileTime,_StorageIndex> >
212template<
int SizeAtCompileTime,
int MaxSizeAtCompileTime,
typename _StorageIndex,
int PacketAccess>
214 :
public TranspositionsBase<Map<Transpositions<SizeAtCompileTime,MaxSizeAtCompileTime,_StorageIndex>,PacketAccess> >
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;
263template<
typename _IndicesType>
265 :
traits<PermutationWrapper<_IndicesType> >
271template<
typename _IndicesType>
287 template<
typename OtherDerived>
310template<
typename MatrixDerived,
typename TranspositionsDerived>
317 (matrix.derived(), transpositions.
derived());
322template<
typename TranspositionsDerived,
typename MatrixDerived>
324const Product<TranspositionsDerived, MatrixDerived, AliasFreeProduct>
329 (transpositions.
derived(), matrix.derived());
336template<
typename Derived>
343template<
typename TranspositionsDerived>
346 typedef TranspositionsDerived TranspositionType;
347 typedef typename TranspositionType::IndicesType IndicesType;
350 explicit Transpose(
const TranspositionType& t) : m_transpositions(t) {}
361 template<
typename OtherDerived>
friend
370 template<
typename OtherDerived>
#define EIGEN_NOEXCEPT
Definition: Macros.h:1428
#define EIGEN_CONSTEXPR
Definition: Macros.h:797
#define EIGEN_DEVICE_FUNC
Definition: Macros.h:986
Map & operator=(const Map &other)
This is a special case of the templated operator=.
Definition: Transpositions.h:242
Map(const StorageIndex *indicesPtr)
Definition: Transpositions.h:223
IndicesType m_indices
Definition: Transpositions.h:259
Traits::IndicesType IndicesType
Definition: Transpositions.h:220
EIGEN_DEVICE_FUNC IndicesType & indices()
Definition: Transpositions.h:255
TranspositionsBase< Map > Base
Definition: Transpositions.h:219
EIGEN_DEVICE_FUNC const IndicesType & indices() const
const version of indices().
Definition: Transpositions.h:251
Map & operator=(const TranspositionsBase< OtherDerived > &other)
Copies the other transpositions into *this.
Definition: Transpositions.h:233
IndicesType::Scalar StorageIndex
Definition: Transpositions.h:221
Map(const StorageIndex *indicesPtr, Index size)
Definition: Transpositions.h:227
A matrix or vector expression mapping an existing array of data.
Definition: Map.h:96
Base class for all dense matrices, vectors, and expressions.
Definition: MatrixBase.h:50
The matrix class, also used for vectors and row-vectors.
Definition: Matrix.h:180
Expression of the product of two arbitrary matrices or vectors.
Definition: Product.h:75
EIGEN_DEVICE_FUNC const TranspositionType & nestedExpression() const
Definition: Transpositions.h:378
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index cols() const EIGEN_NOEXCEPT
Definition: Transpositions.h:357
friend const Product< OtherDerived, Transpose, AliasFreeProduct > operator*(const MatrixBase< OtherDerived > &matrix, const Transpose &trt)
Definition: Transpositions.h:363
const TranspositionType & m_transpositions
Definition: Transpositions.h:381
Transpose(const TranspositionType &t)
Definition: Transpositions.h:350
const Product< Transpose, OtherDerived, AliasFreeProduct > operator*(const MatrixBase< OtherDerived > &matrix) const
Definition: Transpositions.h:372
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index rows() const EIGEN_NOEXCEPT
Definition: Transpositions.h:355
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index size() const EIGEN_NOEXCEPT
Definition: Transpositions.h:353
Expression of the transpose of a matrix.
Definition: Transpose.h:54
Definition: Transpositions.h:17
Transpose< TranspositionsBase > transpose() const
Definition: Transpositions.h:109
void resize(Index newSize)
Resizes to given size.
Definition: Transpositions.h:71
Eigen::Index Index
Definition: Transpositions.h:24
EIGEN_DEVICE_FUNC Index size() const
Definition: Transpositions.h:41
const StorageIndex & operator[](Index i) const
Direct access to the underlying index vector.
Definition: Transpositions.h:59
EIGEN_DEVICE_FUNC const Derived & derived() const
Definition: Transpositions.h:29
EIGEN_DEVICE_FUNC Index cols() const
Definition: Transpositions.h:47
EIGEN_DEVICE_FUNC Index rows() const
Definition: Transpositions.h:44
const StorageIndex & operator()(Index i) const
Direct access to the underlying index vector.
Definition: Transpositions.h:55
EIGEN_DEVICE_FUNC const IndicesType & indices() const
const version of indices().
Definition: Transpositions.h:65
IndicesType::Scalar StorageIndex
Definition: Transpositions.h:23
void setIdentity()
Sets *this to represents an identity transformation.
Definition: Transpositions.h:77
StorageIndex & operator[](Index i)
Direct access to the underlying index vector.
Definition: Transpositions.h:61
Traits::IndicesType IndicesType
Definition: Transpositions.h:22
EIGEN_DEVICE_FUNC const StorageIndex & coeff(Index i) const
Direct access to the underlying index vector.
Definition: Transpositions.h:51
Derived & operator=(const TranspositionsBase< OtherDerived > &other)
Copies the other transpositions into *this.
Definition: Transpositions.h:33
StorageIndex & coeffRef(Index i)
Direct access to the underlying index vector.
Definition: Transpositions.h:53
StorageIndex & operator()(Index i)
Direct access to the underlying index vector.
Definition: Transpositions.h:57
EIGEN_DEVICE_FUNC Derived & derived()
Definition: Transpositions.h:27
EIGEN_DEVICE_FUNC IndicesType & indices()
Definition: Transpositions.h:68
Transpose< TranspositionsBase > inverse() const
Definition: Transpositions.h:105
Represents a sequence of transpositions (row/column interchange)
Definition: Transpositions.h:156
TranspositionsBase< Transpositions > Base
Definition: Transpositions.h:160
IndicesType m_indices
Definition: Transpositions.h:197
Transpositions(const MatrixBase< Other > &indices)
Generic constructor from expression of the transposition indices.
Definition: Transpositions.h:173
Transpositions()
Definition: Transpositions.h:164
EIGEN_DEVICE_FUNC const IndicesType & indices() const
const version of indices().
Definition: Transpositions.h:190
Transpositions(Index size)
Constructs an uninitialized permutation matrix of given size.
Definition: Transpositions.h:185
Traits::IndicesType IndicesType
Definition: Transpositions.h:161
Transpositions & operator=(const TranspositionsBase< OtherDerived > &other)
Copies the other transpositions into *this.
Definition: Transpositions.h:178
Transpositions(const TranspositionsBase< OtherDerived > &other)
Copy constructor.
Definition: Transpositions.h:168
IndicesType::Scalar StorageIndex
Definition: Transpositions.h:162
EIGEN_DEVICE_FUNC IndicesType & indices()
Definition: Transpositions.h:193
Definition: Transpositions.h:274
EIGEN_DEVICE_FUNC const IndicesType & indices() const
const version of indices().
Definition: Transpositions.h:295
TranspositionsWrapper & operator=(const TranspositionsBase< OtherDerived > &other)
Copies the other transpositions into *this.
Definition: Transpositions.h:288
TranspositionsWrapper(IndicesType &indices)
Definition: Transpositions.h:282
TranspositionsBase< TranspositionsWrapper > Base
Definition: Transpositions.h:278
EIGEN_DEVICE_FUNC IndicesType & indices()
Definition: Transpositions.h:299
IndicesType::Scalar StorageIndex
Definition: Transpositions.h:280
Traits::IndicesType IndicesType
Definition: Transpositions.h:279
IndicesType::Nested m_indices
Definition: Transpositions.h:303
EIGEN_CONSTEXPR Index size(const T &x)
Definition: Meta.h:479
Namespace containing all symbols from the Eigen library.
Definition: Core:141
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:74
const Product< SparseDerived, PermDerived, AliasFreeProduct > operator*(const SparseMatrixBase< SparseDerived > &matrix, const PermutationBase< PermDerived > &perm)
Definition: SparsePermutation.h:147
Definition: Eigen_Colamd.h:50
The type used to identify a permutation storage.
Definition: Constants.h:519
TranspositionsStorage StorageKind
Definition: Transpositions.h:208
_StorageIndex StorageIndex
Definition: Transpositions.h:207
Map< const Matrix< _StorageIndex, SizeAtCompileTime, 1, 0, MaxSizeAtCompileTime, 1 >, _PacketAccess > IndicesType
Definition: Transpositions.h:206
Matrix< _StorageIndex, SizeAtCompileTime, 1, 0, MaxSizeAtCompileTime, 1 > IndicesType
Definition: Transpositions.h:120
TranspositionsStorage StorageKind
Definition: Transpositions.h:121
TranspositionsStorage StorageKind
Definition: Transpositions.h:267