NZMATH  1.2.0
About: NZMATH is a Python based number theory oriented calculation system.
  Fossies Dox: NZMATH-1.2.0.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

nzmath.permute.Permute Class Reference

Public Member Functions

def __init__ (self, value, key=None, flag=False)
def __getitem__ (self, other)
def __mul__ (self, other)
def __rmul__ (self, other)
def __div__ (self, other)
def __rdiv__ (self, other)
def __pow__ (self, other)
def __call__ (self, other)
def setKey (self, key=None)
def getValue (self)
def inverse (self)
def getGroup (self)
def numbering (self)
def order (self)
def ToTranspose (self)
def ToCyclic (self)
def sgn (self)
def types (self)
def ToMatrix (self)
def permute (self, lists)
def __eq__ (self, other)
def __ne__ (self, other)
def __repr__ (self)
def __str__ (self)

Public Attributes


Static Private Attributes

def __truediv__ = __div__

Detailed Description

This is a class for 'normal' type element in the permutation group.
Example, [2,3,1,5,4]
This means [1 2 3 4 5]
           [2 3 1 5 4]
(It is 1:1 onto mapping, 1->2, 2->3, 3->1, 4->5, 5->4)

Definition at line 7 of file

Constructor & Destructor Documentation

◆ __init__()

def nzmath.permute.Permute.__init__ (   self,
  key = None,
  flag = False 
You can initialize with various one-to-one onto mapping.
Permute([2,3,4,5,1]) -> normal type
Permute([3,4,2,1,0], 0) -> [4,5,3,2,1]-normal type(index start with 0)
Permute(['b','c','d','e','a'], 1) -> [2,3,4,5,1]-normal type(identity is ascending order)
Permute(['b','c','d','e','a'], -1) -> [4,3,2,1,5]-normal type(identity is descending order)
Permute(['b','c','d','e','a'], ['b','a', 'c','d','e']) -> [1,3,4,5,2]-normal type(identity=key)
Permute({'a':'b','b':'c','c':'d','d':'e','e':'a'}) -> [2,3,4,5,1]-normal type

Definition at line 17 of file

Member Function Documentation

◆ __call__()

def nzmath.permute.Permute.__call__ (   self,

Definition at line 120 of file

References nzmath.permute.Permute.permute().

◆ __div__()

def nzmath.permute.Permute.__div__ (   self,

Definition at line 99 of file

◆ __eq__()

◆ __getitem__()

def nzmath.permute.Permute.__getitem__ (   self,

Definition at line 76 of file

References, and nzmath.permute.Permute.key.

◆ __mul__()

def nzmath.permute.Permute.__mul__ (   self,
Compute the multiplication, that is, the composite of two maps self \circ other.
The map is the application of `self` to the result of `other`.

Definition at line 83 of file

References, nzmath.permute.Permute.key, and nzmath.bigrange.range().

◆ __ne__()

def nzmath.permute.Permute.__ne__ (   self,

Definition at line 295 of file

◆ __pow__()

◆ __rdiv__()

◆ __repr__()

def nzmath.permute.Permute.__repr__ (   self)

Definition at line 298 of file

References nzmath.permute.Permute.getValue(), and nzmath.permute.Permute.key.

◆ __rmul__()

def nzmath.permute.Permute.__rmul__ (   self,

Definition at line 96 of file

◆ __str__()

def nzmath.permute.Permute.__str__ (   self)

Definition at line 301 of file

References nzmath.permute.Permute.getValue(), and nzmath.permute.Permute.key.

◆ getGroup()

def nzmath.permute.Permute.getGroup (   self)

Definition at line 162 of file

References nzmath.permute.Permute.key.

◆ getValue()

◆ inverse()

◆ numbering()

def nzmath.permute.Permute.numbering (   self)
Return the number of self by the following numbering.

This is the inductive definition on the dimension.
It is symmetrical arranging.

2-dimension [1,2], [2,1]
3-dimension [1,2,3], [2,1,3], [1,3,2], [2,3,1], [3,1,2], [3,2,1]
4-dimension [1,2,3,4], [2,1,3,4], [1,3,2,4], [2,3,1,4], [3,1,2,4],
    [3,2,1,4], ..., [4,3,2,1]

Definition at line 165 of file

References, and nzmath.bigrange.range().

◆ order()

def nzmath.permute.Permute.order (   self)
This method returns order for permutation element.

Definition at line 191 of file

References nzmath.permute.Permute.ToCyclic().

Referenced by nzmath.poly.uniutil.DivisionProvider.__divmod__(), nzmath.poly.uniutil.DivisionProvider.__floordiv__(), nzmath.poly.uniutil.DivisionProvider.__mod__(), nzmath.poly.uniutil.DivisionProvider._populate_reduced(), nzmath.poly.uniutil.DivisionProvider._populate_reduced_more(), nzmath.poly.uniutil.PrimeCharacteristicFunctionsProvider.distinct_degree_factorization(), nzmath.poly.uniutil.PseudoDivisionProvider.exact_division(), nzmath.poly.uniutil.DivisionProvider.extgcd(), nzmath.poly.uniutil.PrimeCharacteristicFunctionsProvider.factor(), nzmath.poly.uniutil.DivisionProvider.gcd(), nzmath.poly.uniutil.PrimeCharacteristicFunctionsProvider.isirreducible(), nzmath.poly.multiutil.NestProvider.leading_variable(), nzmath.poly.uniutil.DivisionProvider.mod(), nzmath.poly.uniutil.PseudoDivisionProvider.monic_divmod(), nzmath.poly.uniutil.PseudoDivisionProvider.monic_floordiv(), nzmath.poly.uniutil.PseudoDivisionProvider.monic_mod(), nzmath.poly.uniutil.PseudoDivisionProvider.pseudo_divmod(), nzmath.poly.uniutil.PseudoDivisionProvider.pseudo_floordiv(), nzmath.poly.uniutil.PseudoDivisionProvider.pseudo_mod(), nzmath.poly.uniutil.KaratsubaProvider.ring_mul_karatsuba(), nzmath.poly.uniutil.PrimeCharacteristicFunctionsProvider.split_same_degrees(), nzmath.poly.uniutil.KaratsubaProvider.square_karatsuba(), and nzmath.poly.uniutil.PrimeCharacteristicFunctionsProvider.squarefree_decomposition().

◆ permute()

def nzmath.permute.Permute.permute (   self,
permute list following with self permutation.

Warning: The method do not check the compatibility of `lists` and self.key (except dict type).

Definition at line 265 of file

References, nzmath.permute.Permute.key, and nzmath.bigrange.range().

Referenced by nzmath.permute.Permute.__call__(), and nzmath.permute.ExPermute.__call__().

◆ setKey()

def nzmath.permute.Permute.setKey (   self,
  key = None 
Set other key.
The function may be used if you want to permute a different sequence with
the same permutation.

Definition at line 123 of file

References, nzmath.permute.Permute.key, and nzmath.bigrange.range().

◆ sgn()

def nzmath.permute.Permute.sgn (   self)
This method returns sign.

If self is even permutation, that is, self can be written as a composition
of an even number of transpositions, it returns 1. Otherwise,that is, for odd
permutation, it returns -1.

Definition at line 236 of file

References nzmath.permute.Permute.ToCyclic().

◆ ToCyclic()

def nzmath.permute.Permute.ToCyclic (   self)
This method returns cyclic type element of permutation group.

Definition at line 216 of file

References, nzmath.permute.Permute.key, and nzmath.bigrange.range().

Referenced by nzmath.permute.Permute.order(), nzmath.permute.Permute.sgn(), and nzmath.permute.Permute.types().

◆ ToMatrix()

def nzmath.permute.Permute.ToMatrix (   self)
This method returns the permutation matrix.

Definition at line 255 of file

References, and nzmath.bigrange.range().

◆ ToTranspose()

def nzmath.permute.Permute.ToTranspose (   self)
This method returns
 2-dimensional cyclic type element of permutation group.

The method uses recursion.

Definition at line 197 of file

References, and nzmath.permute.Permute.key.

◆ types()

def nzmath.permute.Permute.types (   self)
This method returns 'type' defined by each cyclic element length.

Definition at line 246 of file

References nzmath.bigrange.range(), and nzmath.permute.Permute.ToCyclic().

Member Data Documentation

◆ __truediv__

def nzmath.permute.Permute.__truediv__ = __div__

Definition at line 102 of file

◆ data

◆ key

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