ucar.multiarray
Class DecimateMap

java.lang.Object
  extended by ucar.multiarray.ConcreteIndexMap
      extended by ucar.multiarray.DecimateMap
All Implemented Interfaces:
IndexMap

public class DecimateMap
extends ConcreteIndexMap

Use with MultiArrayProxy to reduce the length along a particular dimension by sampling the domain according to a (repeated) pattern.

See Also:
IndexMap, MultiArrayProxy

Nested Class Summary
 
Nested classes/interfaces inherited from class ucar.multiarray.ConcreteIndexMap
ConcreteIndexMap.ZZMap
 
Field Summary
 
Fields inherited from class ucar.multiarray.ConcreteIndexMap
iMap_, lengthsMap_
 
Constructor Summary
DecimateMap(ConcreteIndexMap prev, int position, boolean[] pattern)
          Create an ConcreteIndexMap which decimates along a specific dimension.
DecimateMap(int position, boolean[] pattern)
          Create an ConcreteIndexMap which decimates along a specific dimension.
 
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
 

Constructor Detail

DecimateMap

public DecimateMap(int position,
                   boolean[] pattern)
Create an ConcreteIndexMap which decimates along a specific dimension. Using this in an MultiArrayProxy will result in the the length of dimension position appearing smaller. The values which will show through are selected by the pattern argument.

Parameters:
position - the dimension number to clip along
pattern - index values along the dimension will show through where pattern is set to true. If pattern.length is less than the source dimension length, the pattern is repeated.

DecimateMap

public DecimateMap(ConcreteIndexMap prev,
                   int position,
                   boolean[] pattern)
Create an ConcreteIndexMap which decimates along a specific dimension. Using this in an MultiArrayProxy will result in the the length of dimension position appearing smaller. The values which will show through are selected by the pattern argument.

Parameters:
prev - ConcreteIndexMap to be composed with this.
position - the dimension number to clip along
pattern - index values along the dimension will show through where pattern is set to true. If pattern.length is less than the source dimension length, the pattern is repeated.
Method Detail

main

public static void main(java.lang.String[] args)