10 #ifndef EIGEN_TRANSPOSITIONS_H
11 #define EIGEN_TRANSPOSITIONS_H
17 template<
typename Derived>
20 typedef internal::traits<Derived>
Traits;
29 Derived&
derived() {
return *
static_cast<Derived*
>(
this); }
31 const Derived&
derived()
const {
return *
static_cast<const Derived*
>(
this); }
34 template<
typename OtherDerived>
118 template<
int SizeAtCompileTime,
int MaxSizeAtCompileTime,
typename StorageIndex_>
119 struct traits<Transpositions<SizeAtCompileTime,MaxSizeAtCompileTime,StorageIndex_> >
120 : traits<PermutationMatrix<SizeAtCompileTime,MaxSizeAtCompileTime,StorageIndex_> >
122 typedef Matrix<StorageIndex_, SizeAtCompileTime, 1, 0, MaxSizeAtCompileTime, 1> IndicesType;
123 typedef TranspositionsStorage StorageKind;
156 template<
int SizeAtCompileTime,
int MaxSizeAtCompileTime,
typename StorageIndex_>
159 typedef internal::traits<Transpositions>
Traits;
169 template<
typename OtherDerived>
174 template<
typename Other>
179 template<
typename OtherDerived>
204 template<
int SizeAtCompileTime,
int MaxSizeAtCompileTime,
typename StorageIndex_,
int PacketAccess_>
205 struct traits<
Map<
Transpositions<SizeAtCompileTime,MaxSizeAtCompileTime,StorageIndex_>,PacketAccess_> >
206 : traits<PermutationMatrix<SizeAtCompileTime,MaxSizeAtCompileTime,StorageIndex_> >
209 typedef StorageIndex_ StorageIndex;
214 template<
int SizeAtCompileTime,
int MaxSizeAtCompileTime,
typename StorageIndex_,
int PacketAccess>
216 :
public TranspositionsBase<Map<Transpositions<SizeAtCompileTime,MaxSizeAtCompileTime,StorageIndex_>,PacketAccess> >
226 : m_indices(indicesPtr)
230 : m_indices(indicesPtr,
size)
234 template<
typename OtherDerived>
237 return Base::operator=(other);
240 #ifndef EIGEN_PARSED_BY_DOXYGEN
244 Map& operator=(
const Map& other)
246 m_indices = other.m_indices;
265 template<
typename IndicesType_>
267 : traits<PermutationWrapper<IndicesType_> >
273 template<
typename IndicesType_>
277 typedef internal::traits<TranspositionsWrapper>
Traits;
289 template<
typename OtherDerived>
312 template<
typename MatrixDerived,
typename TranspositionsDerived>
324 template<
typename TranspositionsDerived,
typename MatrixDerived>
326 const Product<TranspositionsDerived, MatrixDerived, AliasFreeProduct>
338 template<
typename Derived>
339 struct traits<Transpose<TranspositionsBase<Derived> > >
345 template<
typename TranspositionsDerived>
363 template<
typename OtherDerived>
friend
372 template<
typename OtherDerived>
#define EIGEN_DEVICE_FUNC
IndicesType::Scalar StorageIndex
TranspositionsBase< Map > Base
Map & operator=(const TranspositionsBase< OtherDerived > &other)
Traits::IndicesType IndicesType
Map(const StorageIndex *indicesPtr, Index size)
const IndicesType & indices() const
internal::traits< Map > Traits
Map(const StorageIndex *indicesPtr)
A matrix or vector expression mapping an existing array of data.
Base class for all dense matrices, vectors, and expressions.
Expression of the product of two arbitrary matrices or vectors.
EIGEN_CONSTEXPR Index size() const EIGEN_NOEXCEPT
TranspositionsDerived TranspositionType
TranspositionType::IndicesType IndicesType
const TranspositionType & m_transpositions
Transpose(const TranspositionType &t)
const Product< Transpose, OtherDerived, AliasFreeProduct > operator*(const MatrixBase< OtherDerived > &matrix) const
EIGEN_CONSTEXPR Index rows() const EIGEN_NOEXCEPT
const TranspositionType & nestedExpression() const
EIGEN_CONSTEXPR Index cols() const EIGEN_NOEXCEPT
friend const Product< OtherDerived, Transpose, AliasFreeProduct > operator*(const MatrixBase< OtherDerived > &matrix, const Transpose &trt)
Expression of the transpose of a matrix.
const StorageIndex & operator()(Index i) const
const Derived & derived() const
Transpose< TranspositionsBase > transpose() const
void resize(Index newSize)
Derived & operator=(const TranspositionsBase< OtherDerived > &other)
const StorageIndex & operator[](Index i) const
IndicesType::Scalar StorageIndex
StorageIndex & operator[](Index i)
StorageIndex & operator()(Index i)
const IndicesType & indices() const
StorageIndex & coeffRef(Index i)
Traits::IndicesType IndicesType
internal::traits< Derived > Traits
const StorageIndex & coeff(Index i) const
Transpose< TranspositionsBase > inverse() const
TranspositionsWrapper(IndicesType &indices)
TranspositionsBase< TranspositionsWrapper > Base
IndicesType::Scalar StorageIndex
Traits::IndicesType IndicesType
IndicesType::Nested m_indices
TranspositionsWrapper & operator=(const TranspositionsBase< OtherDerived > &other)
internal::traits< TranspositionsWrapper > Traits
const IndicesType & indices() const
Represents a sequence of transpositions (row/column interchange)
Transpositions(const TranspositionsBase< OtherDerived > &other)
TranspositionsBase< Transpositions > Base
internal::traits< Transpositions > Traits
Transpositions & operator=(const TranspositionsBase< OtherDerived > &other)
IndicesType::Scalar StorageIndex
Traits::IndicesType IndicesType
Transpositions(Index size)
Transpositions(const MatrixBase< Other > &indices)
const IndicesType & indices() const
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
const Product< MatrixDerived, PermutationDerived, AliasFreeProduct > operator*(const MatrixBase< MatrixDerived > &matrix, const PermutationBase< PermutationDerived > &permutation)