finitediff
Public Member Functions | Private Attributes | Friends | List of all members
MelementaryPermutation< tp_size > Class Template Reference

#include <MelementaryPermutation.h>

Inheritance diagram for MelementaryPermutation< tp_size >:
Inheritance graph
[legend]
Collaboration diagram for MelementaryPermutation< tp_size >:
Collaboration graph
[legend]

Public Member Functions

 MelementaryPermutation (const unsigned int A, const unsigned int B)
 
unsigned int getA () const
 Return the first of the two elements that are permuted. More...
 
unsigned int getB () const
 Return the second of the two elements that are permuted. More...
 
unsigned int image (const unsigned int k) const override
 return by value the image of 'k' by the permutation. More...
 
- Public Member Functions inherited from MgenericPermutation< tp_size >
virtual unsigned int operator() (const unsigned int k) const final
 

Private Attributes

const unsigned int data_elA
 
const unsigned int data_elB
 

Friends

template<unsigned int s>
std::ostream & operator<< (std::ostream &, MelementaryPermutation< s >)
 

Detailed Description

template<unsigned int tp_size>
class MelementaryPermutation< tp_size >

This class represents an elementary permutation, that is a permutation that permutes only two elements.

Constructor & Destructor Documentation

template<unsigned int tp_size>
MelementaryPermutation< tp_size >::MelementaryPermutation ( const unsigned int  A,
const unsigned int  B 
)
Parameters
Aan unsigned integer between 0 and tp_size
Ban unsigned integer between 0 and tp_size

Construct the permutation of $ A $ and $ B $.

Member Function Documentation

template<unsigned int tp_size>
unsigned int MelementaryPermutation< tp_size >::getA ( ) const

Return the first of the two elements that are permuted.

template<unsigned int tp_size>
unsigned int MelementaryPermutation< tp_size >::getB ( ) const

Return the second of the two elements that are permuted.

template<unsigned int tp_size>
unsigned int MelementaryPermutation< tp_size >::image ( const unsigned int  k) const
overridevirtual

return by value the image of 'k' by the permutation.

Implements MgenericPermutation< tp_size >.

Friends And Related Function Documentation

template<unsigned int tp_size>
template<unsigned int s>
std::ostream& operator<< ( std::ostream &  stream,
MelementaryPermutation< s >  perm 
)
friend

Member Data Documentation

template<unsigned int tp_size>
const unsigned int MelementaryPermutation< tp_size >::data_elA
private

The permutation permutes data_elA with data_elB

template<unsigned int tp_size>
const unsigned int MelementaryPermutation< tp_size >::data_elB
private

The permutation permutes data_elA with data_elB


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