ucar.ma2.Index.computeStrides()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(1.6k)|赞(0)|评价(0)|浏览(83)

本文整理了Java中ucar.ma2.Index.computeStrides()方法的一些代码示例,展示了Index.computeStrides()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Index.computeStrides()方法的具体详情如下:
包路径:ucar.ma2.Index
类名称:Index
方法名:computeStrides

Index.computeStrides介绍

[英]Compute standard strides based on array's shape. Ignore vlen
[中]根据阵列的形状计算标准步幅。忽略vlen

代码示例

代码示例来源:origin: edu.ucar/netcdf

/**
 * Constructor for subclasses only.
 * @param _shape describes an index section: slowest varying comes first (row major)
 */
protected Index(int[] _shape) {
 this.shape = new int[_shape.length];  // optimization over clone
 System.arraycopy(_shape, 0, this.shape, 0, _shape.length);
 rank = shape.length;
 current = new int[rank];
 stride = new int[rank];
 size = computeStrides(shape, stride);
 offset = 0;
}

代码示例来源:origin: edu.ucar/cdm

/**
 * Constructor for subclasses only.
 * @param _shape describes an index section: slowest varying comes first (row major)
 */
protected Index(int[] _shape) {
 this.shape = new int[_shape.length];  // optimization over clone
 System.arraycopy(_shape, 0, this.shape, 0, _shape.length);
 rank = shape.length;
 current = new int[rank];
 stride = new int[rank];
 size = computeStrides(shape, stride);
 offset = 0;
 hasvlen = (shape.length > 0 && shape[shape.length-1] < 0);
}

代码示例来源:origin: Unidata/thredds

/**
 * Constructor for subclasses only.
 *
 * @param _shape describes an index section: slowest varying comes first (row major)
 */
protected Index(int[] _shape) {
 this.shape = new int[_shape.length];  // optimization over clone
 System.arraycopy(_shape, 0, this.shape, 0, _shape.length);
 rank = shape.length;
 current = new int[rank];
 stride = new int[rank];
 size = computeStrides(shape, stride);
 offset = 0;
 hasvlen = (shape.length > 0 && shape[shape.length - 1] < 0);
}

相关文章