ucar.multiarray
Class FlipMap
java.lang.Object
ucar.multiarray.ConcreteIndexMap
ucar.multiarray.FlipMap
- All Implemented Interfaces:
- IndexMap
public class FlipMap
- extends ConcreteIndexMap
Use with MultiArrayProxy to flip (invert) the
indexing along a particular dimension.
Maps {0, 1, ..., N-1} to {N-1, N-2, ..., 0} where
N is the length of the dimension.
- Version:
- $Revision: 1.2 $ $Date: 2002/05/29 20:32:39 $
- Author:
- $Author: steve $
- See Also:
IndexMap
,
MultiArrayProxy
Constructor Summary |
FlipMap(ConcreteIndexMap prev,
int position)
Create an IndexMap which flips the indexing
for a particular dimension and is functionally composed
with another IndexMap. |
FlipMap(int position)
Create an IndexMap which flips the indexing
for a particular dimension. |
Methods inherited from class ucar.multiarray.ConcreteIndexMap |
getLengths, getOutputLength, getRank, getTransformed, init, init, link, link, setInput, setLengths, toString, transform |
FlipMap
public FlipMap(int position)
- Create an IndexMap which flips the indexing
for a particular dimension.
- Parameters:
position
- the dimension number where the index
is to be flipped.
FlipMap
public FlipMap(ConcreteIndexMap prev,
int position)
- Create an IndexMap which flips the indexing
for a particular dimension and is functionally composed
with another IndexMap.
- Parameters:
prev
- ConcreteIndexMap to be composed with this.position
- the dimension number where the index
is to be flipped.
main
public static void main(String[] args)