Пример #1
0
        public void Initialize()
        {
            intArneTree = new ArneTree <Int32, Int32>();

            for (var index = 0; index < intValidArray.Length;)
            {
                var value = random.Next(intValidArray.Length * 2);

                if (intValidArray.Contains(value))
                {
                    continue;
                }

                intValidArray[index] = value;

                index++;
            }

            // Add data
            foreach (var t in intValidArray)
            {
                intArneTree.Add(t);
            }

            for (var index = 0; index < intInvalidArray.Length;)
            {
                var value = random.Next(intValidArray.Length * 2, intValidArray.Length * 4);

                if (intInvalidArray.Contains(value))
                {
                    continue;
                }

                intInvalidArray[index] = value;

                index++;
            }
        }