public DoubleMatrix2D like(int rows, int columns) { return new DenseLargeDoubleMatrix2D(rows, columns); }
/** * 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"); } }
public DoubleMatrix2D getImaginaryPart() { final DenseLargeDoubleMatrix2D Im = new DenseLargeDoubleMatrix2D(rows, columns); int nthreads = ConcurrencyUtils.getNumberOfThreads(); if ((nthreads > 1) && (size() >= ConcurrencyUtils.getThreadsBeginN_2D())) { nthreads = Math.min(nthreads, rows); Future<?>[] futures = new Future[nthreads]; int k = rows / nthreads; for (int j = 0; j < nthreads; j++) { final int firstRow = j * k; final int lastRow = (j == nthreads - 1) ? rows : firstRow + k; futures[j] = ConcurrencyUtils.submit(new Runnable() { public void run() { for (int r = firstRow; r < lastRow; r++) { for (int c = 0; c < columns; c++) { Im.setQuick(r, c, getQuick(r, c)[1]); } } } }); } ConcurrencyUtils.waitForCompletion(futures); } else { for (int r = 0; r < rows; r++) { for (int c = 0; c < columns; c++) { Im.setQuick(r, c, getQuick(r, c)[1]); } } } return Im; }
/** * 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 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 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 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 2D discrete cosine transform (DCT-II) of this matrix. * * @param scale * if true then scaling is performed * */ public void dct2(boolean scale) { if (content instanceof DenseLargeDoubleMatrix2D) { if (this.isNoView == true) { ((DenseLargeDoubleMatrix2D) content).dct2(scale); } else { DenseLargeDoubleMatrix2D copy = (DenseLargeDoubleMatrix2D) copy(); copy.dct2(scale); assign(copy); } } else { throw new IllegalArgumentException("This method is not supported"); } }
/** * Computes the discrete cosine transform (DCT-II) of each row of this * matrix. * * @param scale * if true then scaling is performed */ public void dctRows(final boolean scale) { if (content instanceof DenseLargeDoubleMatrix2D) { if (this.isNoView == true) { ((DenseLargeDoubleMatrix2D) content).dctRows(scale); } else { DenseLargeDoubleMatrix2D copy = (DenseLargeDoubleMatrix2D) copy(); copy.dctRows(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"); } }
public DoubleMatrix2D getRealPart() { final DenseLargeDoubleMatrix2D Re = new DenseLargeDoubleMatrix2D(rows, columns); int nthreads = ConcurrencyUtils.getNumberOfThreads(); if ((nthreads > 1) && (size() >= ConcurrencyUtils.getThreadsBeginN_2D())) { for (int r = 0; r < rows; r++) { for (int c = 0; c < columns; c++) { Re.setQuick(r, c, getQuick(r, c)[0]);
/** * 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 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 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 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 2D discrete cosine transform (DCT-II) of this matrix. * * @param scale * if true then scaling is performed * */ public void dct2(boolean scale) { if (content instanceof DenseLargeDoubleMatrix2D) { if (this.isNoView == true) { ((DenseLargeDoubleMatrix2D) content).dct2(scale); } else { DenseLargeDoubleMatrix2D copy = (DenseLargeDoubleMatrix2D) copy(); copy.dct2(scale); assign(copy); } } else { throw new IllegalArgumentException("This method is not supported"); } }
/** * Computes the discrete cosine transform (DCT-II) of each row of this * matrix. * * @param scale * if true then scaling is performed */ public void dctRows(final boolean scale) { if (content instanceof DenseLargeDoubleMatrix2D) { if (this.isNoView == true) { ((DenseLargeDoubleMatrix2D) content).dctRows(scale); } else { DenseLargeDoubleMatrix2D copy = (DenseLargeDoubleMatrix2D) copy(); copy.dctRows(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"); } }
public DoubleMatrix2D getRealPart() { final DenseLargeDoubleMatrix2D Re = new DenseLargeDoubleMatrix2D(rows, columns); int nthreads = ConcurrencyUtils.getNumberOfThreads(); if ((nthreads > 1) && (size() >= ConcurrencyUtils.getThreadsBeginN_2D())) { for (int r = 0; r < rows; r++) { for (int c = 0; c < columns; c++) { Re.setQuick(r, c, getQuick(r, c)[0]);