Implemented crisscross algorithm for solving LP problems.
[sympycore.git] / sympycore / ring / tests / test_exp_coeff_dict.py
blob2e082dec984424e929620a91605dea5247a3ed97
2 from sympycore import Ring, heads, core
4 P = Ring.Polynom
6 def test_zero():
7 x,y,z = map(Ring, 'xyz')
8 zero = P(variables=(x,y))
9 assert zero.pair==(heads.EXP_COEFF_DICT, ((x,y), {})), `zero.pair`
10 assert zero==0
11 zero = ((zero + x) - x)
12 assert zero.pair==(heads.EXP_COEFF_DICT, ((x,y), {})), `zero.pair`
13 assert zero==0,`zero`
16 def test_one():
17 x,y,z = map(Ring, 'xyz')
18 one = Ring.Polynom(1,variables=(x,y))
19 assert one.pair == (heads.EXP_COEFF_DICT, ((x, y), {core.IntegerList([0,0]):1})), `one.pair`
20 assert one==1
21 one = Ring.Polynom(x,variables=(x,y))/x
22 assert one.pair == (heads.EXP_COEFF_DICT, ((), {core.IntegerList([]):1})), `one.pair`
23 assert one==1
25 def test_simple():
26 x,y,z = map(Ring, 'xyz')