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