ucar.multiarray
Class ClipMap
java.lang.Object
ucar.multiarray.ConcreteIndexMap
ucar.multiarray.ClipMap
- All Implemented Interfaces:
- IndexMap
- public class ClipMap
- extends ConcreteIndexMap
Use with MultiArrayProxy to limit the bounds of an
index to the delegate on a given dimension.
You could "clip" a 2d MultiArray to a window using
2 of these.
- See Also:
IndexMap,
MultiArrayProxy
|
Constructor Summary |
ClipMap(ConcreteIndexMap prev,
int position,
int low,
int extent)
Create an IndexMap which clips along a specific dimension
and is functionally composed with another IndexMap. |
ClipMap(int position,
int low,
int extent)
Create an IndexMap which clips along a specific dimension. |
| Methods inherited from class ucar.multiarray.ConcreteIndexMap |
getLengths, getOutputLength, getRank, getTransformed, init, init, link, link, setInput, setLengths, toString, transform |
ClipMap
public ClipMap(int position,
int low,
int extent)
- Create an IndexMap which clips along a specific dimension.
Using this in an MultiArrayProxy will result in the
the length of dimension
position appearing
as extent.
- Parameters:
position - the dimension number to clip alonglow - the minimum value. 0 will map to thisextent - the new dimension length at position
ClipMap
public ClipMap(ConcreteIndexMap prev,
int position,
int low,
int extent)
- Create an IndexMap which clips along a specific dimension
and is functionally composed with another IndexMap.
Using this in an MultiArrayProxy will result in the
the length of dimension
position appearing
as extent.
- Parameters:
prev - IndexMap to be composed with this.position - the dimension number to clip alonglow - the minimum value. 0 will map to thisextent - the new dimension length at position
main
public static void main(String[] args)