public override Matrix copy() { FMatrixRBlock A = new FMatrixRBlock(numRows, numCols, blockLength); A.set(this); return(A); }
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); }
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); }