Beispiel #1
0
        public void ConjugateTest()
        {
            var a = new Cycle("123");
            var b = new Cycle("234");

            Assert.AreEqual(a.Conjugate(b).ToString(), "124");
        }
Beispiel #2
0
        public static IEnumerable <Cycle> CombinationsWith(this Cycle a, Cycle b)
        {
            var report =
                (a + b).Variations()
                .Concat((b + a).Variations())
                .Concat((a - b).Variations())
                .Concat((-b + a).Variations())
                .Concat(a.Conjugate(b).Variations())
                .Concat((-a).Conjugate(b).Variations())
                .Concat(b.Conjugate(a).Variations())
                .Concat((-b).Conjugate(a).Variations())
                .Concat(a.Commutate(b).Variations())
                .Concat(a.Commutate(-b).Variations())
                .Concat((-a).Commutate(b).Variations())
                .Concat((-a).Commutate(-b).Variations());

            foreach (var r in report)
            {
                yield return(r);
            }
        }