MOAB  4.9.3pre
Eigen::PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex > Class Template Reference

Permutation matrix. More...

#include <PermutationMatrix.h>

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

List of all members.

Public Types

typedef const PermutationMatrixNested
typedef Traits::IndicesType IndicesType
typedef Traits::StorageIndex StorageIndex

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)

Protected Attributes

IndicesType m_indices

Private Types

typedef PermutationBase
< PermutationMatrix
Base
typedef internal::traits
< PermutationMatrix
Traits

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

Definition at line 308 of file PermutationMatrix.h.


Member Typedef Documentation

template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename _StorageIndex>
typedef PermutationBase<PermutationMatrix> Eigen::PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex >::Base [private]
template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename _StorageIndex>
typedef Traits::IndicesType Eigen::PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex >::IndicesType
template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename _StorageIndex>
typedef const PermutationMatrix& Eigen::PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex >::Nested

Definition at line 314 of file PermutationMatrix.h.

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

Constructor & Destructor Documentation

template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename _StorageIndex>
Eigen::PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex >::PermutationMatrix ( ) [inline]

Definition at line 321 of file PermutationMatrix.h.

    {}
template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename _StorageIndex>
Eigen::PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex >::PermutationMatrix ( Index  size) [inline, explicit]

Constructs an uninitialized permutation matrix of given size.

Definition at line 326 of file PermutationMatrix.h.

                                                  : m_indices(size)
    {
      eigen_internal_assert(size <= NumTraits<StorageIndex>::highest());
    }
template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename _StorageIndex>
template<typename OtherDerived >
Eigen::PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex >::PermutationMatrix ( const PermutationBase< OtherDerived > &  other) [inline]

Copy constructor.

Definition at line 333 of file PermutationMatrix.h.

      : m_indices(other.indices()) {}
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

Definition at line 339 of file PermutationMatrix.h.

: m_indices(other.indices()) {}
template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename _StorageIndex>
template<typename Other >
Eigen::PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex >::PermutationMatrix ( const MatrixBase< Other > &  indices) [inline, explicit]

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.

Definition at line 350 of file PermutationMatrix.h.

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

Convert the Transpositions tr to a permutation matrix

Definition at line 355 of file PermutationMatrix.h.

      : m_indices(tr.size())
    {
      *this = tr;
    }
template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename _StorageIndex>
template<typename Other >
Eigen::PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex >::PermutationMatrix ( const InverseImpl< Other, PermutationStorage > &  other) [inline]

Definition at line 397 of file PermutationMatrix.h.

      : m_indices(other.derived().nestedExpression().size())
    {
      eigen_internal_assert(m_indices.size() <= NumTraits<StorageIndex>::highest());
      StorageIndex end = StorageIndex(m_indices.size());
      for (StorageIndex i=0; i<end;++i)
        m_indices.coeffRef(other.derived().nestedExpression().indices().coeff(i)) = i;
    }
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]

Definition at line 406 of file PermutationMatrix.h.

      : m_indices(lhs.indices().size())
    {
      Base::assignProduct(lhs,rhs);
    }

Member Function Documentation

template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename _StorageIndex>
const IndicesType& Eigen::PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex >::indices ( ) const [inline]
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.

Reimplemented from Eigen::PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex > >.

Definition at line 390 of file PermutationMatrix.h.

{ return m_indices; }
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

Definition at line 363 of file PermutationMatrix.h.

    {
      m_indices = other.indices();
      return *this;
    }
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

Definition at line 371 of file PermutationMatrix.h.

    {
      return Base::operator=(tr.derived());
    }
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=.

Definition at line 380 of file PermutationMatrix.h.

    {
      m_indices = other.m_indices;
      return *this;
    }

Member Data Documentation

template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename _StorageIndex>
IndicesType Eigen::PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex >::m_indices [protected]

Definition at line 415 of file PermutationMatrix.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines