public void GroupsGeneratedByDiffSizedSwapsAreEqual() { IGroup group1 = new GeneratedGroup(Element.CreateSwap(3)); IGroup group2 = new GeneratedGroup(Element.CreateSwap(4)); Assert.IsTrue(GroupUtilities.AreEqual(group1, group2)); }
public void GroupsGeneratedByDiffPositionSwapsAreNotEqual() { IElement swap1 = Element.CreateSwap(3); IElement swap2 = Element.CreateRotation(4).Multiply(Element.CreateSwap(4)); IGroup group1 = new GeneratedGroup(swap1); IGroup group2 = new GeneratedGroup(swap2); Assert.IsFalse(GroupUtilities.AreEqual(group1, group2)); }
public void PrimeRotationGroupsAreEqual() { IElement elementrot = Element.CreateRotation(5); IElement elementrot2 = elementrot.Multiply(elementrot); IGroup group1 = new GeneratedGroup(elementrot); IGroup group2 = new GeneratedGroup(elementrot2); Assert.IsTrue(GroupUtilities.AreEqual(group1, group2)); }
public void MultiplyGenerateSymmetricGroup() { IGroup group1 = new GeneratedGroup(Element.CreateRotation(4)); IGroup group2 = new GeneratedGroup(Element.CreateSwap(4)); IGroup group3 = GroupUtilities.Multiply(group1, group2); Assert.AreEqual(24, group3.Order); IGroup symm = new SymmetricGroup(4); Assert.IsTrue(GroupUtilities.AreEqual(group3, symm)); Assert.IsTrue(group3.Equals(symm)); }