linbox
Public Member Functions | Friends
BlasPermutation< _UnsignedInt > Class Template Reference

Lapack-style permutation. More...

#include <permutation-matrix.h>

Public Member Functions

BlasPermutation< _UnsignedInt > & operator= (const BlasPermutation< _UnsignedInt > &P)
 copy operator (with copy)
 
_UnsignedInt getSize () const
 Returns the size of the permuation. More...
 
_UnsignedInt getOrder () const
 Returns the order of the permuation.
 
std::vector< _UnsignedInt > getStorage () const
 returns a copy of the raw storage.
 
MatrixPermutation< _UnsignedInt > & Convert (MatrixPermutation< _UnsignedInt > &P)
 Converts a BlasPermutation to a MatrixPermutation. More...
 
_UnsignedInt operator[] (const _UnsignedInt i) const
 $ M \gets P M$ More...
 
const _UnsignedInt * getPointer () const
 col i and col j are swapped More...
 
void Compress ()
 compresses BlasPermutation to a smaller r_.
 
std::ostream & write (std::ostream &o, bool Lapack=true) const
 writes on output stream o
 

Friends

template<class _Uint >
std::ostream & operator<< (std::ostream &o, BlasPerm &P)
 writes P on output stream o
 

Detailed Description

template<class _UnsignedInt>
class LinBox::BlasPermutation< _UnsignedInt >

Lapack-style permutation.

A Lapack permutation is represented with a vector $[p_1,p_2,\cdots, p_r]$ such that $p_i > i$. Converting it to a classic representation of a permutation corresponds to taking an identity permutation and then successively permuting $(i,p_i)$. Example : if P=[1,4,4] and V=[1,2,3,4,5], then P.V=[1,4,2,3,5].

Member Function Documentation

_Uint getSize ( ) const

Returns the size of the permuation.

If given, we return n as we see P in $S_n$. We default to the order of the permutation (minimal such n)

Warning
potentially catastrophic
MatrixPermutation< _Uint > & Convert ( MatrixPermutation< _Uint > &  P)

Converts a BlasPermutation to a MatrixPermutation.

Parameters
[out]PMatrixPermutation to be created. Need not be initialized.
_Uint operator[] ( const _Uint  i) const
inline

$ M \gets P M$

$ M \gets M P$

$ M \gets M P^t$

$ M \gets P^t M$

const _UnsignedInt* getPointer ( ) const
inline

col i and col j are swapped

row i and row j are swapped


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