本文整理了Java中ucar.ma2.Index.reduce()
方法的一些代码示例,展示了Index.reduce()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Index.reduce()
方法的具体详情如下:
包路径:ucar.ma2.Index
类名称:Index
方法名:reduce
[英]Create a new Index based on current one by eliminating any dimensions with length one.
[中]通过消除任何长度为1的维度,在当前索引的基础上创建新索引。
代码示例来源:origin: edu.ucar/netcdf
/**
* Create a new Index based on current one by
* eliminating any dimensions with length one.
*
* @return the new Index
*/
Index reduce() {
Index c = this;
for (int ii = 0; ii < rank; ii++)
if (shape[ii] == 1) { // do this on the first one you find
Index newc = c.reduce(ii);
return newc.reduce(); // any more to do?
}
return c;
}
代码示例来源:origin: edu.ucar/cdm
/**
* Create a new Index based on current one by
* eliminating any dimensions with length one.
*
* @return the new Index
*/
Index reduce() {
Index c = this;
for (int ii = 0; ii < rank; ii++)
if (shape[ii] == 1) { // do this on the first one you find
Index newc = c.reduce(ii);
return newc.reduce(); // any more to do?
}
return c;
}
代码示例来源:origin: Unidata/thredds
/**
* Create a new Index based on current one by
* eliminating any dimensions with length one.
*
* @return the new Index
*/
Index reduce() {
Index c = this;
for (int ii = 0; ii < rank; ii++)
if (shape[ii] == 1) { // do this on the first one you find
Index newc = c.reduce(ii);
return newc.reduce(); // any more to do?
}
return c;
}
代码示例来源:origin: edu.ucar/cdm
/**
* Create a new Array using same backing store as this Array, by
* eliminating the specified dimension.
*
* @param dim dimension to eliminate: must be of length one, else IllegalArgumentException
* @return the new Array
*/
public Array reduce(int dim) {
return createView(indexCalc.reduce(dim));
}
代码示例来源:origin: edu.ucar/cdm
/**
* Create a new Array using same backing store as this Array, by
* eliminating any dimensions with length one.
*
* @return the new Array, or the same array if no reduction was done
*/
public Array reduce() {
Index ri = indexCalc.reduce();
if (ri == indexCalc) return this;
return createView(ri);
}
代码示例来源:origin: edu.ucar/netcdf
/**
* Create a new Array using same backing store as this Array, by
* eliminating the specified dimension.
*
* @param dim dimension to eliminate: must be of length one, else IllegalArgumentException
* @return the new Array
*/
public Array reduce(int dim) {
return createView(indexCalc.reduce(dim));
}
代码示例来源:origin: Unidata/thredds
/**
* Create a new Array using same backing store as this Array, by
* eliminating the specified dimension.
*
* @param dim dimension to eliminate: must be of length one, else IllegalArgumentException
* @return the new Array
*/
public Array reduce(int dim) {
return createView(indexCalc.reduce(dim));
}
代码示例来源:origin: edu.ucar/netcdf
/**
* Create a new Array using same backing store as this Array, by
* eliminating any dimensions with length one.
*
* @return the new Array, or the same array if no reduction was done
*/
public Array reduce() {
Index ri = indexCalc.reduce();
if (ri == indexCalc) return this;
return createView(ri);
}
代码示例来源:origin: Unidata/thredds
/**
* Create a new Array using same backing store as this Array, by
* eliminating any dimensions with length one.
*
* @return the new Array, or the same array if no reduction was done
*/
public Array reduce() {
Index ri = indexCalc.reduce();
if (ri == indexCalc) return this;
return createView(ri);
}
内容来源于网络,如有侵权,请联系作者删除!