public class DoubleType extends RealTypeImpl<DoubleType> implements RealType<DoubleType>, ExponentialMathType<DoubleType>
Constructor and Description |
---|
DoubleType() |
DoubleType(DirectAccessContainer<DoubleType,? extends DoubleAccess> doubleStorage) |
DoubleType(double value) |
Modifier and Type | Method and Description |
---|---|
DoubleType |
copy()
|
DoubleType[] |
createArray1D(int size1)
Creates a 1d array of the generic
Type |
DoubleType[][] |
createArray2D(int size1,
int size2)
Creates a 2d array of the generic
Type |
DoubleType[][][] |
createArray3D(int size1,
int size2,
int size3)
Creates a 3d array of the generic
Type |
DirectAccessContainer<DoubleType,? extends DoubleAccess> |
createSuitableDirectAccessContainer(DirectAccessContainerFactory storageFactory,
int[] dim)
The
Type creates the DirectAccessContainer used for storing image data; based on the given storage strategy and its size. |
DoubleType |
createVariable()
Creates a new
Type which can only store one value. |
DoubleType |
duplicateTypeOnSameDirectAccessContainer()
Creates a new
Type which stores in the same physical array. |
void |
exp() |
double |
get() |
double |
getMaxValue() |
double |
getMinIncrement() |
double |
getMinValue() |
double |
getRealDouble() |
float |
getRealFloat() |
void |
round() |
void |
set(double f) |
void |
setReal(double real) |
void |
setReal(float real) |
void |
updateContainer(Cursor<?> c)
|
add, compareTo, dec, decIndex, decIndex, div, getComplexDouble, getComplexFloat, getDefaultDisplay, getEntitiesPerPixel, getPhaseDouble, getPhaseFloat, getPowerDouble, getPowerFloat, inc, incIndex, incIndex, mul, mul, mul, set, setComplex, setComplex, setOne, setZero, sub, toString, updateIndex
complexConjugate, getPreferredRealPrecision, setComplexNumber, setComplexNumber
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
complexConjugate, getComplexDouble, getComplexFloat, getPhaseDouble, getPhaseFloat, getPowerDouble, getPowerFloat, getPreferredRealPrecision, setComplex, setComplex, setComplexNumber, setComplexNumber
add, div, mul, mul, mul, setOne, setZero, sub
decIndex, decIndex, getDefaultDisplay, getEntitiesPerPixel, getIndex, incIndex, incIndex, set, updateIndex
compareTo
public DoubleType(DirectAccessContainer<DoubleType,? extends DoubleAccess> doubleStorage)
public DoubleType(double value)
public DoubleType()
public DirectAccessContainer<DoubleType,? extends DoubleAccess> createSuitableDirectAccessContainer(DirectAccessContainerFactory storageFactory, int[] dim)
Type
Type
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<DoubleType>
storageFactory
- - Which storage strategy is useddim
- - the dimensionsType
knowns the BasicType it contains.public void updateContainer(Cursor<?> c)
Type
Cursor
s 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 Cursor
s 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<DoubleType>
c
- - the Cursor
gives a link to itself so that the Type
tell its DataAccess
to get the new basic type array.public DoubleType duplicateTypeOnSameDirectAccessContainer()
Type
Type
which stores in the same physical array. This is only used internally.duplicateTypeOnSameDirectAccessContainer
in interface Type<DoubleType>
Type
instance working on the same DirectAccessContainer
public double get()
public void set(double f)
public float getRealFloat()
getRealFloat
in interface ComplexType<DoubleType>
public double getRealDouble()
getRealDouble
in interface ComplexType<DoubleType>
public void setReal(float real)
setReal
in interface ComplexType<DoubleType>
public void setReal(double real)
setReal
in interface ComplexType<DoubleType>
public double getMaxValue()
getMaxValue
in interface RealType<DoubleType>
public double getMinValue()
getMinValue
in interface RealType<DoubleType>
public double getMinIncrement()
getMinIncrement
in interface RealType<DoubleType>
public DoubleType[] createArray1D(int size1)
Type
Type
createArray1D
in interface Type<DoubleType>
size1
- - the size of the arraypublic DoubleType[][] createArray2D(int size1, int size2)
Type
Type
createArray2D
in interface Type<DoubleType>
size1
- - the size of the arraysize2
- - the size of the arraypublic DoubleType[][][] createArray3D(int size1, int size2, int size3)
Type
Type
createArray3D
in interface Type<DoubleType>
size1
- - the size of the arraysize2
- - the size of the arraysize3
- - the size of the arraypublic DoubleType createVariable()
Type
Type
which can only store one value.createVariable
in interface Type<DoubleType>
Type
instancepublic DoubleType copy()
Type
copy
in interface Type<DoubleType>
copy
in class TypeImpl<DoubleType>
Type
instancepublic void exp()
exp
in interface ExponentialMathType<DoubleType>
public void round()
round
in interface ExponentialMathType<DoubleType>
Copyright © 2015–2021 Fiji. All rights reserved.