コード例 #1
0
        public Dynamo(int numElements, int numDynamics)
        {
            Console.WriteLine(" ");

            if ((numElements < numDynamics) || (numDynamics < 10))
            {
                throw new ArgumentException();
            }
            else
            {
                ChkDynamoValues = new int[numDynamics];
                NodeBank        = new StaticNode[numDynamics / 2];
                int iDynamic = numElements / numDynamics;

                int Low  = 0;
                int High = iDynamic * 2;

                for (int i = 0; i < NodeBank.Length; i++)
                {
                    NodeBank[i] = new StaticNode(Low, High);

                    Low   = High;
                    High += iDynamic * 2;
                }
            }
        }
コード例 #2
0
ファイル: dynamo.cs プロジェクト: CheneyWu/coreclr
        public Dynamo( int numElements, int numDynamics )
        {

            Console.WriteLine(" ");

            if ( (numElements < numDynamics ) || (numDynamics<10))
                throw new ArgumentException();
            else
            {
                ChkDynamoValues = new int[numDynamics];
                NodeBank = new StaticNode[numDynamics/2];
                int iDynamic = numElements / numDynamics;

                int Low = 0;
                int High = iDynamic * 2;

                for( int i = 0; i < NodeBank.Length; i++ )
                {
                    NodeBank[i] = new StaticNode( Low, High );

                    Low = High;
                    High += iDynamic * 2;
                }
            }

        }