@Override public NativeBoolType createVariable() { return new NativeBoolType(); }
@Override public NativeBoolType duplicateTypeOnSameNativeImg() { return new NativeBoolType( img ); }
@Override public NativeBoolType duplicateTypeOnSameNativeImg() { return new NativeBoolType( img ); }
@Override public NativeBoolType createVariable() { return new NativeBoolType(); }
/** * Create an {@link ArrayImg}<{@link NativeBoolType}, {@link BooleanArray}>. */ @SuppressWarnings( "unchecked" ) final static public ArrayImg< NativeBoolType, BooleanArray > booleans( final long... dim ) { return ( ArrayImg< NativeBoolType, BooleanArray > ) new ArrayImgFactory<>( new NativeBoolType() ).create( dim ); }
/** * Create an {@link ArrayImg}<{@link NativeBoolType}, {@link BooleanArray}>. */ @SuppressWarnings( "unchecked" ) final static public ArrayImg< NativeBoolType, BooleanArray > booleans( final long... dim ) { return ( ArrayImg< NativeBoolType, BooleanArray > ) new ArrayImgFactory<>( new NativeBoolType() ).create( dim ); }
/** * Create an {@link PlanarImg}<{@link NativeBoolType}, {@link BooleanArray}>. */ @SuppressWarnings( "unchecked" ) final static public PlanarImg< NativeBoolType, BooleanArray > booleans( final long... dim ) { return ( PlanarImg< NativeBoolType, BooleanArray > ) new PlanarImgFactory<>( new NativeBoolType() ).create( dim ); }
@Override public NativeBoolType copy() { return new NativeBoolType( get() ); }
/** * Create an {@link PlanarImg}<{@link NativeBoolType}, {@link BooleanArray}>. */ @SuppressWarnings( "unchecked" ) final static public PlanarImg< NativeBoolType, BooleanArray > booleans( final long... dim ) { return ( PlanarImg< NativeBoolType, BooleanArray > ) new PlanarImgFactory<>( new NativeBoolType() ).create( dim ); }
@Override public NativeBoolType copy() { return new NativeBoolType( get() ); }
/** * Creates an {@link ArrayImg}<{@link NativeBoolType}, * {@link BooleanAccess}> using a {@link BooleanAccess} passed as argument. */ final public static < A extends BooleanAccess > ArrayImg< NativeBoolType, A > booleans( final A access, final long... dim ) { final ArrayImg< NativeBoolType, A > img = new ArrayImg<>( access, dim, new Fraction() ); final NativeBoolType t = new NativeBoolType( img ); img.setLinkedType( t ); return img; }
/** * Creates an {@link ArrayImg}<{@link NativeBoolType}, {@link LongAccess}> * using a {@link LongAccess} passed as argument. */ final static public < A extends BooleanAccess > ArrayImg< NativeBoolType, A > bits( final A access, final long... dim ) { final ArrayImg< NativeBoolType, A > img = new ArrayImg<>( access, dim, new Fraction( 1, 64 ) ); final NativeBoolType t = new NativeBoolType( img ); img.setLinkedType( t ); return img; }
/** * Creates an {@link ArrayImg}<{@link NativeBoolType}, * {@link BooleanAccess}> using a {@link BooleanAccess} passed as argument. */ final public static < A extends BooleanAccess > ArrayImg< NativeBoolType, A > booleans( final A access, final long... dim ) { final ArrayImg< NativeBoolType, A > img = new ArrayImg<>( access, dim, new Fraction() ); final NativeBoolType t = new NativeBoolType( img ); img.setLinkedType( t ); return img; }
/** * Creates an {@link ArrayImg}<{@link NativeBoolType}, {@link LongAccess}> * using a {@link LongAccess} passed as argument. */ final static public < A extends BooleanAccess > ArrayImg< NativeBoolType, A > bits( final A access, final long... dim ) { final ArrayImg< NativeBoolType, A > img = new ArrayImg<>( access, dim, new Fraction( 1, 64 ) ); final NativeBoolType t = new NativeBoolType( img ); img.setLinkedType( t ); return img; }
/** * Tests that {@link NativeBoolType#getBigInteger()} returns the BigInteger * representation of a NativeBoolType. */ @Test public void testGetBigInteger() { final NativeBoolType l = new NativeBoolType( false ); assertEquals( BigInteger.ZERO, l.getBigInteger() ); }
/** * Tests {@link NativeBoolType#setBigInteger(BigInteger)} and ensures that * the value returned is within NativeBoolType range. */ @Test public void testSetBigInteger() { final NativeBoolType ul = new NativeBoolType( false ); assertEquals( ul.get(), false ); final BigInteger bi = new BigInteger( "AAAAAA3141343BBBBBBBBBBB4134", 16 ); ul.setBigInteger( bi ); assertEquals( ul.get(), true ); } }