public DoubleMatrix2D assign(DoubleMatrix2D source) { // overriden for performance only if (source == this) return this; // nothing to do checkShape(source); if (source instanceof DiagonalDoubleMatrix2D) { DiagonalDoubleMatrix2D other = (DiagonalDoubleMatrix2D) source; if ((dindex != other.dindex) || (dlength != other.dlength)) { throw new IllegalArgumentException("source is DiagonalDoubleMatrix2D with different diagonal stored."); } // quickest System.arraycopy(other.elements, 0, this.elements, 0, this.elements.length); return this; } else { return super.assign(source); } }
public DoubleMatrix2D assign(DoubleMatrix2D source) { // overriden for performance only if (source == this) return this; // nothing to do checkShape(source); if (source instanceof DiagonalDoubleMatrix2D) { DiagonalDoubleMatrix2D other = (DiagonalDoubleMatrix2D) source; if ((dindex != other.dindex) || (dlength != other.dlength)) { throw new IllegalArgumentException("source is DiagonalDoubleMatrix2D with different diagonal stored."); } // quickest System.arraycopy(other.elements, 0, this.elements, 0, this.elements.length); return this; } else { return super.assign(source); } }
/** * Computes the 2D discrete Hartley transform (DHT) of this matrix. */ public void dht2() { if (content instanceof DenseLargeDoubleMatrix2D) { if (this.isNoView == true) { ((DenseLargeDoubleMatrix2D) content).dht2(); } else { DenseLargeDoubleMatrix2D copy = (DenseLargeDoubleMatrix2D) copy(); copy.dht2(); assign(copy); } } else { throw new IllegalArgumentException("This method is not supported"); } }
/** * Computes the discrete Hertley transform (DHT) of each row of this matrix. */ public void dhtRows() { if (content instanceof DenseLargeDoubleMatrix2D) { if (this.isNoView == true) { ((DenseLargeDoubleMatrix2D) content).dhtRows(); } else { DenseLargeDoubleMatrix2D copy = (DenseLargeDoubleMatrix2D) copy(); copy.dhtRows(); assign(copy); } } else { throw new IllegalArgumentException("This method is not supported"); } }
/** * Computes the discrete Hertley transform (DHT) of each column of this * matrix. */ public void dhtColumns() { if (content instanceof DenseLargeDoubleMatrix2D) { if (this.isNoView == true) { ((DenseLargeDoubleMatrix2D) content).dhtColumns(); } else { DenseLargeDoubleMatrix2D copy = (DenseLargeDoubleMatrix2D) copy(); copy.dhtColumns(); assign(copy); } } else { throw new IllegalArgumentException("This method is not supported"); } }
/** * Computes the discrete Hertley transform (DHT) of each row of this matrix. */ public void dhtRows() { if (content instanceof DenseLargeDoubleMatrix2D) { if (this.isNoView == true) { ((DenseLargeDoubleMatrix2D) content).dhtRows(); } else { DenseLargeDoubleMatrix2D copy = (DenseLargeDoubleMatrix2D) copy(); copy.dhtRows(); assign(copy); } } else { throw new IllegalArgumentException("This method is not supported"); } }
/** * Computes the 2D discrete Hartley transform (DHT) of this matrix. */ public void dht2() { if (content instanceof DenseLargeDoubleMatrix2D) { if (this.isNoView == true) { ((DenseLargeDoubleMatrix2D) content).dht2(); } else { DenseLargeDoubleMatrix2D copy = (DenseLargeDoubleMatrix2D) copy(); copy.dht2(); assign(copy); } } else { throw new IllegalArgumentException("This method is not supported"); } }
/** * Computes the discrete Hertley transform (DHT) of each column of this * matrix. */ public void dhtColumns() { if (content instanceof DenseLargeDoubleMatrix2D) { if (this.isNoView == true) { ((DenseLargeDoubleMatrix2D) content).dhtColumns(); } else { DenseLargeDoubleMatrix2D copy = (DenseLargeDoubleMatrix2D) copy(); copy.dhtColumns(); assign(copy); } } else { throw new IllegalArgumentException("This method is not supported"); } }
/** * Computes the 2D discrete sine transform (DST-II) of this matrix. * * @param scale * if true then scaling is performed */ public void dst2(boolean scale) { if (content instanceof DenseLargeDoubleMatrix2D) { if (this.isNoView == true) { ((DenseLargeDoubleMatrix2D) content).dst2(scale); } else { DenseLargeDoubleMatrix2D copy = (DenseLargeDoubleMatrix2D) copy(); copy.dst2(scale); assign(copy); } } else { throw new IllegalArgumentException("This method is not supported"); } }
/** * Computes the discrete sine transform (DST-II) of each row of this matrix. * * @param scale * if true then scaling is performed */ public void dstRows(final boolean scale) { if (content instanceof DenseLargeDoubleMatrix2D) { if (this.isNoView == true) { ((DenseLargeDoubleMatrix2D) content).dstRows(scale); } else { DenseLargeDoubleMatrix2D copy = (DenseLargeDoubleMatrix2D) copy(); copy.dstRows(scale); assign(copy); } } else { throw new IllegalArgumentException("This method is not supported"); } }
/** * Computes the 2D inverse of the discrete cosine transform (DCT-III) of * this matrix. * * @param scale * if true then scaling is performed */ public void idct2(boolean scale) { if (content instanceof DenseLargeDoubleMatrix2D) { if (this.isNoView == true) { ((DenseLargeDoubleMatrix2D) content).idct2(scale); } else { DenseLargeDoubleMatrix2D copy = (DenseLargeDoubleMatrix2D) copy(); copy.idct2(scale); assign(copy); } } else { throw new IllegalArgumentException("This method is not supported"); } }
/** * Computes the inverse of the discrete cosine transform (DCT-III) of each * row of this matrix. * * @param scale * if true then scaling is performed */ public void idctRows(final boolean scale) { if (content instanceof DenseLargeDoubleMatrix2D) { if (this.isNoView == true) { ((DenseLargeDoubleMatrix2D) content).idctRows(scale); } else { DenseLargeDoubleMatrix2D copy = (DenseLargeDoubleMatrix2D) copy(); copy.idctRows(scale); assign(copy); } } else { throw new IllegalArgumentException("This method is not supported"); } }
/** * Computes the discrete cosine transform (DCT-II) of each column of this * matrix. * * @param scale * if true then scaling is performed */ public void dctColumns(final boolean scale) { if (content instanceof DenseLargeDoubleMatrix2D) { if (this.isNoView == true) { ((DenseLargeDoubleMatrix2D) content).dctColumns(scale); } else { DenseLargeDoubleMatrix2D copy = (DenseLargeDoubleMatrix2D) copy(); copy.dctColumns(scale); assign(copy); } } else { throw new IllegalArgumentException("This method is not supported"); } }
/** * Computes the inverse of the discrete cosine transform (DCT-III) of each * column of this matrix. * * @param scale * if true then scaling is performed */ public void idctColumns(final boolean scale) { if (content instanceof DenseLargeDoubleMatrix2D) { if (this.isNoView == true) { ((DenseLargeDoubleMatrix2D) content).idctColumns(scale); } else { DenseLargeDoubleMatrix2D copy = (DenseLargeDoubleMatrix2D) copy(); copy.idctColumns(scale); assign(copy); } } else { throw new IllegalArgumentException("This method is not supported"); } }
/** * Computes the 2D discrete sine transform (DST-II) of this matrix. * * @param scale * if true then scaling is performed */ public void dst2(boolean scale) { if (content instanceof DenseLargeDoubleMatrix2D) { if (this.isNoView == true) { ((DenseLargeDoubleMatrix2D) content).dst2(scale); } else { DenseLargeDoubleMatrix2D copy = (DenseLargeDoubleMatrix2D) copy(); copy.dst2(scale); assign(copy); } } else { throw new IllegalArgumentException("This method is not supported"); } }
/** * Computes the discrete sine transform (DST-II) of each row of this matrix. * * @param scale * if true then scaling is performed */ public void dstRows(final boolean scale) { if (content instanceof DenseLargeDoubleMatrix2D) { if (this.isNoView == true) { ((DenseLargeDoubleMatrix2D) content).dstRows(scale); } else { DenseLargeDoubleMatrix2D copy = (DenseLargeDoubleMatrix2D) copy(); copy.dstRows(scale); assign(copy); } } else { throw new IllegalArgumentException("This method is not supported"); } }
/** * Computes the discrete sine transform (DST-II) of each column of this * matrix. * * @param scale * if true then scaling is performed * */ public void dstColumns(final boolean scale) { if (content instanceof DenseLargeDoubleMatrix2D) { if (this.isNoView == true) { ((DenseLargeDoubleMatrix2D) content).dstColumns(scale); } else { DenseLargeDoubleMatrix2D copy = (DenseLargeDoubleMatrix2D) copy(); copy.dstColumns(scale); assign(copy); } } else { throw new IllegalArgumentException("This method is not supported"); } }
/** * Computes the inverse of the discrete Hartley transform (DHT) of each row * of this matrix. * * @param scale * if true then scaling is performed * */ public void idhtRows(final boolean scale) { if (content instanceof DenseLargeDoubleMatrix2D) { if (this.isNoView == true) { ((DenseLargeDoubleMatrix2D) content).idhtRows(scale); } else { DenseLargeDoubleMatrix2D copy = (DenseLargeDoubleMatrix2D) copy(); copy.idhtRows(scale); assign(copy); } } else { throw new IllegalArgumentException("This method is not supported"); } }
public DoubleMatrix2D assign(final DoubleMatrix2D y, final cern.colt.function.tdouble.DoubleDoubleFunction function) { checkShape(y); if (y instanceof WrapperDoubleMatrix2D) { IntArrayList rowList = new IntArrayList(); IntArrayList columnList = new IntArrayList(); DoubleArrayList valueList = new DoubleArrayList(); y.getNonZeros(rowList, columnList, valueList); assign(y, function, rowList, columnList); } else { super.assign(y, function); } return this; }
public DoubleMatrix2D assign(final DoubleMatrix2D y, final cern.colt.function.tdouble.DoubleDoubleFunction function) { checkShape(y); if (y instanceof WrapperDoubleMatrix2D) { IntArrayList rowList = new IntArrayList(); IntArrayList columnList = new IntArrayList(); DoubleArrayList valueList = new DoubleArrayList(); y.getNonZeros(rowList, columnList, valueList); assign(y, function, rowList, columnList); } else { super.assign(y, function); } return this; }