/** * Create a {@link FinalInterval} from a parameter list comprising minimum * and maximum coordinates. For example, to create a 2D interval from (10, * 10) to (20, 40) use createMinMax( 10, 10, 20, 40 ). * * @param minmax * a list of <em>2*n</em> parameters to create a <em>n</em> * -dimensional interval. The first <em>n</em> parameters specify * the minimum of the interval, the next <em>n</em> parameters * specify the maximum of the interval. * @return interval with the specified boundaries */ public static FinalInterval createMinMax( final long... minmax ) { return FinalInterval.createMinMax( minmax ); }
/** * Create a {@link FinalInterval} from a parameter list comprising minimum * and maximum coordinates. For example, to create a 2D interval from (10, * 10) to (20, 40) use createMinMax( 10, 10, 20, 40 ). * * @param minmax * a list of <em>2*n</em> parameters to create a <em>n</em> * -dimensional interval. The first <em>n</em> parameters specify * the minimum of the interval, the next <em>n</em> parameters * specify the maximum of the interval. * @return interval with the specified boundaries */ public static FinalInterval createMinMax( final long... minmax ) { return FinalInterval.createMinMax( minmax ); }
/** * Tests {@link FinalInterval#createMinMax(long...)}. */ @Test public void testCreateMinMaxOneArray() { final FinalInterval bounds = FinalInterval.createMinMax( 2, 3, 5, 8, 13, 21 ); assertInterval( 2, 3, 5, 8, 13, 21, 7, 11, 17, bounds ); }
/** * Tests {@link FinalInterval#FinalInterval(Interval)}. */ @Test public void testCtorInterval() { final FinalInterval source = FinalInterval.createMinMax( 3, 2, 1, 8, 6, 4 ); final FinalInterval bounds = new FinalInterval( source ); assertInterval( 3, 2, 1, 8, 6, 4, 6, 5, 4, bounds ); }
minmax[ d + numDimensions ] = center.getLongPosition( d ); final Interval interval = FinalInterval.createMinMax( minmax ); this.ra = rai.randomAccess( interval ); reset();
minmax[ d + numDimensions ] = center.getLongPosition( d ); final Interval interval = FinalInterval.createMinMax( minmax ); this.ra = rai.randomAccess( interval ); reset();