Example #1
0
        public override Matrix copy()
        {
            FMatrixRBlock A = new FMatrixRBlock(numRows, numCols, blockLength);

            A.set(this);
            return(A);
        }
Example #2
0
        public static FMatrixRBlock wrap(float[] data, int numRows, int numCols, int blockLength)
        {
            FMatrixRBlock ret = new FMatrixRBlock();

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

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

            int N = numCols * numRows;

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

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