コード例 #1
0
        /** Set a subCoreMatrix.
        @param i0   Initial row index
        @param i1   Final row index
        @param c    Array of column indices.
        @param X    A(i0:i1,c(:))
        @exception  Exception SubCoreMatrix indices
        */

        public void setMatrix(int i0, int i1, int[] c, CoreMatrix X)
        {
            try
            {
                for (int i = i0; i <= i1; i++)
                {
                    for (int j = 0; j < c.Length; j++)
                    {
                        A[i, c[j]] = X.get(i - i0, j);
                    }
                }
            }
            catch (Exception)
            {
                throw new Exception("SubCoreMatrix indices");
            }
        }
コード例 #2
0
        /** Set a subCoreMatrix.
        @param r    Array of row indices.
        @param c    Array of column indices.
        @param X    A(r(:),c(:))
        @exception  Exception SubCoreMatrix indices
        */

        public void setMatrix(int[] r, int[] c, CoreMatrix X)
        {
            try
            {
                for (int i = 0; i < r.Length; i++)
                {
                    for (int j = 0; j < c.Length; j++)
                    {
                        A[r[i], c[j]] = X.get(i, j);
                    }
                }
            }
            catch (Exception)
            {
                throw new Exception("SubCoreMatrix indices");
            }
        }
コード例 #3
0
        /** Set a subCoreMatrix.
        @param r    Array of row indices.
        @param j0   Initial column index
        @param j1   Final column index
        @param X    A(r(:),j0:j1)
        @exception  Exception SubCoreMatrix indices
        */

        public void setMatrix(int[] r, int j0, int j1, CoreMatrix X)
        {
            try
            {
                for (int i = 0; i < r.Length; i++)
                {
                    for (int j = j0; j <= j1; j++)
                    {
                        A[r[i], j] = X.get(i, j - j0);
                    }
                }
            }
            catch (Exception)
            {
                throw new Exception("SubCoreMatrix indices");
            }
        }
コード例 #4
0
        /** Set a subCoreMatrix.
        @param i0   Initial row index
        @param i1   Final row index
        @param j0   Initial column index
        @param j1   Final column index
        @param X    A(i0:i1,j0:j1)
        @exception  Exception SubCoreMatrix indices
        */

        public void setMatrix(int i0, int i1, int j0, int j1, CoreMatrix X)
        {
            try
            {
                for (int i = i0; i <= i1; i++)
                {
                    for (int j = j0; j <= j1; j++)
                    {
                        A[i, j] = X.get(i - i0, j - j0);
                    }
                }
            }
            catch (Exception)
            {
                throw new Exception("SubCoreMatrix indices");
            }
        }