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); }
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; }
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); } }
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; }