/** * Computes the 2D discrete Hartley transform (DHT) of this matrix. * */ public void dht2() { DoubleMatrix2D transpose = viewDice().copy(); int oldNthreads = ConcurrencyUtils.getNumberOfThreads(); ConcurrencyUtils.setNumberOfThreads(ConcurrencyUtils.nextPow2(oldNthreads)); if (dht2 == null) { dht2 = new DoubleDHT_2D(rows, columns); } dht2.forward((double[]) transpose.elements()); this.assign(transpose.viewDice().copy()); ConcurrencyUtils.setNumberOfThreads(oldNthreads); }
/** * Computes the 2D discrete sine transform (DST-II) of this matrix. * * @param scale * if true then scaling is performed * */ public void dst2(boolean scale) { DoubleMatrix2D transpose = viewDice().copy(); int oldNthreads = ConcurrencyUtils.getNumberOfThreads(); ConcurrencyUtils.setNumberOfThreads(ConcurrencyUtils.nextPow2(oldNthreads)); if (dst2 == null) { dst2 = new DoubleDST_2D(rows, columns); } dst2.forward((double[]) transpose.elements(), scale); this.assign(transpose.viewDice().copy()); ConcurrencyUtils.setNumberOfThreads(oldNthreads); }
/** * Computes the 2D discrete Hartley transform (DHT) of this matrix. * */ public void dht2() { DoubleMatrix2D transpose = viewDice().copy(); int oldNthreads = ConcurrencyUtils.getNumberOfThreads(); ConcurrencyUtils.setNumberOfThreads(ConcurrencyUtils.nextPow2(oldNthreads)); if (dht2 == null) { dht2 = new DoubleDHT_2D(rows, columns); } dht2.forward((double[]) transpose.elements()); this.assign(transpose.viewDice().copy()); ConcurrencyUtils.setNumberOfThreads(oldNthreads); }
/** * 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) { DoubleMatrix2D transpose = viewDice().copy(); int oldNthreads = ConcurrencyUtils.getNumberOfThreads(); ConcurrencyUtils.setNumberOfThreads(ConcurrencyUtils.nextPow2(oldNthreads)); if (dct2 == null) { dct2 = new DoubleDCT_2D(rows, columns); } dct2.inverse((double[]) transpose.elements(), scale); this.assign(transpose.viewDice().copy()); ConcurrencyUtils.setNumberOfThreads(oldNthreads); }
/** * Computes the 2D discrete cosine transform (DCT-II) of this matrix. * * @param scale * if true then scaling is performed * */ public void dct2(boolean scale) { DoubleMatrix2D transpose = viewDice().copy(); int oldNthreads = ConcurrencyUtils.getNumberOfThreads(); ConcurrencyUtils.setNumberOfThreads(ConcurrencyUtils.nextPow2(oldNthreads)); if (dct2 == null) { dct2 = new DoubleDCT_2D(rows, columns); } dct2.forward((double[]) transpose.elements(), scale); this.assign(transpose.viewDice().copy()); ConcurrencyUtils.setNumberOfThreads(oldNthreads); }
/** * Computes the 2D discrete sine transform (DST-II) of this matrix. * * @param scale * if true then scaling is performed * */ public void dst2(boolean scale) { DoubleMatrix2D transpose = viewDice().copy(); int oldNthreads = ConcurrencyUtils.getNumberOfThreads(); ConcurrencyUtils.setNumberOfThreads(ConcurrencyUtils.nextPow2(oldNthreads)); if (dst2 == null) { dst2 = new DoubleDST_2D(rows, columns); } dst2.forward((double[]) transpose.elements(), scale); this.assign(transpose.viewDice().copy()); ConcurrencyUtils.setNumberOfThreads(oldNthreads); }
/** * 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) { DoubleMatrix2D transpose = viewDice().copy(); int oldNthreads = ConcurrencyUtils.getNumberOfThreads(); ConcurrencyUtils.setNumberOfThreads(ConcurrencyUtils.nextPow2(oldNthreads)); if (dct2 == null) { dct2 = new DoubleDCT_2D(rows, columns); } dct2.inverse((double[]) transpose.elements(), scale); this.assign(transpose.viewDice().copy()); ConcurrencyUtils.setNumberOfThreads(oldNthreads); }
/** * Computes the 2D inverse of the discrete sine transform (DST-III) of this * matrix. * * @param scale * if true then scaling is performed * */ public void idst2(boolean scale) { DoubleMatrix2D transpose = viewDice().copy(); int oldNthreads = ConcurrencyUtils.getNumberOfThreads(); ConcurrencyUtils.setNumberOfThreads(ConcurrencyUtils.nextPow2(oldNthreads)); if (dst2 == null) { dst2 = new DoubleDST_2D(rows, columns); } dst2.inverse((double[]) transpose.elements(), scale); this.assign(transpose.viewDice().copy()); ConcurrencyUtils.setNumberOfThreads(oldNthreads); }
/** * Computes the 2D discrete cosine transform (DCT-II) of this matrix. * * @param scale * if true then scaling is performed * */ public void dct2(boolean scale) { DoubleMatrix2D transpose = viewDice().copy(); int oldNthreads = ConcurrencyUtils.getNumberOfThreads(); ConcurrencyUtils.setNumberOfThreads(ConcurrencyUtils.nextPow2(oldNthreads)); if (dct2 == null) { dct2 = new DoubleDCT_2D(rows, columns); } dct2.forward((double[]) transpose.elements(), scale); this.assign(transpose.viewDice().copy()); ConcurrencyUtils.setNumberOfThreads(oldNthreads); }
/** * Computes the 2D inverse of the discrete Hartley transform (IDHT) of this * matrix. * * @param scale * if true then scaling is performed * */ public void idht2(boolean scale) { DoubleMatrix2D transpose = viewDice().copy(); int oldNthreads = ConcurrencyUtils.getNumberOfThreads(); ConcurrencyUtils.setNumberOfThreads(ConcurrencyUtils.nextPow2(oldNthreads)); if (dht2 == null) { dht2 = new DoubleDHT_2D(rows, columns); } dht2.inverse((double[]) transpose.elements(), scale); this.assign(transpose.viewDice().copy()); ConcurrencyUtils.setNumberOfThreads(oldNthreads); }
/** * Computes the 2D inverse of the discrete Hartley transform (IDHT) of this * matrix. * * @param scale * if true then scaling is performed * */ public void idht2(boolean scale) { DoubleMatrix2D transpose = viewDice().copy(); int oldNthreads = ConcurrencyUtils.getNumberOfThreads(); ConcurrencyUtils.setNumberOfThreads(ConcurrencyUtils.nextPow2(oldNthreads)); if (dht2 == null) { dht2 = new DoubleDHT_2D(rows, columns); } dht2.inverse((double[]) transpose.elements(), scale); this.assign(transpose.viewDice().copy()); ConcurrencyUtils.setNumberOfThreads(oldNthreads); }
/** * Computes the 2D inverse of the discrete sine transform (DST-III) of this * matrix. * * @param scale * if true then scaling is performed * */ public void idst2(boolean scale) { DoubleMatrix2D transpose = viewDice().copy(); int oldNthreads = ConcurrencyUtils.getNumberOfThreads(); ConcurrencyUtils.setNumberOfThreads(ConcurrencyUtils.nextPow2(oldNthreads)); if (dst2 == null) { dst2 = new DoubleDST_2D(rows, columns); } dst2.inverse((double[]) transpose.elements(), scale); this.assign(transpose.viewDice().copy()); ConcurrencyUtils.setNumberOfThreads(oldNthreads); }
DoubleMatrix2D transpose = viewDice().copy(); int oldNthreads = ConcurrencyUtils.getNumberOfThreads(); ConcurrencyUtils.setNumberOfThreads(ConcurrencyUtils.nextPow2(oldNthreads));
DoubleMatrix2D transpose = viewDice().copy(); int oldNthreads = ConcurrencyUtils.getNumberOfThreads(); ConcurrencyUtils.setNumberOfThreads(ConcurrencyUtils.nextPow2(oldNthreads));
DoubleMatrix2D transpose = viewDice().copy(); int oldNthreads = ConcurrencyUtils.getNumberOfThreads(); ConcurrencyUtils.setNumberOfThreads(ConcurrencyUtils.nextPow2(oldNthreads));
DoubleMatrix2D transpose = viewDice().copy(); int oldNthreads = ConcurrencyUtils.getNumberOfThreads(); ConcurrencyUtils.setNumberOfThreads(ConcurrencyUtils.nextPow2(oldNthreads));