Package sympycore :: Package basealgebra :: Module pairs
[hide private]
[frames] | no frames]

Module pairs

source code

Provides CommutativeRingWithPairs class.

Classes [hide private]
  CommutativeRingWithPairs
Implementation of a commutative ring where sums and products are represented as dictionaries of pairs.
Variables [hide private]
  APPLY = 'A'
  FACTORS = '*'
  NUMBER = 'N'
  POW = '**'
  SYMBOL = 'S'
  TERMS = ' + '
  TUPLE = 'T'
  head_to_string = {' + ': 'ADD', ' - ': 'SUB', ' and ': 'AND', ...
  realtypes = (<type 'int'>, <type 'long'>, <type 'float'>, <cla...
  str_APPLY = -4
  str_NUMBER = -6
  str_POWER = -3
  str_PRODUCT = -2
  str_SUM = -1
  str_SYMBOL = -5
Variables Details [hide private]

head_to_string

Value:
{' + ': 'ADD',
 ' - ': 'SUB',
 ' and ': 'AND',
 ' or ': 'OR',
 '!=': 'NE',
 '%': 'MOD',
 '&': 'BAND',
 '*': 'MUL',
...

realtypes

Value:
(<type 'int'>,
 <type 'long'>,
 <type 'float'>,
 <class 'sympycore.arithmetic.numbers.FractionTuple'>,
 <class 'sympycore.arithmetic.numbers.Float'>)