예제 #1
0
        public override Matrix copy()
        {
            DMatrixRBlock A = new DMatrixRBlock(numRows, numCols, blockLength);

            A.set(this);
            return(A);
        }
예제 #2
0
        public static DMatrixRBlock wrap(double[] data, int numRows, int numCols, int blockLength)
        {
            DMatrixRBlock ret = new DMatrixRBlock();

            ret.data        = data;
            ret.numRows     = numRows;
            ret.numCols     = numCols;
            ret.blockLength = blockLength;

            return(ret);
        }
예제 #3
0
        public void set(DMatrixRBlock A)
        {
            this.blockLength = A.blockLength;
            this.numRows     = A.numRows;
            this.numCols     = A.numCols;

            int N = numCols * numRows;

            if (data.Length < N)
            {
                data = new double[N];
            }

            Array.Copy(A.data, 0, data, 0, N);
        }