Beispiel #1
0
 /**
  * Copies the non-zero structure of orig into "this"
  * @param orig Matrix who's structure is to be copied
  */
 public void copyStructure(FMatrixSparseCSC orig)
 {
     reshape(orig.numRows, orig.numCols, orig.nz_length);
     this.nz_length = orig.nz_length;
     Array.Copy(orig.col_idx, 0, col_idx, 0, orig.numCols + 1);
     Array.Copy(orig.nz_rows, 0, nz_rows, 0, orig.nz_length);
 }
Beispiel #2
0
        public virtual void set(Matrix original)
        {
            FMatrixSparseCSC o = (FMatrixSparseCSC)original;

            reshape(o.numRows, o.numCols, o.nz_length);
            this.nz_length = o.nz_length;

            Array.Copy(o.nz_values, 0, nz_values, 0, nz_length);
            Array.Copy(o.nz_rows, 0, nz_rows, 0, nz_length);
            Array.Copy(o.col_idx, 0, col_idx, 0, numCols + 1);
            this.indicesSorted = o.indicesSorted;
        }
Beispiel #3
0
 public FMatrixSparseCSC(FMatrixSparseCSC original)
     : this(original.numRows, original.numCols, original.nz_length)
 {
     set(original);
 }