Example #1
0
        private List <object[]> MultiplyMatrixRowsByColumn(MatrixColumnAttribute columnAttribute, List <object[]> existingRows)
        {
            if (existingRows == null)
            {
                existingRows = new List <object[]>();
            }
            List <object[]> newRows = new List <object[]>();

            foreach (object o in columnAttribute.Values)
            {
                if (existingRows.Count == 0)
                {
                    newRows.Add(new object[] { o });
                }
                else
                {
                    foreach (object[] oldRow in existingRows)
                    {
                        List <object> newRow = new List <object>(oldRow);
                        newRow.Add(o);
                        newRows.Add(newRow.ToArray());
                    }
                }
            }
            return(newRows);
        }
Example #2
0
        private static int CompareMatrixColumnParamId(MatrixColumnAttribute column1, MatrixColumnAttribute column2)
        {
            if (column1.ParamOrderId > column2.ParamOrderId)
                return 1;
            else if (column1.ParamOrderId == column2.ParamOrderId)
                return 0;
            else
                return -1;

        }
Example #3
0
 private static int CompareMatrixColumnParamId(MatrixColumnAttribute column1, MatrixColumnAttribute column2)
 {
     if (column1.ParamOrderId > column2.ParamOrderId)
     {
         return(1);
     }
     else if (column1.ParamOrderId == column2.ParamOrderId)
     {
         return(0);
     }
     else
     {
         return(-1);
     }
 }
Example #4
0
 private List<object[]> MultiplyMatrixRowsByColumn(MatrixColumnAttribute columnAttribute, List<object[]> existingRows)
 {
     if (existingRows == null)
         existingRows = new List<object[]>();
     List<object[]> newRows = new List<object[]>();
     foreach (object o in columnAttribute.Values)
     {
         if (existingRows.Count == 0)
         {
             newRows.Add(new object[] { o });
         }
         else
         {
             foreach (object[] oldRow in existingRows)
             {
                 List<object> newRow = new List<object>(oldRow);
                 newRow.Add(o);
                 newRows.Add(newRow.ToArray());
             }
         }
     }
     return newRows;
 }