本文整理匯總了Java中org.jtransforms.utils.CommonUtils.isUseLargeArrays方法的典型用法代碼示例。如果您正苦於以下問題:Java CommonUtils.isUseLargeArrays方法的具體用法?Java CommonUtils.isUseLargeArrays怎麽用?Java CommonUtils.isUseLargeArrays使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.jtransforms.utils.CommonUtils
的用法示例。
在下文中一共展示了CommonUtils.isUseLargeArrays方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: DoubleDST_1D
import org.jtransforms.utils.CommonUtils; //導入方法依賴的package包/類
/**
* Creates new instance of DoubleDST_1D.
*
* @param n size of data
*/
public DoubleDST_1D(long n)
{
this.n = (int) n;
this.nl = n;
this.useLargeArrays = (CommonUtils.isUseLargeArrays() || n > LargeArray.getMaxSizeOf32bitArray());
dct = new DoubleDCT_1D(n);
}
示例2: FloatDST_1D
import org.jtransforms.utils.CommonUtils; //導入方法依賴的package包/類
/**
* Creates new instance of FloatDST_1D.
*
* @param n size of data
*/
public FloatDST_1D(long n)
{
this.n = (int) n;
this.nl = n;
this.useLargeArrays = (CommonUtils.isUseLargeArrays() || n > LargeArray.getMaxSizeOf32bitArray());
dct = new FloatDCT_1D(n);
}
示例3: DoubleDHT_1D
import org.jtransforms.utils.CommonUtils; //導入方法依賴的package包/類
/**
* Creates new instance of DoubleDHT_1D.
*
* @param n size of data
*/
public DoubleDHT_1D(long n)
{
this.n = (int) n;
this.nl = n;
this.useLargeArrays = (CommonUtils.isUseLargeArrays() || n > LargeArray.getMaxSizeOf32bitArray());
fft = new DoubleFFT_1D(n);
}
示例4: FloatDHT_1D
import org.jtransforms.utils.CommonUtils; //導入方法依賴的package包/類
/**
* Creates new instance of FloatDHT_1D.
*
* @param n
* size of data
*/
public FloatDHT_1D(long n)
{
this.n = (int) n;
this.nl = n;
this.useLargeArrays = (CommonUtils.isUseLargeArrays() || n > LargeArray.getMaxSizeOf32bitArray());
fft = new FloatFFT_1D(n);
}
示例5: FloatDCT_1D
import org.jtransforms.utils.CommonUtils; //導入方法依賴的package包/類
/**
* Creates new instance of FloatDCT_1D.
*
* @param n size of data
*
*/
public FloatDCT_1D(long n)
{
if (n < 1) {
throw new IllegalArgumentException("n must be greater than 0");
}
this.useLargeArrays = (CommonUtils.isUseLargeArrays() || n > LargeArray.getMaxSizeOf32bitArray());
this.n = (int) n;
this.nl = n;
if (!useLargeArrays) {
if (n > (1 << 28)) {
throw new IllegalArgumentException("n must be smaller or equal to " + (1 << 28) + " when useLargeArrays argument is set to false");
}
if (CommonUtils.isPowerOf2(n)) {
this.isPowerOfTwo = true;
this.ip = new int[(int) ceil(2 + (1 << (int) (log(n / 2 + 0.5) / log(2)) / 2))];
this.w = new float[this.n * 5 / 4];
nw = ip[0];
if (n > (nw << 2)) {
nw = this.n >> 2;
CommonUtils.makewt(nw, ip, w);
}
nc = ip[1];
if (n > nc) {
nc = this.n;
CommonUtils.makect(nc, w, nw, ip);
}
} else {
this.w = makect(this.n);
fft = new FloatFFT_1D(2 * n);
}
} else if (CommonUtils.isPowerOf2(n)) {
this.isPowerOfTwo = true;
this.ipl = new LongLargeArray((long) ceil(2 + (1l << (long) (log(n / 2 + 0.5) / log(2)) / 2)));
this.wl = new FloatLargeArray(this.nl * 5l / 4l);
nwl = ipl.getLong(0);
if (n > (nwl << 2l)) {
nwl = this.nl >> 2l;
CommonUtils.makewt(nwl, ipl, wl);
}
ncl = ipl.getLong(1);
if (n > ncl) {
ncl = this.nl;
CommonUtils.makect(ncl, wl, nwl, ipl);
}
} else {
this.wl = makect(n);
fft = new FloatFFT_1D(2 * n);
}
}
示例6: DoubleDCT_1D
import org.jtransforms.utils.CommonUtils; //導入方法依賴的package包/類
/**
* Creates new instance of DoubleDCT_1D.
*
* @param n size of data
*/
public DoubleDCT_1D(long n)
{
if (n < 1) {
throw new IllegalArgumentException("n must be greater than 0");
}
this.useLargeArrays = (CommonUtils.isUseLargeArrays() || n > LargeArray.getMaxSizeOf32bitArray());
this.n = (int) n;
this.nl = n;
if (!useLargeArrays) {
if (n > (1 << 28)) {
throw new IllegalArgumentException("n must be smaller or equal to " + (1 << 28) + " when useLargeArrays argument is set to false");
}
if (CommonUtils.isPowerOf2(n)) {
this.isPowerOfTwo = true;
this.ip = new int[(int) ceil(2 + (1 << (int) (log(n / 2 + 0.5) / log(2)) / 2))];
this.w = new double[this.n * 5 / 4];
nw = ip[0];
if (n > (nw << 2)) {
nw = this.n >> 2;
CommonUtils.makewt(nw, ip, w);
}
nc = ip[1];
if (n > nc) {
nc = this.n;
CommonUtils.makect(nc, w, nw, ip);
}
} else {
this.w = makect(this.n);
fft = new DoubleFFT_1D(2 * n);
}
} else if (CommonUtils.isPowerOf2(n)) {
this.isPowerOfTwo = true;
this.ipl = new LongLargeArray((long) ceil(2 + (1l << (long) (log(n / 2 + 0.5) / log(2)) / 2)));
this.wl = new DoubleLargeArray(this.nl * 5l / 4l);
nwl = ipl.getLong(0);
if (n > (nwl << 2l)) {
nwl = this.nl >> 2l;
CommonUtils.makewt(nwl, ipl, wl);
}
ncl = ipl.getLong(1);
if (n > ncl) {
ncl = this.nl;
CommonUtils.makect(ncl, wl, nwl, ipl);
}
} else {
this.wl = makect(n);
fft = new DoubleFFT_1D(2 * n);
}
}