@Override public FullSourceMapMixedRandomAccess< T > copy() { return new FullSourceMapMixedRandomAccess< T >( this ); }
@Override public FullSourceMapMixedRandomAccess< T > copyRandomAccess() { return copy(); } }
@Override public void localize( final double[] position ) { assert position.length >= n; for ( int d = 0; d < n; ++d ) position[ d ] = getDoublePosition( d ); }
@Override public float getFloatPosition( final int d ) { return getLongPosition( d ); }
@Override public void localize( final float[] position ) { assert position.length >= n; for ( int d = 0; d < n; ++d ) position[ d ] = getFloatPosition( d ); }
@Override public void localize( final int[] position ) { assert position.length >= n; for ( int d = 0; d < n; ++d ) position[ d ] = getIntPosition( d ); }
protected FullSourceMapMixedRandomAccess( final FullSourceMapMixedRandomAccess< T > randomAccess ) { super( randomAccess.numDimensions() ); this.s = randomAccess.s.copyRandomAccess(); this.m = randomAccess.m; this.translation = randomAccess.translation.clone(); this.sourceInv = randomAccess.sourceInv.clone(); this.sourceComponent = randomAccess.sourceComponent.clone(); tmpPosition = translation.clone(); tmpDistance = new long[ m ]; }
@Override public double getDoublePosition( final int d ) { return getLongPosition( d ); }
@Override public void localize( final float[] position ) { assert position.length >= n; for ( int d = 0; d < n; ++d ) position[ d ] = getFloatPosition( d ); }
@Override public void localize( final int[] position ) { assert position.length >= n; for ( int d = 0; d < n; ++d ) position[ d ] = getIntPosition( d ); }
protected FullSourceMapMixedRandomAccess( final FullSourceMapMixedRandomAccess< T > randomAccess ) { super( randomAccess.numDimensions() ); this.s = randomAccess.s.copyRandomAccess(); this.m = randomAccess.m; this.translation = randomAccess.translation.clone(); this.sourceInv = randomAccess.sourceInv.clone(); this.sourceComponent = randomAccess.sourceComponent.clone(); tmpPosition = translation.clone(); tmpDistance = new long[ m ]; }
@Override public FullSourceMapMixedRandomAccess< T > copy() { return new FullSourceMapMixedRandomAccess< T >( this ); }
@Override public void localize( final long[] position ) { assert position.length >= n; for ( int d = 0; d < n; ++d ) position[ d ] = getLongPosition( d ); }
@Override public FullSourceMapMixedRandomAccess< T > copyRandomAccess() { return copy(); } }
@Override public void localize( final double[] position ) { assert position.length >= n; for ( int d = 0; d < n; ++d ) position[ d ] = getDoublePosition( d ); }
@Override public RandomAccess< T > randomAccess() { if ( full ) return new FullSourceMapMixedRandomAccess< T >( s.randomAccess(), t ); return new MixedRandomAccess< T >( s.randomAccess(), t ); }
@Override public double getDoublePosition( final int d ) { return getLongPosition( d ); }
@Override public RandomAccess< T > randomAccess( final Interval interval ) { if ( full ) return new FullSourceMapMixedRandomAccess< T >( s.randomAccess(), t ); return new MixedRandomAccess< T >( s.randomAccess(), t ); } };
@Override public void localize( final long[] position ) { assert position.length >= n; for ( int d = 0; d < n; ++d ) position[ d ] = getLongPosition( d ); }
@Override public RandomAccess< T > randomAccess( final Interval interval ) { if ( full ) return new FullSourceMapMixedRandomAccess< T >( s.randomAccess(), t ); return new MixedRandomAccess< T >( s.randomAccess(), t ); } };