@Override public NLinearInterpolator2D< T > copy() { return new NLinearInterpolator2D< T >( this ); } }
@Override public T get() { fillWeights(); accumulator.set( target.get() ); accumulator.mul( weights[ 0 ] ); target.fwd( 0 ); tmp.set( target.get() ); tmp.mul( weights[ 1 ] ); accumulator.add( tmp ); target.fwd( 1 ); tmp.set( target.get() ); tmp.mul( weights[ 3 ] ); accumulator.add( tmp ); target.bck( 0 ); tmp.set( target.get() ); tmp.mul( weights[ 2 ] ); accumulator.add( tmp ); target.bck( 1 ); return accumulator; }
@Override public T get() { fillWeights(); accumulator.set( target.get() ); accumulator.mul( weights[ 0 ] ); target.fwd( 0 ); tmp.set( target.get() ); tmp.mul( weights[ 1 ] ); accumulator.add( tmp ); target.fwd( 1 ); tmp.set( target.get() ); tmp.mul( weights[ 3 ] ); accumulator.add( tmp ); target.bck( 0 ); tmp.set( target.get() ); tmp.mul( weights[ 2 ] ); accumulator.add( tmp ); target.bck( 1 ); return accumulator; }
@Override public NLinearInterpolator2D< T > copy() { return new NLinearInterpolator2D< T >( this ); } }
@Override public NLinearInterpolator< T > create( final RandomAccessible< T > randomAccessible ) { switch ( randomAccessible.numDimensions() ) { case 1: return new NLinearInterpolator1D< T >( randomAccessible ); case 2: return new NLinearInterpolator2D< T >( randomAccessible ); // case 3: // return new NLinearInterpolator3D< T >( randomAccessible ); default: return new NLinearInterpolator< T >( randomAccessible ); } }
@Override public NLinearInterpolator< T > create( final RandomAccessible< T > randomAccessible ) { switch ( randomAccessible.numDimensions() ) { case 1: return new NLinearInterpolator1D< T >( randomAccessible ); case 2: return new NLinearInterpolator2D< T >( randomAccessible ); // case 3: // return new NLinearInterpolator3D< T >( randomAccessible ); default: return new NLinearInterpolator< T >( randomAccessible ); } }