public class UnsignedVariableBitLengthType extends AbstractBit64Type<UnsignedVariableBitLengthType> implements IntegerType<UnsignedVariableBitLengthType>
Type
with arbitrary bit depth up to maximum 64 bits. The behavior
beyond 64 bits is undefined.
The performance of this type is traded off for the gain in memory storage.
The set(long)
operation takes have the time as the get()
operation. The performance may degrade very slightly with increasing bit
depth, but the decrease is barely noticeable.dataAccess, i, img, nBits
Constructor and Description |
---|
UnsignedVariableBitLengthType(int nBits) |
UnsignedVariableBitLengthType(LongAccess access,
int nBits) |
UnsignedVariableBitLengthType(long value,
int nBits) |
UnsignedVariableBitLengthType(NativeImg<?,? extends LongAccess> bitStorage,
int nBits) |
getBits, setBits
getEntitiesPerPixel, index, updateContainer
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
decIndex, decIndex, getIndex, incIndex, incIndex, updateIndex
public UnsignedVariableBitLengthType(NativeImg<?,? extends LongAccess> bitStorage, int nBits)
public UnsignedVariableBitLengthType(long value, int nBits)
public UnsignedVariableBitLengthType(LongAccess access, int nBits)
public UnsignedVariableBitLengthType(int nBits)
public void set(long value)
public long get()
public void set(UnsignedVariableBitLengthType c)
Type
Type
.set
in interface Type<UnsignedVariableBitLengthType>
c
- the new valuepublic UnsignedVariableBitLengthType duplicateTypeOnSameNativeImg()
NativeType
NativeType
which stores in the same physical array.
This is only used internally.duplicateTypeOnSameNativeImg
in interface NativeType<UnsignedVariableBitLengthType>
NativeType
instance working on the same
NativeImg
public NativeTypeFactory<UnsignedVariableBitLengthType,LongAccess> getNativeTypeFactory()
getNativeTypeFactory
in interface NativeType<UnsignedVariableBitLengthType>
getNativeTypeFactory
in class AbstractBitType<UnsignedVariableBitLengthType>
public UnsignedVariableBitLengthType createVariable()
Type
Type
variable which can only store one value.createVariable
in interface Type<UnsignedVariableBitLengthType>
Type
variablepublic UnsignedVariableBitLengthType copy()
Type
copy
in interface Type<UnsignedVariableBitLengthType>
Type
variablepublic void div(UnsignedVariableBitLengthType t)
div
in interface Div<UnsignedVariableBitLengthType>
UnsignedLongType.divide(long, long)
public void mul(float c)
mul
in interface MulFloatingPoint
public void mul(double c)
mul
in interface MulFloatingPoint
public float getRealFloat()
getRealFloat
in interface ComplexType<UnsignedVariableBitLengthType>
public double getRealDouble()
getRealDouble
in interface ComplexType<UnsignedVariableBitLengthType>
public void setReal(float real)
setReal
in interface ComplexType<UnsignedVariableBitLengthType>
public void setReal(double real)
setReal
in interface ComplexType<UnsignedVariableBitLengthType>
public int getBitsPerPixel()
getBitsPerPixel
in interface RealType<UnsignedVariableBitLengthType>
public double getMinIncrement()
getMinIncrement
in interface RealType<UnsignedVariableBitLengthType>
public int getInteger()
getInteger
in interface IntegerType<UnsignedVariableBitLengthType>
public long getIntegerLong()
getIntegerLong
in interface IntegerType<UnsignedVariableBitLengthType>
public BigInteger getBigInteger()
getBigInteger
in interface IntegerType<UnsignedVariableBitLengthType>
public void setInteger(int f)
setInteger
in interface IntegerType<UnsignedVariableBitLengthType>
public void setInteger(long f)
setInteger
in interface IntegerType<UnsignedVariableBitLengthType>
public void setBigInteger(BigInteger b)
setBigInteger
in interface IntegerType<UnsignedVariableBitLengthType>
public double getMaxValue()
Math.pow(2, nBits) -1
.getMaxValue
in interface RealType<UnsignedVariableBitLengthType>
public double getMinValue()
getMinValue
in interface RealType<UnsignedVariableBitLengthType>
public void inc()
inc
in interface RealType<UnsignedVariableBitLengthType>
public void dec()
dec
in interface RealType<UnsignedVariableBitLengthType>
public void add(UnsignedVariableBitLengthType t)
add
in interface Add<UnsignedVariableBitLengthType>
public void sub(UnsignedVariableBitLengthType t)
sub
in interface Sub<UnsignedVariableBitLengthType>
public void mul(UnsignedVariableBitLengthType t)
mul
in interface Mul<UnsignedVariableBitLengthType>
public void pow(UnsignedVariableBitLengthType c)
pow
in interface Pow<UnsignedVariableBitLengthType>
public void pow(double power)
pow
in interface PowFloatingPoint
public float getImaginaryFloat()
getImaginaryFloat
in interface ComplexType<UnsignedVariableBitLengthType>
public double getImaginaryDouble()
getImaginaryDouble
in interface ComplexType<UnsignedVariableBitLengthType>
public void setImaginary(float complex)
setImaginary
in interface ComplexType<UnsignedVariableBitLengthType>
public void setImaginary(double complex)
setImaginary
in interface ComplexType<UnsignedVariableBitLengthType>
public float getPhaseFloat()
getPhaseFloat
in interface ComplexType<UnsignedVariableBitLengthType>
public double getPhaseDouble()
getPhaseDouble
in interface ComplexType<UnsignedVariableBitLengthType>
public float getPowerFloat()
getPowerFloat
in interface ComplexType<UnsignedVariableBitLengthType>
public double getPowerDouble()
getPowerDouble
in interface ComplexType<UnsignedVariableBitLengthType>
public void setComplexNumber(float r, float i)
setComplexNumber
in interface ComplexType<UnsignedVariableBitLengthType>
public void setComplexNumber(double r, double i)
setComplexNumber
in interface ComplexType<UnsignedVariableBitLengthType>
public void complexConjugate()
complexConjugate
in interface ComplexType<UnsignedVariableBitLengthType>
public int compareTo(UnsignedVariableBitLengthType t)
compareTo
in interface Comparable<UnsignedVariableBitLengthType>
public boolean valueEquals(UnsignedVariableBitLengthType t)
valueEquals
in interface ValueEquals<UnsignedVariableBitLengthType>
t
- Copyright © 2015–2022 ImgLib2. All rights reserved.