Exemple #1
0
        public void Initialize(int problemSizeArg)
        {
            problemSize     = problemSizeArg;
            upperContraints = new int[problemSize];
            lowerContraints = new int[problemSize];
            leftContraints  = new int[problemSize];
            rightContraints = new int[problemSize];

            initialSkyscrapperArray = new SkyscraperArray(problemSize);
        }
Exemple #2
0
        public ICSPSolvable DeepClone()
        {
            SkyscraperArray skyscraperArray = new SkyscraperArray(arraySize);

            for (int i = 0; i < arraySize; i++)
            {
                for (int j = 0; j < arraySize; j++)
                {
                    skyscraperArray.nodes[j, i] = (SkyscraperNode)nodes[j, i].DeepClone();
                }
            }
            return(skyscraperArray);
        }