public class FloatType extends RealTypeImpl<FloatType> implements RealType<FloatType>
| Constructor and Description |
|---|
FloatType() |
FloatType(DirectAccessContainer<FloatType,? extends FloatAccess> floatStorage) |
FloatType(float value) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(FloatType c) |
int |
compareTo(FloatType c) |
FloatType |
copy()
|
FloatType[] |
createArray1D(int size1)
Creates a 1d array of the generic
Type |
FloatType[][] |
createArray2D(int size1,
int size2)
Creates a 2d array of the generic
Type |
FloatType[][][] |
createArray3D(int size1,
int size2,
int size3)
Creates a 3d array of the generic
Type |
DirectAccessContainer<FloatType,? extends FloatAccess> |
createSuitableDirectAccessContainer(DirectAccessContainerFactory storageFactory,
int[] dim)
The
Type creates the DirectAccessContainer used for storing image data; based on the given storage strategy and its size. |
FloatType |
createVariable()
Creates a new
Type which can only store one value. |
void |
dec() |
void |
div(FloatType c) |
FloatType |
duplicateTypeOnSameDirectAccessContainer()
Creates a new
Type which stores in the same physical array. |
float |
get() |
double |
getMaxValue() |
double |
getMinIncrement() |
double |
getMinValue() |
Precision.PrecisionReal |
getPreferredRealPrecision() |
double |
getRealDouble() |
float |
getRealFloat() |
void |
inc() |
void |
mul(double c) |
void |
mul(float c) |
void |
mul(FloatType c) |
void |
set(float f) |
void |
set(FloatType c)
Sets the value of another
Type. |
void |
setOne() |
void |
setReal(double real) |
void |
setReal(float real) |
void |
setZero() |
void |
sub(FloatType c) |
void |
updateContainer(Cursor<?> c)
|
decIndex, decIndex, getComplexDouble, getComplexFloat, getDefaultDisplay, getEntitiesPerPixel, getPhaseDouble, getPhaseFloat, getPowerDouble, getPowerFloat, incIndex, incIndex, setComplex, setComplex, toString, updateIndexcomplexConjugate, setComplexNumber, setComplexNumberclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcomplexConjugate, getComplexDouble, getComplexFloat, getPhaseDouble, getPhaseFloat, getPowerDouble, getPowerFloat, setComplex, setComplex, setComplexNumber, setComplexNumberdecIndex, decIndex, getDefaultDisplay, getEntitiesPerPixel, getIndex, incIndex, incIndex, updateIndexpublic FloatType(DirectAccessContainer<FloatType,? extends FloatAccess> floatStorage)
public FloatType(float value)
public FloatType()
public DirectAccessContainer<FloatType,? extends FloatAccess> createSuitableDirectAccessContainer(DirectAccessContainerFactory storageFactory, int[] dim)
TypeType creates the DirectAccessContainer used for storing image data; based on the given storage strategy and its size. It
basically only decides here which BasicType it uses (float, int, byte, bit, ...) and how many entities per pixel it needs
(e.g. 2 floats per pixel for a complex number). This enables the separation of Image and the basic types.createSuitableDirectAccessContainer in interface Type<FloatType>storageFactory - - Which storage strategy is useddim - - the dimensionsType knowns the BasicType it contains.public void updateContainer(Cursor<?> c)
TypeCursors to update the data current data array
of the Type, for example when moving from one Cell to the next.
If it is only an Array the Cursors never have to call that function.
The idea behind this concept is maybe not obvious. The Type knows which basic type
is used (float, int, byte, ...) but does not know how it is stored (Array, CellDirectAccessContainer, ...) to
prevent multiple implementations of Type.
That's why Type asks the DataAccess to give the actual basic array by passing the Cursor
that calls the method. The DataAccess is also an Array, CellDirectAccessContainer, ... which
can then communicate with the ArrayCursor, CellCursor, ... and return the current basic type array.
A typical implementation of this method looks like that (this is the FloatType implementation):
float[] v = floatStorage.getCurrentStorageArray( c );updateContainer in interface Type<FloatType>c - - the Cursor gives a link to itself so that the Type
tell its DataAccess to get the new basic type array.public FloatType duplicateTypeOnSameDirectAccessContainer()
TypeType which stores in the same physical array. This is only used internally.duplicateTypeOnSameDirectAccessContainer in interface Type<FloatType>Type instance working on the same DirectAccessContainerpublic float get()
public void set(float f)
public float getRealFloat()
getRealFloat in interface ComplexType<FloatType>public double getRealDouble()
getRealDouble in interface ComplexType<FloatType>public void setReal(float real)
setReal in interface ComplexType<FloatType>public void setReal(double real)
setReal in interface ComplexType<FloatType>public Precision.PrecisionReal getPreferredRealPrecision()
getPreferredRealPrecision in interface ComplexType<FloatType>getPreferredRealPrecision in class ComplexTypeImpl<FloatType>public double getMaxValue()
getMaxValue in interface RealType<FloatType>public double getMinValue()
getMinValue in interface RealType<FloatType>public double getMinIncrement()
getMinIncrement in interface RealType<FloatType>public void mul(float c)
mul in interface NumericType<FloatType>mul in class RealTypeImpl<FloatType>public void mul(double c)
mul in interface NumericType<FloatType>mul in class RealTypeImpl<FloatType>public void add(FloatType c)
add in interface NumericType<FloatType>add in class RealTypeImpl<FloatType>public void div(FloatType c)
div in interface NumericType<FloatType>div in class RealTypeImpl<FloatType>public void mul(FloatType c)
mul in interface NumericType<FloatType>mul in class RealTypeImpl<FloatType>public void sub(FloatType c)
sub in interface NumericType<FloatType>sub in class RealTypeImpl<FloatType>public int compareTo(FloatType c)
compareTo in interface Comparable<FloatType>compareTo in class RealTypeImpl<FloatType>public void set(FloatType c)
TypeType.public void setOne()
setOne in interface NumericType<FloatType>setOne in class RealTypeImpl<FloatType>public void setZero()
setZero in interface NumericType<FloatType>setZero in class RealTypeImpl<FloatType>public void inc()
public void dec()
public FloatType[] createArray1D(int size1)
TypeTypecreateArray1D in interface Type<FloatType>size1 - - the size of the arraypublic FloatType[][] createArray2D(int size1, int size2)
TypeTypecreateArray2D in interface Type<FloatType>size1 - - the size of the arraysize2 - - the size of the arraypublic FloatType[][][] createArray3D(int size1, int size2, int size3)
TypeTypecreateArray3D in interface Type<FloatType>size1 - - the size of the arraysize2 - - the size of the arraysize3 - - the size of the arraypublic FloatType createVariable()
TypeType which can only store one value.createVariable in interface Type<FloatType>Type instanceCopyright © 2015–2021 Fiji. All rights reserved.