示例#1
0
 def test_shortlex(self):
     
     self.assertTrue( shortLex( "", "a") )
     self.assertTrue( shortLex( "", "") )
     self.assertTrue( shortLex( "a", "a") )
     self.assertTrue( shortLex( "a", "a") )
     
     self.assertTrue( shortLex( "a", "bb") )
     self.assertTrue( shortLex( "a", "b") )
     self.assertFalse( shortLex( "bb", "a") )
示例#2
0
def groupedShortLex(s1, s2):
    p1 = tuple(groupPowers(s1))
    p2 = tuple(groupPowers(s2))
    print ("####", s1,p1," <> ", s2,p2)
    return shortLex( p1, p2)