类 IndexConstant
- java.lang.Object
-
- org.meteoinfo.ndarray.Index
-
- org.meteoinfo.ndarray.IndexConstant
-
- 所有已实现的接口:
java.lang.Cloneable
public class IndexConstant extends Index
An Index into an Array that always returns 0. It can have any shape, so it allows you to create a constant Array of any shape.- 作者:
- caron
-
-
构造器概要
构造器 限定符 构造器 说明 protectedIndexConstant(int rank)protectedIndexConstant(int[] shape)protectedIndexConstant(int[] shape, int[] stride)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 intcurrentElement()always return 0booleanisFastIterator()Indexsection(java.util.List<Range> ranges)create a new Index based on a subsection of this one, with rank reduction if dimension length == 1.
-
-
-
方法详细资料
-
currentElement
public int currentElement()
always return 0- 覆盖:
currentElement在类中Index- 返回:
- the current element's index into the 1D backing array.
-
section
public Index section(java.util.List<Range> ranges) throws InvalidRangeException
从类复制的说明:Indexcreate a new Index based on a subsection of this one, with rank reduction if dimension length == 1.- 覆盖:
section在类中Index- 参数:
ranges- array of Ranges that specify the array subset. Must be same rank as original Array. A particular Range: 1) may be a subset; 2) may be null, meaning use entire Range.- 返回:
- new Index, with same or smaller rank as original.
- 抛出:
InvalidRangeException- if ranges dont match current shape
-
isFastIterator
public boolean isFastIterator()
- 覆盖:
isFastIterator在类中Index
-
-