/// <summary> /// Create a Vandermonde matrix, which is guaranteed to have the property that any subset of rows that forms a square matrix is invertible. /// </summary> private static Matrix CreateVandermondeMatrix(int rows, int cols) { Matrix result = new Matrix(rows, cols); for (int r = 0; r < rows; r++) { for (int c = 0; c < cols; c++) { result.Set(r, c, GaloisField.Exp((byte)r, c)); } } return(result); }