10 #ifndef EIGEN_TRANSPOSITIONS_H 11 #define EIGEN_TRANSPOSITIONS_H 15 template<
typename Derived>
26 Derived&
derived() {
return *
static_cast<Derived*
>(
this); }
27 const Derived&
derived()
const {
return *
static_cast<const Derived*
>(
this); }
30 template<
typename OtherDerived>
37 #ifndef EIGEN_PARSED_BY_DOXYGEN 56 inline const StorageIndex&
coeff(Index
i)
const {
return indices().coeff(i); }
82 for(StorageIndex
i = 0;
i <
indices().size(); ++
i)
119 template<
int SizeAtCompileTime,
int MaxSizeAtCompileTime,
typename _StorageIndex>
121 :
traits<PermutationMatrix<SizeAtCompileTime,MaxSizeAtCompileTime,_StorageIndex> >
157 template<
int SizeAtCompileTime,
int MaxSizeAtCompileTime,
typename _StorageIndex>
170 template<
typename OtherDerived>
172 : m_indices(other.
indices()) {}
174 #ifndef EIGEN_PARSED_BY_DOXYGEN 181 template<
typename Other>
186 template<
typename OtherDerived>
189 return Base::operator=(other);
192 #ifndef EIGEN_PARSED_BY_DOXYGEN 209 const IndicesType&
indices()
const {
return m_indices; }
220 template<
int SizeAtCompileTime,
int MaxSizeAtCompileTime,
typename _StorageIndex,
int _PacketAccess>
222 :
traits<PermutationMatrix<SizeAtCompileTime,MaxSizeAtCompileTime,_StorageIndex> >
230 template<
int SizeAtCompileTime,
int MaxSizeAtCompileTime,
typename _StorageIndex,
int PacketAccess>
232 :
public TranspositionsBase<Map<Transpositions<SizeAtCompileTime,MaxSizeAtCompileTime,_StorageIndex>,PacketAccess> >
241 explicit inline Map(
const StorageIndex* indicesPtr)
242 : m_indices(indicesPtr)
246 : m_indices(indicesPtr,size)
250 template<
typename OtherDerived>
253 return Base::operator=(other);
256 #ifndef EIGEN_PARSED_BY_DOXYGEN 262 m_indices = other.m_indices;
268 const IndicesType&
indices()
const {
return m_indices; }
279 template<
typename _IndicesType>
281 :
traits<PermutationWrapper<_IndicesType> >
287 template<
typename _IndicesType>
303 template<
typename OtherDerived>
306 return Base::operator=(other);
309 #ifndef EIGEN_PARSED_BY_DOXYGEN 321 const IndicesType&
indices()
const {
return m_indices; }
335 template<
typename MatrixDerived,
typename TranspositionsDerived>
342 (matrix.derived(), transpositions.
derived());
347 template<
typename TranspositionsDerived,
typename MatrixDerived>
354 (transpositions.
derived(), matrix.derived());
361 template<
typename Derived>
368 template<
typename TranspositionsDerived>
375 explicit Transpose(
const TranspositionType&
t) : m_transpositions(t) {}
383 template<
typename OtherDerived>
friend 392 template<
typename OtherDerived>
407 #endif // EIGEN_TRANSPOSITIONS_H const IndicesType & indices() const
const StorageIndex & operator()(Index i) const
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
Derived & operator=(const TranspositionsBase &other)
TranspositionsDerived TranspositionType
Namespace containing all symbols from the Eigen library.
TranspositionsStorage StorageKind
TranspositionType::IndicesType IndicesType
_StorageIndex StorageIndex
TranspositionsBase< Map > Base
internal::traits< Map > Traits
IndicesType::Scalar StorageIndex
Transpositions(const TranspositionsBase< OtherDerived > &other)
internal::traits< Transpositions > Traits
Transpositions & operator=(const Transpositions &other)
Traits::IndicesType IndicesType
StorageIndex & coeffRef(Index i)
Traits::IndicesType IndicesType
TranspositionsStorage StorageKind
const TranspositionType & m_transpositions
Transpose< TranspositionsBase > transpose() const
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Transpositions(Index size)
TranspositionsWrapper(IndicesType &indices)
Map & operator=(const TranspositionsBase< OtherDerived > &other)
const IndicesType & indices() const
const StorageIndex & operator[](Index i) const
const TranspositionType & nestedExpression() 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
internal::traits< TranspositionsWrapper > Traits
StorageIndex & operator()(Index i)
Transpose< TranspositionsBase > inverse() const
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)
const Derived & derived() const
Matrix< _StorageIndex, SizeAtCompileTime, 1, 0, MaxSizeAtCompileTime, 1 > IndicesType
TranspositionsWrapper & operator=(const TranspositionsBase< OtherDerived > &other)
friend const Product< OtherDerived, Transpose, AliasFreeProduct > operator*(const MatrixBase< OtherDerived > &matrix, const Transpose &trt)
IndicesType::Scalar StorageIndex
IndicesType::Scalar StorageIndex
Transpositions(const Transpositions &other)
const IndicesType & indices() 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.
const IndicesType & indices() const
Represents a sequence of transpositions (row/column interchange)
const Product< Transpose, OtherDerived, AliasFreeProduct > operator*(const MatrixBase< OtherDerived > &matrix) const
IndicesType::Nested m_indices
TranspositionsWrapper & operator=(const TranspositionsWrapper &other)
internal::traits< Derived > Traits
const StorageIndex & coeff(Index i) const