/// <summary>Set matrixData submatrix.</summary> /// <param name="i0">Initial row index</param> /// <param name="i1">Final row index</param> /// <param name="c">Array of column indices.</param> /// <param name="X">matrixData(i0:i1,c(:))</param> /// <exception cref="">Exception Submatrix indices</exception> public void SetMatrix(int i0, int i1, int[] c, Matrix X) { try { for (int i = i0; i <= i1; i++) { for (int j = 0; j < c.Length; j++) { matrixData[i][c[j]] = X.Get(i-i0,j); } } } catch(Exception) { throw new Exception("Submatrix indices"); } }
/// <summary>Set matrixData submatrix.</summary> /// <param name="r">Array of row indices.</param> /// <param name="c">Array of column indices.</param> /// <param name="X">matrixData(r(:),c(:))</param> /// <exception cref="">Exception Submatrix indices</exception> 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++) { matrixData[r[i]][c[j]] = X.Get(i,j); } } } catch(Exception) { throw new Exception("Submatrix indices"); } }
/// <summary>Set matrixData submatrix.</summary> /// <param name="r">Array of row indices.</param> /// <param name="j0">Initial column index</param> /// <param name="j1">Final column index</param> /// <param name="X">matrixData(r(:),j0:j1)</param> /// <exception cref="">Exception Submatrix indices</exception> public void SetMatrix(int[] r, int j0, int j1, Matrix X) { try { for (int i = 0; i < r.Length; i++) { for (int j = j0; j <= j1; j++) { matrixData[r[i]][j] = X.Get(i,j-j0); } } } catch(Exception) { throw new Exception("Submatrix indices"); } }
/// <summary>Set matrixData submatrix.</summary> /// <param name="i0">Initial row index</param> /// <param name="i1">Final row index</param> /// <param name="j0">Initial column index</param> /// <param name="j1">Final column index</param> /// <param name="X">matrixData(i0:i1,j0:j1)</param> /// <exception cref="">Exception Submatrix indices</exception> public void SetMatrix(int i0, int i1, int j0, int j1, Matrix X) { try { for (int i = i0; i <= i1; i++) { for (int j = j0; j <= j1; j++) { matrixData[i][j] = X.Get(i-i0,j-j0); } } } catch(Exception) { throw new Exception("Submatrix indices"); } }