checkShape(other); if (haveSharedCells(other)) { DoubleMatrix3D c = other.copy(); if (!(c instanceof DenseDoubleMatrix3D)) { // should not happen super.assign(source);
/** * Computes the 3D discrete Hartley transform (DHT) of this matrix. * */ public void dht3() { int oldNthreads = ConcurrencyUtils.getNumberOfThreads(); ConcurrencyUtils.setNumberOfThreads(ConcurrencyUtils.nextPow2(oldNthreads)); if (dht3 == null) { dht3 = new DoubleDHT_3D(slices, rows, columns); } if (isNoView == true) { dht3.forward(elements); } else { DoubleMatrix3D copy = this.copy(); dht3.forward((double[]) copy.elements()); this.assign((double[]) copy.elements()); } ConcurrencyUtils.setNumberOfThreads(oldNthreads); }
/** * Computes the 3D discrete Hartley transform (DHT) of this matrix. * */ public void dht3() { int oldNthreads = ConcurrencyUtils.getNumberOfThreads(); ConcurrencyUtils.setNumberOfThreads(ConcurrencyUtils.nextPow2(oldNthreads)); if (dht3 == null) { dht3 = new DoubleDHT_3D(slices, rows, columns); } if (isNoView == true) { dht3.forward(elements); } else { DoubleMatrix3D copy = this.copy(); dht3.forward((double[]) copy.elements()); this.assign((double[]) copy.elements()); } ConcurrencyUtils.setNumberOfThreads(oldNthreads); }
/** * Computes the 3D discrete cosine transform (DCT-II) of this matrix. * * @param scale * if true then scaling is performed * */ public void dct3(boolean scale) { int oldNthreads = ConcurrencyUtils.getNumberOfThreads(); ConcurrencyUtils.setNumberOfThreads(ConcurrencyUtils.nextPow2(oldNthreads)); if (dct3 == null) { dct3 = new DoubleDCT_3D(slices, rows, columns); } if (isNoView == true) { dct3.forward(elements, scale); } else { DoubleMatrix3D copy = this.copy(); dct3.forward((double[]) copy.elements(), scale); this.assign((double[]) copy.elements()); } ConcurrencyUtils.setNumberOfThreads(oldNthreads); }
elems = elements; } else { elems = (double[]) this.copy().elements();
/** * Computes the 3D discrete cosine transform (DCT-II) of this matrix. * * @param scale * if true then scaling is performed * */ public void dct3(boolean scale) { int oldNthreads = ConcurrencyUtils.getNumberOfThreads(); ConcurrencyUtils.setNumberOfThreads(ConcurrencyUtils.nextPow2(oldNthreads)); if (dct3 == null) { dct3 = new DoubleDCT_3D(slices, rows, columns); } if (isNoView == true) { dct3.forward(elements, scale); } else { DoubleMatrix3D copy = this.copy(); dct3.forward((double[]) copy.elements(), scale); this.assign((double[]) copy.elements()); } ConcurrencyUtils.setNumberOfThreads(oldNthreads); }
/** * Computes the 3D discrete sine transform (DST-II) of this matrix. * * @param scale * if true then scaling is performed * */ public void dst3(boolean scale) { int oldNthreads = ConcurrencyUtils.getNumberOfThreads(); ConcurrencyUtils.setNumberOfThreads(ConcurrencyUtils.nextPow2(oldNthreads)); if (dst3 == null) { dst3 = new DoubleDST_3D(slices, rows, columns); } if (isNoView == true) { dst3.forward(elements, scale); } else { DoubleMatrix3D copy = this.copy(); dst3.forward((double[]) copy.elements(), scale); this.assign((double[]) copy.elements()); } ConcurrencyUtils.setNumberOfThreads(oldNthreads); }
/** * Computes the 3D inverse of the discrete cosine transform (DCT-III) of * this matrix. * * @param scale * if true then scaling is performed */ public void idct3(boolean scale) { int oldNthreads = ConcurrencyUtils.getNumberOfThreads(); ConcurrencyUtils.setNumberOfThreads(ConcurrencyUtils.nextPow2(oldNthreads)); if (dct3 == null) { dct3 = new DoubleDCT_3D(slices, rows, columns); } if (isNoView == true) { dct3.inverse(elements, scale); } else { DoubleMatrix3D copy = this.copy(); dct3.inverse((double[]) copy.elements(), scale); this.assign((double[]) copy.elements()); } ConcurrencyUtils.setNumberOfThreads(oldNthreads); }
/** * Computes the 3D inverse of the discrete Hartley transform (IDHT) of this * matrix. * * @param scale * if true then scaling is performed */ public void idht3(boolean scale) { int oldNthreads = ConcurrencyUtils.getNumberOfThreads(); ConcurrencyUtils.setNumberOfThreads(ConcurrencyUtils.nextPow2(oldNthreads)); if (dht3 == null) { dht3 = new DoubleDHT_3D(slices, rows, columns); } if (isNoView == true) { dht3.inverse(elements, scale); } else { DoubleMatrix3D copy = this.copy(); dht3.inverse((double[]) copy.elements(), scale); this.assign((double[]) copy.elements()); } ConcurrencyUtils.setNumberOfThreads(oldNthreads); }
/** * Computes the 3D discrete sine transform (DST-II) of this matrix. * * @param scale * if true then scaling is performed * */ public void dst3(boolean scale) { int oldNthreads = ConcurrencyUtils.getNumberOfThreads(); ConcurrencyUtils.setNumberOfThreads(ConcurrencyUtils.nextPow2(oldNthreads)); if (dst3 == null) { dst3 = new DoubleDST_3D(slices, rows, columns); } if (isNoView == true) { dst3.forward(elements, scale); } else { DoubleMatrix3D copy = this.copy(); dst3.forward((double[]) copy.elements(), scale); this.assign((double[]) copy.elements()); } ConcurrencyUtils.setNumberOfThreads(oldNthreads); }
/** * Computes the 3D inverse of the discrete Hartley transform (IDHT) of this * matrix. * * @param scale * if true then scaling is performed */ public void idht3(boolean scale) { int oldNthreads = ConcurrencyUtils.getNumberOfThreads(); ConcurrencyUtils.setNumberOfThreads(ConcurrencyUtils.nextPow2(oldNthreads)); if (dht3 == null) { dht3 = new DoubleDHT_3D(slices, rows, columns); } if (isNoView == true) { dht3.inverse(elements, scale); } else { DoubleMatrix3D copy = this.copy(); dht3.inverse((double[]) copy.elements(), scale); this.assign((double[]) copy.elements()); } ConcurrencyUtils.setNumberOfThreads(oldNthreads); }
/** * Computes the 3D inverse of the discrete sine transform (DST-III) of this * matrix. * * @param scale * if true then scaling is performed * */ public void idst3(boolean scale) { int oldNthreads = ConcurrencyUtils.getNumberOfThreads(); ConcurrencyUtils.setNumberOfThreads(ConcurrencyUtils.nextPow2(oldNthreads)); if (dst3 == null) { dst3 = new DoubleDST_3D(slices, rows, columns); } if (isNoView == true) { dst3.inverse(elements, scale); } else { DoubleMatrix3D copy = this.copy(); dst3.inverse((double[]) copy.elements(), scale); this.assign((double[]) copy.elements()); } ConcurrencyUtils.setNumberOfThreads(oldNthreads); }
/** * Computes the 3D inverse of the discrete sine transform (DST-III) of this * matrix. * * @param scale * if true then scaling is performed * */ public void idst3(boolean scale) { int oldNthreads = ConcurrencyUtils.getNumberOfThreads(); ConcurrencyUtils.setNumberOfThreads(ConcurrencyUtils.nextPow2(oldNthreads)); if (dst3 == null) { dst3 = new DoubleDST_3D(slices, rows, columns); } if (isNoView == true) { dst3.inverse(elements, scale); } else { DoubleMatrix3D copy = this.copy(); dst3.inverse((double[]) copy.elements(), scale); this.assign((double[]) copy.elements()); } ConcurrencyUtils.setNumberOfThreads(oldNthreads); }
/** * Computes the 3D inverse of the discrete cosine transform (DCT-III) of * this matrix. * * @param scale * if true then scaling is performed */ public void idct3(boolean scale) { int oldNthreads = ConcurrencyUtils.getNumberOfThreads(); ConcurrencyUtils.setNumberOfThreads(ConcurrencyUtils.nextPow2(oldNthreads)); if (dct3 == null) { dct3 = new DoubleDCT_3D(slices, rows, columns); } if (isNoView == true) { dct3.inverse(elements, scale); } else { DoubleMatrix3D copy = this.copy(); dct3.inverse((double[]) copy.elements(), scale); this.assign((double[]) copy.elements()); } ConcurrencyUtils.setNumberOfThreads(oldNthreads); }
elems = elements; } else { elems = (double[]) this.copy().elements();
elems = elements; } else { elems = (double[]) this.copy().elements();
elems = elements; } else { elems = (double[]) this.copy().elements();
fft3.realInverse(elements, scale); } else { DoubleMatrix3D copy = this.copy(); fft3.realInverse((double[]) copy.elements(), scale); this.assign((double[]) copy.elements());
fft3.realForward(elements); } else { DoubleMatrix3D copy = this.copy(); fft3.realForward((double[]) copy.elements()); this.assign((double[]) copy.elements());
fft3.realForward(elements); } else { DoubleMatrix3D copy = this.copy(); fft3.realForward((double[]) copy.elements()); this.assign((double[]) copy.elements());