ucar.multiarray
Class FlattenMap
java.lang.Object
|
+--ucar.multiarray.ConcreteIndexMap
|
+--ucar.multiarray.FlattenMap
- All Implemented Interfaces:
- IndexMap
- public class FlattenMap
- extends ConcreteIndexMap
Use with MultiArrayProxy to reduce apparent rank by
merging adjacent dimensions. The total number of elements
remains constant.
This framework doesn't really support this operation
very well. See caveats in get()
- See Also:
IndexMap
,
MultiArrayProxy
Constructor Summary |
FlattenMap(ConcreteIndexMap prev,
int position)
Create an ConcreteIndexMap which merges two adjacent dimensions. |
FlattenMap(int position)
Create an ConcreteIndexMap which merges two adjacent dimensions. |
Method Summary |
static void |
main(java.lang.String[] args)
|
Methods inherited from class ucar.multiarray.ConcreteIndexMap |
getLengths, getOutputLength, getRank, getTransformed, init, init, link, link, setInput, setLengths, toString, transform |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
FlattenMap
public FlattenMap(int position)
- Create an ConcreteIndexMap which merges two adjacent dimensions.
Using this in an MultiArrayProxy will result in the
a MultiArray of one less rank.
- Parameters:
position
- this dimension and
dimension (position +1)
will appear as a single dimension.
FlattenMap
public FlattenMap(ConcreteIndexMap prev,
int position)
- Create an ConcreteIndexMap which merges two adjacent dimensions.
Using this in an MultiArrayProxy will result in the
a MultiArray of one less rank.
- Parameters:
prev
- ConcreteIndexMap to be composed with this.position
- this dimension and
dimension (position +1)
main
public static void main(java.lang.String[] args)