Prusa Slicer 2.6.0
Loading...
Searching...
No Matches
Eigen::PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex > Class Template Reference

Permutation matrix. More...

#include <src/eigen/Eigen/src/Core/PermutationMatrix.h>

+ Inheritance diagram for Eigen::PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex >:
+ Collaboration diagram for Eigen::PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex >:

Public Types

typedef const PermutationMatrixNested
 
typedef Traits::IndicesType IndicesType
 
typedef Traits::StorageIndex StorageIndex
 
enum  
 
typedef Matrix< StorageIndex, RowsAtCompileTime, ColsAtCompileTime, 0, MaxRowsAtCompileTime, MaxColsAtCompileTimeDenseMatrixType
 
typedef PermutationMatrix< IndicesType::SizeAtCompileTime, IndicesType::MaxSizeAtCompileTime, StorageIndexPlainPermutationType
 
typedef PlainPermutationType PlainObject
 
typedef Inverse< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex > > InverseReturnType
 
typedef void Scalar
 
typedef Eigen::Index Index
 The interface type of indices.
 
typedef internal::traits< Derived >::StorageKind StorageKind
 

Public Member Functions

 PermutationMatrix ()
 
 PermutationMatrix (Index size)
 
template<typename OtherDerived >
 PermutationMatrix (const PermutationBase< OtherDerived > &other)
 
 PermutationMatrix (const PermutationMatrix &other)
 
template<typename Other >
 PermutationMatrix (const MatrixBase< Other > &indices)
 
template<typename Other >
 PermutationMatrix (const TranspositionsBase< Other > &tr)
 
template<typename Other >
PermutationMatrixoperator= (const PermutationBase< Other > &other)
 
template<typename Other >
PermutationMatrixoperator= (const TranspositionsBase< Other > &tr)
 
PermutationMatrixoperator= (const PermutationMatrix &other)
 
const IndicesTypeindices () const
 
IndicesTypeindices ()
 
template<typename Other >
 PermutationMatrix (const InverseImpl< Other, PermutationStorage > &other)
 
template<typename Lhs , typename Rhs >
 PermutationMatrix (internal::PermPermProduct_t, const Lhs &lhs, const Rhs &rhs)
 
Index rows () const
 
Index cols () const
 
Index size () const
 
void evalTo (MatrixBase< DenseDerived > &other) const
 
template<typename Dest >
EIGEN_DEVICE_FUNC void evalTo (Dest &dst) const
 
DenseMatrixType toDenseMatrix () const
 
void resize (Index newSize)
 
void setIdentity ()
 
void setIdentity (Index newSize)
 
PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex > & applyTranspositionOnTheLeft (Index i, Index j)
 
PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex > & applyTranspositionOnTheRight (Index i, Index j)
 
InverseReturnType inverse () const
 
InverseReturnType transpose () const
 
PlainPermutationType operator* (const PermutationBase< Other > &other) const
 
PlainPermutationType operator* (const InverseImpl< Other, PermutationStorage > &other) const
 
Index determinant () const
 
EIGEN_DEVICE_FUNC PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex > & derived ()
 
EIGEN_DEVICE_FUNC const PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex > & derived () const
 
EIGEN_DEVICE_FUNC Derived & const_cast_derived () const
 
EIGEN_DEVICE_FUNC const Derived & const_derived () const
 
template<typename Dest >
EIGEN_DEVICE_FUNC void addTo (Dest &dst) const
 
template<typename Dest >
EIGEN_DEVICE_FUNC void subTo (Dest &dst) const
 
template<typename Dest >
EIGEN_DEVICE_FUNC void applyThisOnTheRight (Dest &dst) const
 
template<typename Dest >
EIGEN_DEVICE_FUNC void applyThisOnTheLeft (Dest &dst) const
 

Protected Member Functions

void assignTranspose (const PermutationBase< OtherDerived > &other)
 
void assignProduct (const Lhs &lhs, const Rhs &rhs)
 

Protected Attributes

IndicesType m_indices
 

Private Types

typedef PermutationBase< PermutationMatrixBase
 
typedef internal::traits< PermutationMatrixTraits
 

Detailed Description

template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename _StorageIndex>
class Eigen::PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex >

Permutation matrix.

Template Parameters
SizeAtCompileTimethe number of rows/cols, or Dynamic
MaxSizeAtCompileTimethe maximum number of rows/cols, or Dynamic. This optional parameter defaults to SizeAtCompileTime. Most of the time, you should not have to specify it.
_StorageIndexthe integer type of the indices

This class represents a permutation matrix, internally stored as a vector of integers.

See also
class PermutationBase, class PermutationWrapper, class DiagonalMatrix

Member Typedef Documentation

◆ Base

template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename _StorageIndex >
typedef PermutationBase<PermutationMatrix> Eigen::PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex >::Base
private

◆ DenseMatrixType

typedef Matrix<StorageIndex,RowsAtCompileTime,ColsAtCompileTime,0,MaxRowsAtCompileTime,MaxColsAtCompileTime> Eigen::PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex > >::DenseMatrixType
inherited

◆ Index

template<typename Derived >
typedef Eigen::Index Eigen::EigenBase< Derived >::Index
inherited

The interface type of indices.

To change this, #define the preprocessor symbol EIGEN_DEFAULT_DENSE_INDEX_TYPE.

See also
StorageIndex, TopicPreprocessorDirectives.

◆ IndicesType

template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename _StorageIndex >
typedef Traits::IndicesType Eigen::PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex >::IndicesType

◆ InverseReturnType

typedef Inverse<PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex > > Eigen::PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex > >::InverseReturnType
inherited

◆ Nested

template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename _StorageIndex >
typedef const PermutationMatrix& Eigen::PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex >::Nested

◆ PlainObject

typedef PlainPermutationType Eigen::PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex > >::PlainObject
inherited

◆ PlainPermutationType

typedef PermutationMatrix<IndicesType::SizeAtCompileTime,IndicesType::MaxSizeAtCompileTime,StorageIndex> Eigen::PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex > >::PlainPermutationType
inherited

◆ Scalar

typedef void Eigen::PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex > >::Scalar
inherited

◆ StorageIndex

template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename _StorageIndex >
typedef Traits::StorageIndex Eigen::PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex >::StorageIndex

◆ StorageKind

template<typename Derived >
typedef internal::traits<Derived>::StorageKind Eigen::EigenBase< Derived >::StorageKind
inherited

◆ Traits

template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename _StorageIndex >
typedef internal::traits<PermutationMatrix> Eigen::PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex >::Traits
private

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
inherited

Constructor & Destructor Documentation

◆ PermutationMatrix() [1/8]

template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename _StorageIndex >
Eigen::PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex >::PermutationMatrix ( )
inline
322 {}

◆ PermutationMatrix() [2/8]

template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename _StorageIndex >
Eigen::PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex >::PermutationMatrix ( Index  size)
inlineexplicit

Constructs an uninitialized permutation matrix of given size.

326 : m_indices(size)
327 {
328 eigen_internal_assert(size <= NumTraits<StorageIndex>::highest());
329 }
#define eigen_internal_assert(x)
Definition Macros.h:585
IndicesType m_indices
Definition PermutationMatrix.h:415

References eigen_internal_assert, and Eigen::PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex > >::size().

+ Here is the call graph for this function:

◆ PermutationMatrix() [3/8]

template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename _StorageIndex >
template<typename OtherDerived >
Eigen::PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex >::PermutationMatrix ( const PermutationBase< OtherDerived > &  other)
inline

Copy constructor.

334 : m_indices(other.indices()) {}

◆ PermutationMatrix() [4/8]

template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename _StorageIndex >
Eigen::PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex >::PermutationMatrix ( const PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex > &  other)
inline

Standard copy constructor. Defined only to prevent a default copy constructor from hiding the other templated constructor

339: m_indices(other.indices()) {}

◆ PermutationMatrix() [5/8]

template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename _StorageIndex >
template<typename Other >
Eigen::PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex >::PermutationMatrix ( const MatrixBase< Other > &  indices)
inlineexplicit

Generic constructor from expression of the indices. The indices array has the meaning that the permutations sends each integer i to indices[i].

Warning
It is your responsibility to check that the indices array that you passes actually describes a permutation, i.e., each value between 0 and n-1 occurs exactly once, where n is the array's size.
351 {}
const IndicesType & indices() const
Definition PermutationMatrix.h:388

◆ PermutationMatrix() [6/8]

template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename _StorageIndex >
template<typename Other >
Eigen::PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex >::PermutationMatrix ( const TranspositionsBase< Other > &  tr)
inlineexplicit

Convert the Transpositions tr to a permutation matrix

356 : m_indices(tr.size())
357 {
358 *this = tr;
359 }

◆ PermutationMatrix() [7/8]

template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename _StorageIndex >
template<typename Other >
Eigen::PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex >::PermutationMatrix ( const InverseImpl< Other, PermutationStorage > &  other)
inline
398 : m_indices(other.derived().nestedExpression().size())
399 {
400 eigen_internal_assert(m_indices.size() <= NumTraits<StorageIndex>::highest());
402 for (StorageIndex i=0; i<end;++i)
403 m_indices.coeffRef(other.derived().nestedExpression().indices().coeff(i)) = i;
404 }
Traits::StorageIndex StorageIndex
Definition PermutationMatrix.h:318
T * end(Slic3r::Mat< N, M, T > &mat)
Definition Point.hpp:608

References Eigen::InverseImpl< XprType, StorageKind >::coeff(), eigen_internal_assert, Eigen::end(), and Eigen::PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex >::m_indices.

+ Here is the call graph for this function:

◆ PermutationMatrix() [8/8]

template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename _StorageIndex >
template<typename Lhs , typename Rhs >
Eigen::PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex >::PermutationMatrix ( internal::PermPermProduct_t  ,
const Lhs &  lhs,
const Rhs &  rhs 
)
inline
407 : m_indices(lhs.indices().size())
408 {
409 Base::assignProduct(lhs,rhs);
410 }
void assignProduct(const Lhs &lhs, const Rhs &rhs)
Definition PermutationMatrix.h:216

References Eigen::PermutationBase< Derived >::assignProduct().

+ Here is the call graph for this function:

Member Function Documentation

◆ addTo()

template<typename Derived >
template<typename Dest >
EIGEN_DEVICE_FUNC void Eigen::EigenBase< Derived >::addTo ( Dest &  dst) const
inlineinherited
78 {
79 // This is the default implementation,
80 // derived class can reimplement it in a more optimized way.
81 typename Dest::PlainObject res(rows(),cols());
82 evalTo(res);
83 dst += res;
84 }
EIGEN_DEVICE_FUNC Index cols() const
Definition EigenBase.h:62
EIGEN_DEVICE_FUNC Index rows() const
Definition EigenBase.h:59
EIGEN_DEVICE_FUNC void evalTo(Dest &dst) const
Definition EigenBase.h:71

◆ applyThisOnTheLeft()

template<typename Derived >
template<typename Dest >
EIGEN_DEVICE_FUNC void Eigen::EigenBase< Derived >::applyThisOnTheLeft ( Dest &  dst) const
inlineinherited
110 {
111 // This is the default implementation,
112 // derived class can reimplement it in a more optimized way.
113 dst = this->derived() * dst;
114 }
EIGEN_DEVICE_FUNC Derived & derived()
Definition EigenBase.h:45

References Eigen::EigenBase< Derived >::derived().

+ Here is the call graph for this function:

◆ applyThisOnTheRight()

template<typename Derived >
template<typename Dest >
EIGEN_DEVICE_FUNC void Eigen::EigenBase< Derived >::applyThisOnTheRight ( Dest &  dst) const
inlineinherited
101 {
102 // This is the default implementation,
103 // derived class can reimplement it in a more optimized way.
104 dst = dst * this->derived();
105 }

References Eigen::EigenBase< Derived >::derived().

+ Here is the call graph for this function:

◆ applyTranspositionOnTheLeft()

PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex > & Eigen::PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex > >::applyTranspositionOnTheLeft ( Index  i,
Index  j 
)
inlineinherited

Multiplies *this by the transposition $(ij)$ on the left.

Returns
a reference to *this.
Warning
This is much slower than applyTranspositionOnTheRight(Index,Index): this has linear complexity and requires a lot of branching.
See also
applyTranspositionOnTheRight(Index,Index)
167 {
168 eigen_assert(i>=0 && j>=0 && i<size() && j<size());
169 for(Index k = 0; k < size(); ++k)
170 {
171 if(indices().coeff(k) == i) indices().coeffRef(k) = StorageIndex(j);
172 else if(indices().coeff(k) == j) indices().coeffRef(k) = StorageIndex(i);
173 }
174 return derived();
175 }
#define eigen_assert(x)
Definition Macros.h:579
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & coeffRef(Index rowId, Index colId)
Definition PlainObjectBase.h:183
EIGEN_DEVICE_FUNC PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex > & derived()
Definition EigenBase.h:45
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar & coeff(Index rowId, Index colId) const
Definition PlainObjectBase.h:160

◆ applyTranspositionOnTheRight()

PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex > & Eigen::PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex > >::applyTranspositionOnTheRight ( Index  i,
Index  j 
)
inlineinherited

Multiplies *this by the transposition $(ij)$ on the right.

Returns
a reference to *this.

This is a fast operation, it only consists in swapping two indices.

See also
applyTranspositionOnTheLeft(Index,Index)
186 {
187 eigen_assert(i>=0 && j>=0 && i<size() && j<size());
188 std::swap(indices().coeffRef(i), indices().coeffRef(j));
189 return derived();
190 }

◆ assignProduct()

void Eigen::PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex > >::assignProduct ( const Lhs &  lhs,
const Rhs &  rhs 
)
inlineprotectedinherited
217 {
218 eigen_assert(lhs.cols() == rhs.rows());
219 for (Index i=0; i<rows();++i) indices().coeffRef(i) = lhs.indices().coeff(rhs.indices().coeff(i));
220 }

◆ assignTranspose()

void Eigen::PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex > >::assignTranspose ( const PermutationBase< OtherDerived > &  other)
inlineprotectedinherited
212 {
213 for (Index i=0; i<rows();++i) indices().coeffRef(other.indices().coeff(i)) = i;
214 }

◆ cols()

Index Eigen::PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex > >::cols ( ) const
inlineinherited
Returns
the number of columns
105{ return Index(indices().size()); }
Eigen::Index Index
The interface type of indices.
Definition EigenBase.h:38

◆ const_cast_derived()

template<typename Derived >
EIGEN_DEVICE_FUNC Derived & Eigen::EigenBase< Derived >::const_cast_derived ( ) const
inlineinherited
52 { return *static_cast<Derived*>(const_cast<EigenBase*>(this)); }

Referenced by Eigen::TriangularViewImpl< _MatrixType, _Mode, Dense >::swap().

+ Here is the caller graph for this function:

◆ const_derived()

template<typename Derived >
EIGEN_DEVICE_FUNC const Derived & Eigen::EigenBase< Derived >::const_derived ( ) const
inlineinherited
55 { return *static_cast<const Derived*>(this); }

◆ derived() [1/2]

EIGEN_DEVICE_FUNC PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex > & Eigen::EigenBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex > >::derived ( )
inlineinherited
Returns
a reference to the derived object
45{ return *static_cast<Derived*>(this); }

◆ derived() [2/2]

EIGEN_DEVICE_FUNC const PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex > & Eigen::EigenBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex > >::derived ( ) const
inlineinherited
Returns
a const reference to the derived object
48{ return *static_cast<const Derived*>(this); }

◆ determinant()

Index Eigen::PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex > >::determinant ( ) const
inlineinherited
Returns
the determinant of the permutation matrix, which is either 1 or -1 depending on the parity of the permutation.

This function is O(n) procedure allocating a buffer of n booleans.

254 {
255 Index res = 1;
256 Index n = size();
257 Matrix<bool,RowsAtCompileTime,1,0,MaxRowsAtCompileTime> mask(n);
258 mask.fill(false);
259 Index r = 0;
260 while(r < n)
261 {
262 // search for the next seed
263 while(r<n && mask[r]) r++;
264 if(r>=n)
265 break;
266 // we got one, let's follow it until we are back to the seed
267 Index k0 = r++;
268 mask.coeffRef(k0) = true;
269 for(Index k=indices().coeff(k0); k!=k0; k=indices().coeff(k))
270 {
271 mask.coeffRef(k) = true;
272 res = -res;
273 }
274 }
275 return res;
276 }

◆ evalTo() [1/2]

template<typename Derived >
template<typename Dest >
EIGEN_DEVICE_FUNC void Eigen::EigenBase< Derived >::evalTo ( Dest &  dst) const
inlineinherited
72 { derived().evalTo(dst); }

Referenced by Eigen::EigenBase< Derived >::subTo().

+ Here is the caller graph for this function:

◆ evalTo() [2/2]

void Eigen::PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex > >::evalTo ( MatrixBase< DenseDerived > &  other) const
inlineinherited
113 {
114 other.setZero();
115 for (Index i=0; i<rows(); ++i)
116 other.coeffRef(indices().coeff(i),i) = typename DenseDerived::Scalar(1);
117 }

◆ indices() [1/2]

template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename _StorageIndex >
IndicesType & Eigen::PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex >::indices ( )
inline
Returns
a reference to the stored array representing the permutation.
390{ return m_indices; }

References Eigen::PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex >::m_indices.

◆ indices() [2/2]

◆ inverse()

InverseReturnType Eigen::PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex > >::inverse ( ) const
inlineinherited
Returns
the inverse permutation matrix.
Note
\blank \note_try_to_help_rvo
197 { return InverseReturnType(derived()); }
CwiseUnaryOp< internal::scalar_inverse_op< Scalar >, const Derived > InverseReturnType
Definition ArrayCwiseUnaryOps.h:9

◆ operator*() [1/2]

PlainPermutationType Eigen::PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex > >::operator* ( const InverseImpl< Other, PermutationStorage > &  other) const
inlineinherited
Returns
the product of a permutation with another inverse permutation.
Note
\blank \note_try_to_help_rvo
239 { return PlainPermutationType(internal::PermPermProduct, *this, other.eval()); }
PermutationMatrix< IndicesType::SizeAtCompileTime, IndicesType::MaxSizeAtCompileTime, StorageIndex > PlainPermutationType
Definition PermutationMatrix.h:65

◆ operator*() [2/2]

PlainPermutationType Eigen::PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex > >::operator* ( const PermutationBase< Other > &  other) const
inlineinherited
Returns
the product permutation matrix.
Note
\blank \note_try_to_help_rvo
231 { return PlainPermutationType(internal::PermPermProduct, derived(), other.derived()); }

◆ operator=() [1/3]

template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename _StorageIndex >
template<typename Other >
PermutationMatrix & Eigen::PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex >::operator= ( const PermutationBase< Other > &  other)
inline

Copies the other permutation into *this

364 {
365 m_indices = other.indices();
366 return *this;
367 }

References Eigen::PermutationBase< Derived >::indices(), and Eigen::PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex >::m_indices.

+ Here is the call graph for this function:

◆ operator=() [2/3]

template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename _StorageIndex >
PermutationMatrix & Eigen::PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex >::operator= ( const PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex > &  other)
inline

This is a special case of the templated operator=. Its purpose is to prevent a default operator= from hiding the templated operator=.

381 {
382 m_indices = other.m_indices;
383 return *this;
384 }

References Eigen::PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex >::m_indices.

◆ operator=() [3/3]

template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename _StorageIndex >
template<typename Other >
PermutationMatrix & Eigen::PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex >::operator= ( const TranspositionsBase< Other > &  tr)
inline

Assignment from the Transpositions tr

372 {
373 return Base::operator=(tr.derived());
374 }
Derived & operator=(const PermutationBase< OtherDerived > &other)
Definition PermutationMatrix.h:74

References Eigen::TranspositionsBase< Derived >::derived(), and Eigen::PermutationBase< Derived >::operator=().

+ Here is the call graph for this function:

◆ resize()

void Eigen::PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex > >::resize ( Index  newSize)
inlineinherited

Resizes to given size.

137 {
138 indices().resize(newSize);
139 }
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void resize(Index rows, Index cols)
Definition PlainObjectBase.h:279

◆ rows()

Index Eigen::PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex > >::rows ( ) const
inlineinherited
Returns
the number of rows
102{ return Index(indices().size()); }

◆ setIdentity() [1/2]

void Eigen::PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex > >::setIdentity ( )
inlineinherited

Sets *this to be the identity permutation matrix

143 {
145 for(StorageIndex i = 0; i < n; ++i)
146 indices().coeffRef(i) = i;
147 }

◆ setIdentity() [2/2]

void Eigen::PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex > >::setIdentity ( Index  newSize)
inlineinherited

Sets *this to be the identity permutation matrix of given size.

◆ size()

Index Eigen::PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex > >::size ( ) const
inlineinherited
Returns
the size of a side of the respective square matrix, i.e., the number of indices
108{ return Index(indices().size()); }

◆ subTo()

template<typename Derived >
template<typename Dest >
EIGEN_DEVICE_FUNC void Eigen::EigenBase< Derived >::subTo ( Dest &  dst) const
inlineinherited
90 {
91 // This is the default implementation,
92 // derived class can reimplement it in a more optimized way.
93 typename Dest::PlainObject res(rows(),cols());
94 evalTo(res);
95 dst -= res;
96 }

References Eigen::EigenBase< Derived >::cols(), Eigen::EigenBase< Derived >::evalTo(), and Eigen::EigenBase< Derived >::rows().

+ Here is the call graph for this function:

◆ toDenseMatrix()

DenseMatrixType Eigen::PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex > >::toDenseMatrix ( ) const
inlineinherited
Returns
a Matrix object initialized from this permutation matrix. Notice that it is inefficient to return this Matrix object by value. For efficiency, favor using the Matrix constructor taking EigenBase objects.
125 {
126 return derived();
127 }

◆ transpose()

InverseReturnType Eigen::PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex > >::transpose ( ) const
inlineinherited
Returns
the tranpose permutation matrix.
Note
\blank \note_try_to_help_rvo
203 { return InverseReturnType(derived()); }

Member Data Documentation

◆ m_indices


The documentation for this class was generated from the following file: