Example #1
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);
        }
Example #2
0
        public void set(DMatrixRBlock A)
        {
            this.blockLength = A.blockLength;
            this.numRows     = A.numRows;
            this.numCols     = A.numCols;

            int N = numCols * numRows;

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

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