Exemple #1
0
        public static IEnumerable <ITuple> TWize(int tupleSize, IList <IDomain> domains)
        {
            CheckDomains(domains);

            IList <IDomain> udomains = Domains.Uniformize(domains);

            return(new UniformTWizeProductDomainTupleEnumerable(udomains, tupleSize));
        }
Exemple #2
0
        public static IEnumerable <ITuple> PairWize(IList <IDomain> domains)
        {
            CheckDomains(domains);
            if (domains.Count <= 2)
            {
                return(Cartesian(domains));
            }

            if (Domains.IsUniform(domains))
            {
                return(new UniformPairWizeProductDomainTupleEnumerable(domains));
            }
            else
            {
                IList <IDomain> udomains = Domains.Uniformize(domains);
                return(Greedy(new UniformPairWizeProductDomainTupleEnumerable(udomains)));
            }
        }