public final class LongType extends IntegerTypeImpl<LongType>
| Constructor and Description |
|---|
LongType() |
LongType(DirectAccessContainer<LongType,? extends LongAccess> longStorage) |
LongType(long value) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(LongType c) |
int |
compareTo(LongType c) |
LongType |
copy()
|
LongType[] |
createArray1D(int size1)
Creates a 1d array of the generic
Type |
LongType[][] |
createArray2D(int size1,
int size2)
Creates a 2d array of the generic
Type |
LongType[][][] |
createArray3D(int size1,
int size2,
int size3)
Creates a 3d array of the generic
Type |
DirectAccessContainer<LongType,? extends LongAccess> |
createSuitableDirectAccessContainer(DirectAccessContainerFactory storageFactory,
int[] dim)
The
Type creates the DirectAccessContainer used for storing image data; based on the given storage strategy and its size. |
LongType |
createVariable()
Creates a new
Type which can only store one value. |
void |
dec() |
void |
div(LongType c) |
LongType |
duplicateTypeOnSameDirectAccessContainer()
Creates a new
Type which stores in the same physical array. |
long |
get() |
int |
getInteger() |
long |
getIntegerLong() |
double |
getMaxValue() |
double |
getMinValue() |
void |
inc() |
void |
mul(double c) |
void |
mul(float c) |
void |
mul(LongType c) |
void |
set(long f) |
void |
set(LongType c)
Sets the value of another
Type. |
void |
setInteger(int f) |
void |
setInteger(long f) |
void |
setOne() |
void |
setZero() |
void |
sub(LongType c) |
void |
updateContainer(Cursor<?> c)
|
getDefaultDisplay, getMinIncrement, getRealDouble, getRealFloat, setReal, setReal, toStringdecIndex, decIndex, getComplexDouble, getComplexFloat, getEntitiesPerPixel, getPhaseDouble, getPhaseFloat, getPowerDouble, getPowerFloat, incIndex, incIndex, setComplex, setComplex, updateIndexcomplexConjugate, getPreferredRealPrecision, setComplexNumber, setComplexNumberclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcomplexConjugate, getComplexDouble, getComplexFloat, getPhaseDouble, getPhaseFloat, getPowerDouble, getPowerFloat, getPreferredRealPrecision, setComplex, setComplex, setComplexNumber, setComplexNumberdecIndex, decIndex, getEntitiesPerPixel, getIndex, incIndex, incIndex, updateIndexpublic LongType(DirectAccessContainer<LongType,? extends LongAccess> longStorage)
public LongType(long value)
public LongType()
public DirectAccessContainer<LongType,? extends LongAccess> 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.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 );c - - the Cursor gives a link to itself so that the Type
tell its DataAccess to get the new basic type array.public LongType duplicateTypeOnSameDirectAccessContainer()
TypeType which stores in the same physical array. This is only used internally.Type instance working on the same DirectAccessContainerpublic long get()
public void set(long f)
public int getInteger()
public long getIntegerLong()
public void setInteger(int f)
public void setInteger(long f)
public double getMaxValue()
public double getMinValue()
public void mul(float c)
mul in interface NumericType<LongType>mul in class RealTypeImpl<LongType>public void mul(double c)
mul in interface NumericType<LongType>mul in class RealTypeImpl<LongType>public void add(LongType c)
add in interface NumericType<LongType>add in class RealTypeImpl<LongType>public void div(LongType c)
div in interface NumericType<LongType>div in class RealTypeImpl<LongType>public void mul(LongType c)
mul in interface NumericType<LongType>mul in class RealTypeImpl<LongType>public void sub(LongType c)
sub in interface NumericType<LongType>sub in class RealTypeImpl<LongType>public int compareTo(LongType c)
compareTo in interface Comparable<LongType>compareTo in class IntegerTypeImpl<LongType>public void set(LongType c)
TypeType.public void setOne()
setOne in interface NumericType<LongType>setOne in class IntegerTypeImpl<LongType>public void setZero()
setZero in interface NumericType<LongType>setZero in class IntegerTypeImpl<LongType>public void inc()
public void dec()
public LongType[] createArray1D(int size1)
TypeTypesize1 - - the size of the arraypublic LongType[][] createArray2D(int size1, int size2)
TypeTypesize1 - - the size of the arraysize2 - - the size of the arraypublic LongType[][][] createArray3D(int size1, int size2, int size3)
TypeTypesize1 - - the size of the arraysize2 - - the size of the arraysize3 - - the size of the arraypublic LongType createVariable()
TypeType which can only store one value.Type instanceCopyright © 2015–2021 Fiji. All rights reserved.