Exemple #1
0
        public bool Equals(Coset <T> other)
        {
            if (other == null)
            {
                return(false);
            }

            if (_cosets == other._cosets)
            {
                return(this.Representative.Equals(other.Representative));
            }

            return(_members.IsEqualTo(other._members));
        }
Exemple #2
0
        private IEnumerable <Coset <T> > Cosets(Group <T> h, Func <T, FiniteSet <T> > partition)
        {
            var setOfCosets = _set.Partition(partition);
            var cosets      = new Dictionary <T, Coset <T> >();
            var list        = new List <Coset <T> >();

            foreach (FiniteSet <T> set in setOfCosets)
            {
                var coset = new Coset <T>(this, h, cosets, set, set.First());

                foreach (T element in set)
                {
                    cosets.Add(element, coset);
                }

                list.Add(coset);
            }

            return(list);
        }
Exemple #3
0
 public static Coset <T> Inverse(Coset <T> s)
 {
     return(s._cosets[s.Group.Inverse(s.Representative)]);
 }
Exemple #4
0
 public static Coset <T> Product(Coset <T> s1, Coset <T> s2)
 {
     return(s1._cosets[s1.Group.Product(s1.Representative, s2.Representative)]);
 }