
public final class RectangularRegion2D extends AbstractRectangularRegion implements HjRegion.HjRegion2D
RectangularRegion2D class.
HjRegion.HjRegion1D, HjRegion.HjRegion2D, HjRegion.HjRegion3D| Modifier and Type | Field and Description |
|---|---|
protected int |
maxInc0 |
protected int |
maxInc1 |
protected int |
minInc0 |
protected int |
minInc1 |
protected int |
range0 |
protected int |
range1 |
| Modifier | Constructor and Description |
|---|---|
protected |
RectangularRegion2D(int pMinInc0,
int pMaxInc0,
int pMinInc1,
int pMaxInc1)
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[] regionIndices)
Returns the zero-based linear index in the 1D array.
|
int |
toLinearIndex(int regionIndex0,
int regionIndex1) |
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() |
createIteratorprotected final int minInc0
protected final int maxInc0
protected final int minInc1
protected final int maxInc1
protected final int range0
protected final int range1
protected RectangularRegion2D(int pMinInc0,
int pMaxInc0,
int pMinInc1,
int pMaxInc1)
pMinInc0 - a int.pMaxInc0 - a int.pMinInc1 - a int.pMaxInc1 - a int.public Iterable<HjPoint> toSeqIterable()
toSeqIterable in interface HjRegionpublic Iterator<HjPoint> iterator()
public Iterator<HjPoint> iterator(int startLinearIndex, int maxNumItems)
public int rank()
public int numElements()
numElements in interface HjRegionpublic int lowerLimit(int index)
lowerLimit in interface HjRegionpublic int upperLimit(int index)
upperLimit in interface HjRegionpublic int[] toRegionIndex(int linearIndex)
toRegionIndex in interface HjRegionlinearIndex - The zero-based linear index in the 1D arraypublic int toLinearIndex(int[] regionIndices)
toLinearIndex in interface HjRegiontoLinearIndex in interface HjRegion.HjRegion2DregionIndices - The region based index.public int toLinearIndex(int regionIndex0,
int regionIndex1)
toLinearIndex in interface HjRegion.HjRegion2DregionIndex0 - The region index for the first dimension.regionIndex1 - The region index for the second dimension.public int[] lowerLimits()
lowerLimits in interface HjRegion.HjRegion2Dpublic int[] upperLimits()
upperLimits in interface HjRegion.HjRegion2DCopyright © 2015 Rice University - Department of Computer Science. All rights reserved.