public SetMatrix ( int r, int c, Matrix x ) : void | ||
r | int | Array of row indices. |
c | int | Array of column indices. |
x | Matrix | The matrix to set. |
리턴 | void |
public void SetMatrix(
int[] r,
int[] c,
Matrix x)
{
try
{
for (int i = 0; i < r.Length; i++)
{
for (int j = 0; j < c.Length; j++)
{
matrix[r[i]][c[j]] = x[i, j];
}
}
}
catch (IndexOutOfRangeException)
{
throw new MatrixError("Submatrix indices");
}
}