示例#1
0
        public FuzzType PickType()
        {
            FuzzType type  = PickExistingType();
            int      count = Options.MakeArrayCountDist.Sample(Random.Rng);

            for (int i = 0; i < count; i++)
            {
                type = type.MakeArrayType(Options.ArrayRankDist.Sample(Random.Rng));
            }

            return(type);
        }
示例#2
0
        public FuzzType PickType(double byRefProb = 0)
        {
            FuzzType type  = PickExistingType();
            int      count = Options.MakeArrayCountDist.Sample(Random.Rng);

            for (int i = 0; i < count; i++)
            {
                type = type.MakeArrayType(Options.ArrayRankDist.Sample(Random.Rng));
            }

            if (Random.FlipCoin(byRefProb))
            {
                type = new RefType(type);
            }

            return(type);
        }