示例#1
0
        public void GenerateCase()
        {
            var N  = 100000;
            var dt = new DataTable("data");

            dt.Columns.Add("valueInDispute", typeof(double));
            dt.Columns.Add("isExtreme", typeof(bool));
            dt.Columns.Add("courtCost", typeof(double));
            dt.Columns.Add("attorneyCost", typeof(double));
            dt.Columns.Add("goToCourt", typeof(bool));

            var test = new CaseFactory();

            for (int i = 1; i < N; i++)
            {
                var newCase = test.createCase();
                newCase.calculateCost();

                dt.Rows.Add(
                    newCase.valueInDispute,
                    newCase.isExtreme,
                    newCase.courtCost,
                    newCase.attorneyCost,
                    newCase.decideCourt()
                    );
            }
            Csv.Write(dt, fo2);
        }
示例#2
0
 public void initMATRIX()
 {
     for (int y = 0; y < MATRIX_SIZE; y++)
     {
         for (int x = 0; x < MATRIX_SIZE; x++)
         {
             MATRIX[x, y] = caseFactory.createCase(x, y);
         }
     }
 }