|
IPPL (Independent Parallel Particle Layer)
IPPL
|
The Index class represents a strided range of indices, and it is used to define the index extent of Field objects on construction.
Constructors:
Index(): Creates a null interval with no elements.
Index(n): Instantiates an Index object representing the range of integers from 0 to n-1 inclusive, with implied stride 1.
Index(a,b): Instantiates an Index object representing the range of integers [a , b], with implied stride 1.
Index(a,b,s): Instantiates an Index object representing the range of integers [a , b], with stride s.
Examples:
Operations:
Given Index I(a,n,s) and an integer j, the following operations are possible:
NDIndex is a class that acts as a container for multiple Index instances. It simplifies operations such as intersections across N dimensions by forwarding requests to its contained Index objects.
The following example demonstrates the use of Index and NDIndex classes.
In this example, we define an NDIndex object ownedInput with three Index objects Iinput, Jinput, and Kinput. We then create a FieldLayout object layoutInput using the NDIndex object and a boolean array isParallel that specifies the parallel dimensions.