public class ComplexFloatType extends ComplexTypeImpl<ComplexFloatType> implements ComplexType<ComplexFloatType>
| Constructor and Description |
|---|
ComplexFloatType() |
ComplexFloatType(DirectAccessContainer<ComplexFloatType,? extends FloatAccess> complexfloatStorage) |
ComplexFloatType(float real,
float complex) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(ComplexFloatType c) |
void |
complexConjugate() |
ComplexFloatType |
copy()
|
ComplexFloatType[] |
createArray1D(int size1)
Creates a 1d array of the generic
Type |
ComplexFloatType[][] |
createArray2D(int size1,
int size2)
Creates a 2d array of the generic
Type |
ComplexFloatType[][][] |
createArray3D(int size1,
int size2,
int size3)
Creates a 3d array of the generic
Type |
DirectAccessContainer<ComplexFloatType,? 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. |
ComplexFloatType |
createVariable()
Creates a new
Type which can only store one value. |
void |
div(ComplexFloatType c) |
ComplexFloatType |
duplicateTypeOnSameDirectAccessContainer()
Creates a new
Type which stores in the same physical array. |
double |
getComplexDouble() |
float |
getComplexFloat() |
Precision.PrecisionReal |
getPreferredRealPrecision() |
double |
getRealDouble() |
float |
getRealFloat() |
void |
mul(ComplexFloatType t) |
void |
set(ComplexFloatType c)
Sets the value of another
Type. |
void |
set(float real,
float complex) |
void |
setComplex(double complex) |
void |
setComplex(float complex) |
void |
setReal(double real) |
void |
setReal(float real) |
void |
sub(ComplexFloatType c) |
void |
switchRealComplex() |
void |
updateContainer(Cursor<?> c)
|
decIndex, decIndex, getDefaultDisplay, getEntitiesPerPixel, getPhaseDouble, getPhaseFloat, getPowerDouble, getPowerFloat, incIndex, incIndex, mul, mul, setComplexNumber, setComplexNumber, setOne, setZero, toString, updateIndexclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetPhaseDouble, getPhaseFloat, getPowerDouble, getPowerFloat, setComplexNumber, setComplexNumbermul, mul, setOne, setZerodecIndex, decIndex, getDefaultDisplay, getEntitiesPerPixel, getIndex, incIndex, incIndex, updateIndexpublic ComplexFloatType(DirectAccessContainer<ComplexFloatType,? extends FloatAccess> complexfloatStorage)
public ComplexFloatType(float real,
float complex)
public ComplexFloatType()
public DirectAccessContainer<ComplexFloatType,? 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<ComplexFloatType>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<ComplexFloatType>c - - the Cursor gives a link to itself so that the Type
tell its DataAccess to get the new basic type array.public ComplexFloatType duplicateTypeOnSameDirectAccessContainer()
TypeType which stores in the same physical array. This is only used internally.duplicateTypeOnSameDirectAccessContainer in interface Type<ComplexFloatType>Type instance working on the same DirectAccessContainerpublic float getRealFloat()
getRealFloat in interface ComplexType<ComplexFloatType>public double getRealDouble()
getRealDouble in interface ComplexType<ComplexFloatType>public float getComplexFloat()
getComplexFloat in interface ComplexType<ComplexFloatType>public double getComplexDouble()
getComplexDouble in interface ComplexType<ComplexFloatType>public void setReal(float real)
setReal in interface ComplexType<ComplexFloatType>public void setReal(double real)
setReal in interface ComplexType<ComplexFloatType>public void setComplex(float complex)
setComplex in interface ComplexType<ComplexFloatType>public void setComplex(double complex)
setComplex in interface ComplexType<ComplexFloatType>public Precision.PrecisionReal getPreferredRealPrecision()
getPreferredRealPrecision in interface ComplexType<ComplexFloatType>getPreferredRealPrecision in class ComplexTypeImpl<ComplexFloatType>public void set(float real,
float complex)
public void add(ComplexFloatType c)
add in interface NumericType<ComplexFloatType>add in class ComplexTypeImpl<ComplexFloatType>public void div(ComplexFloatType c)
div in interface NumericType<ComplexFloatType>div in class ComplexTypeImpl<ComplexFloatType>public void mul(ComplexFloatType t)
mul in interface NumericType<ComplexFloatType>mul in class ComplexTypeImpl<ComplexFloatType>public void sub(ComplexFloatType c)
sub in interface NumericType<ComplexFloatType>sub in class ComplexTypeImpl<ComplexFloatType>public void complexConjugate()
complexConjugate in interface ComplexType<ComplexFloatType>complexConjugate in class ComplexTypeImpl<ComplexFloatType>public void switchRealComplex()
public void set(ComplexFloatType c)
TypeType.set in interface Type<ComplexFloatType>set in class ComplexTypeImpl<ComplexFloatType>c - - the new valuepublic ComplexFloatType[] createArray1D(int size1)
TypeTypecreateArray1D in interface Type<ComplexFloatType>size1 - - the size of the arraypublic ComplexFloatType[][] createArray2D(int size1, int size2)
TypeTypecreateArray2D in interface Type<ComplexFloatType>size1 - - the size of the arraysize2 - - the size of the arraypublic ComplexFloatType[][][] createArray3D(int size1, int size2, int size3)
TypeTypecreateArray3D in interface Type<ComplexFloatType>size1 - - the size of the arraysize2 - - the size of the arraysize3 - - the size of the arraypublic ComplexFloatType createVariable()
TypeType which can only store one value.createVariable in interface Type<ComplexFloatType>Type instancepublic ComplexFloatType copy()
Typecopy in interface Type<ComplexFloatType>copy in class TypeImpl<ComplexFloatType>Type instanceCopyright © 2015–2021 Fiji. All rights reserved.