当前位置: 首页>>代码示例>>Java>>正文


Java CommonUtils.isUseLargeArrays方法代码示例

本文整理汇总了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);
}
 
开发者ID:wendykierp,项目名称:JTransforms,代码行数:13,代码来源:DoubleDST_1D.java

示例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);
}
 
开发者ID:wendykierp,项目名称:JTransforms,代码行数:13,代码来源:FloatDST_1D.java

示例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);
}
 
开发者ID:wendykierp,项目名称:JTransforms,代码行数:13,代码来源:DoubleDHT_1D.java

示例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);
}
 
开发者ID:wendykierp,项目名称:JTransforms,代码行数:14,代码来源:FloatDHT_1D.java

示例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);
    }

}
 
开发者ID:wendykierp,项目名称:JTransforms,代码行数:58,代码来源:FloatDCT_1D.java

示例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);
    }

}
 
开发者ID:wendykierp,项目名称:JTransforms,代码行数:57,代码来源:DoubleDCT_1D.java


注:本文中的org.jtransforms.utils.CommonUtils.isUseLargeArrays方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。