public final class RectangularRegion1D extends AbstractRectangularRegion implements HjRegion.HjRegion1D
RectangularRegion1D class.
HjRegion.HjRegion1D, HjRegion.HjRegion2D, HjRegion.HjRegion3D
Modifier and Type | Field and Description |
---|---|
protected int |
maxInc |
protected int |
minInc |
Modifier | Constructor and Description |
---|---|
protected |
RectangularRegion1D(int pMinInc,
int pMaxInc)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Iterator<HjPoint> |
iterator()
Returns an iterator over an int array whose length is specified by the rank.
|
Iterator<HjPoint> |
iterator(int startLinearIndex,
int maxNumItems)
Returns an iterator over an int array whose length is specified by the rank.
|
int |
lowerLimit(int index)
Returns the lower limit of the region at the specified dimension.
|
int[] |
lowerLimits() |
int |
numElements()
Returns the number of elements in the iteration space defined by the region.
|
int |
rank()
Returns the rank of the region.
|
int |
toLinearIndex(int regionIndex0) |
int |
toLinearIndex(int[] regionIndices)
Returns the zero-based linear index in the 1D array.
|
int[] |
toRegionIndex(int linearIndex)
Return the region based index of the linear index.
|
Iterable<HjPoint> |
toSeqIterable()
The HjPoint object returned by the iterator may be reused by the iterator in subsequent calls to next().
|
String |
toString() |
int |
upperLimit(int index)
Returns the upper limits of the region at the specified dimension.
|
int[] |
upperLimits() |
createIterator
protected RectangularRegion1D(int pMinInc, int pMaxInc)
pMinInc
- a int.pMaxInc
- a int.public Iterable<HjPoint> toSeqIterable()
toSeqIterable
in interface HjRegion
public Iterator<HjPoint> iterator()
public Iterator<HjPoint> iterator(int startLinearIndex, int maxNumItems)
public int rank()
public int numElements()
numElements
in interface HjRegion
public int lowerLimit(int index)
lowerLimit
in interface HjRegion
public int upperLimit(int index)
upperLimit
in interface HjRegion
public int[] toRegionIndex(int linearIndex)
toRegionIndex
in interface HjRegion
linearIndex
- The zero-based linear index in the 1D arraypublic int toLinearIndex(int[] regionIndices)
toLinearIndex
in interface HjRegion
toLinearIndex
in interface HjRegion.HjRegion1D
regionIndices
- The region based index.public int toLinearIndex(int regionIndex0)
toLinearIndex
in interface HjRegion.HjRegion1D
regionIndex0
- The region index for the first dimension.public int[] lowerLimits()
lowerLimits
in interface HjRegion.HjRegion1D
public int[] upperLimits()
upperLimits
in interface HjRegion.HjRegion1D
Copyright © 2015 Rice University - Department of Computer Science. All rights reserved.