public class HDF5TimeDurationMDArray
extends ch.systemsx.cisd.base.mdarray.MDAbstractArray<java.lang.Long>
Constructor and Description |
---|
HDF5TimeDurationMDArray(HDF5TimeDuration[] timeDurations,
int[] dimensions)
Creates an array of timeDurations using the smallest time unit.
|
HDF5TimeDurationMDArray(HDF5TimeDuration[] timeDurations,
int[] dimensions,
HDF5TimeUnit timeUnit)
Creates an array of timeDurations using a common timeUnit.
|
HDF5TimeDurationMDArray(int[] dimensions,
HDF5TimeUnit timeUnit)
Creates an array of dimension dimensions with timeUnit.
|
HDF5TimeDurationMDArray(long[] timeDurations,
int[] dimensions,
HDF5TimeUnit timeUnit)
Creates an array of timeDurations using a common timeUnit.
|
HDF5TimeDurationMDArray(ch.systemsx.cisd.base.mdarray.MDLongArray timeDurations,
HDF5TimeUnit timeUnit)
Creates an array of timeDurations using a common timeUnit.
|
Modifier and Type | Method and Description |
---|---|
int |
capacity()
Returns the capacity of elements in the array.
|
int |
computeIndex(int... indices)
Computes the linear index for the multi-dimensional indices provided.
|
int |
computeIndex(int indexX,
int indexY)
Computes the linear index for the two-dimensional (indexX, indexY) provided.
|
int |
computeIndex(int indexX,
int indexY,
int indexZ)
Computes the linear index for the three-dimensional (indexX, indexY, indexZ)
provided.
|
int[] |
computeReverseIndex(int linearIndex)
Computes the multi-dimensional index from the linearIndex.
|
int |
decNumberOfHyperRows(int count)
Decrease the number of hyper-rows by count.
|
int[] |
dimensions()
Returns the number of elements.
|
boolean |
equals(java.lang.Object obj) |
HDF5TimeDuration |
get(HDF5TimeUnit targetUnit,
int... indices)
Returns the value of array at the position defined by indices in the given
targetUnit.
|
HDF5TimeDuration |
get(HDF5TimeUnit targetUnit,
int index)
Returns the value of a one-dimensional array at the position defined by index in
the given targetUnit.
|
HDF5TimeDuration |
get(HDF5TimeUnit targetUnit,
int indexX,
int indexY)
Returns the value of a two-dimensional array at the position defined by indexX and
indexY in the given targetUnit.
|
HDF5TimeDuration |
get(HDF5TimeUnit targetUnit,
int indexX,
int indexY,
int indexZ)
Returns the value of a three-dimensional array at the position defined by indexX,
indexY and indexZ in the given targetUnit.
|
long |
get(int... indices) |
long |
get(int index) |
long |
get(int indexX,
int indexY) |
long |
get(int indexX,
int indexY,
int indexZ) |
long[] |
getAsFlatArray()
Returns the time duration values as a flat array.
|
long[] |
getAsFlatArray(HDF5TimeUnit targetUnit)
Returns the time duration values as a flat array in the given targetUnit.
|
java.lang.Long |
getAsObject(int... indices)
Return an object which has the same value as the element of the array specified by
indices.
|
java.lang.Long |
getAsObject(int linearIndex)
Return an object which has the same value as the element of the array specified by
linearIndex.
|
long[] |
getCopyAsFlatArray()
Returns a copy of the array in flattened form.
|
int |
getLength()
Returns the number of elements.
|
HDF5TimeUnit |
getUnit()
Returns the time unit.
|
long |
getValue(HDF5TimeUnit targetUnit,
int... indices)
Returns the value element index in the given targetUnit.
|
long |
getValue(HDF5TimeUnit targetUnit,
int index)
Returns the value element index in the given targetUnit.
|
long |
getValue(HDF5TimeUnit targetUnit,
int indexX,
int indexY)
Returns the value element index in the given targetUnit.
|
long |
getValue(HDF5TimeUnit targetUnit,
int indexX,
int indexY,
int indexZ)
Returns the value element index in the given targetUnit.
|
long |
getValue(int... indices)
Returns the value element indices.
|
long |
getValue(int index)
Returns the value element index.
|
long |
getValue(int indexX,
int indexY)
Returns the value element (indexX,indexY).
|
long |
getValue(int indexX,
int indexY,
int indexZ)
Returns the value element (indexX,indexY,indexZ).
|
ch.systemsx.cisd.base.mdarray.MDLongArray |
getValues()
Returns the time duration values.
|
ch.systemsx.cisd.base.mdarray.MDLongArray |
getValues(HDF5TimeUnit targetUnit)
Returns the time duration values in the given targetUnit.
|
int |
hashCode() |
int |
incNumberOfHyperRows(int count)
Increase the number of hyper-rows by count.
|
java.util.Iterator<ch.systemsx.cisd.base.mdarray.MDAbstractArray.ArrayEntry> |
iterator() |
long[] |
longDimensions()
Returns the number of elements.
|
int |
numberOfHyperRows()
Returns the current number of hyper rows of of this array.
|
int |
rank()
Returns the rank of the array.
|
void |
set(long value,
int... indices) |
void |
set(long value,
int index) |
void |
set(long value,
int indexX,
int indexY) |
void |
set(long value,
int indexX,
int indexY,
int indexZ) |
void |
setToObject(java.lang.Long value,
int... indices)
Sets the element of the array specified by indices to the particular
value.
|
void |
setToObject(java.lang.Long value,
int linearIndex)
Sets the element of the array specified by linearIndex to the particular
value.
|
int |
size()
Returns the number of elements in the array.
|
int |
size(int dim)
Returns the extent of the array along its dim-th axis.
|
long[][] |
toMatrix() |
java.lang.String |
toString() |
public HDF5TimeDurationMDArray(ch.systemsx.cisd.base.mdarray.MDLongArray timeDurations, HDF5TimeUnit timeUnit)
public HDF5TimeDurationMDArray(long[] timeDurations, int[] dimensions, HDF5TimeUnit timeUnit)
public HDF5TimeDurationMDArray(int[] dimensions, HDF5TimeUnit timeUnit)
public HDF5TimeDurationMDArray(HDF5TimeDuration[] timeDurations, int[] dimensions, HDF5TimeUnit timeUnit)
public HDF5TimeDurationMDArray(HDF5TimeDuration[] timeDurations, int[] dimensions)
public HDF5TimeUnit getUnit()
public long[] getAsFlatArray()
getAsFlatArray
in class ch.systemsx.cisd.base.mdarray.MDAbstractArray<java.lang.Long>
public int[] dimensions()
dimensions
in class ch.systemsx.cisd.base.mdarray.MDAbstractArray<java.lang.Long>
public long[] longDimensions()
longDimensions
in class ch.systemsx.cisd.base.mdarray.MDAbstractArray<java.lang.Long>
public int getLength()
public ch.systemsx.cisd.base.mdarray.MDLongArray getValues()
public ch.systemsx.cisd.base.mdarray.MDLongArray getValues(HDF5TimeUnit targetUnit)
public long[] getAsFlatArray(HDF5TimeUnit targetUnit)
public HDF5TimeDuration get(HDF5TimeUnit targetUnit, int index)
Do not call for arrays other than one-dimensional!
public HDF5TimeDuration get(HDF5TimeUnit targetUnit, int indexX, int indexY)
Do not call for arrays other than two-dimensional!
public HDF5TimeDuration get(HDF5TimeUnit targetUnit, int indexX, int indexY, int indexZ)
Do not call for arrays other than three-dimensional!
public HDF5TimeDuration get(HDF5TimeUnit targetUnit, int... indices)
public long getValue(int index)
Do not call for arrays other than one-dimensional!
public long getValue(int indexX, int indexY)
Do not call for arrays other than two-dimensional!
public long getValue(int indexX, int indexY, int indexZ)
Do not call for arrays other than three-dimensional!
public long getValue(int... indices)
public long getValue(HDF5TimeUnit targetUnit, int index)
Do not call for arrays other than one-dimensional!
public long getValue(HDF5TimeUnit targetUnit, int indexX, int indexY)
Do not call for arrays other than one-dimensional!
public long getValue(HDF5TimeUnit targetUnit, int indexX, int indexY, int indexZ)
Do not call for arrays other than one-dimensional!
public long getValue(HDF5TimeUnit targetUnit, int... indices)
Do not call for arrays other than one-dimensional!
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class ch.systemsx.cisd.base.mdarray.MDAbstractArray<java.lang.Long>
public java.lang.Long getAsObject(int linearIndex)
ch.systemsx.cisd.base.mdarray.MDAbstractArray
getAsObject
in class ch.systemsx.cisd.base.mdarray.MDAbstractArray<java.lang.Long>
linearIndex
- The index in the linear array returned by MDAbstractArray.getAsFlatArray()
.public java.lang.Long getAsObject(int... indices)
ch.systemsx.cisd.base.mdarray.MDAbstractArray
getAsObject
in class ch.systemsx.cisd.base.mdarray.MDAbstractArray<java.lang.Long>
public void setToObject(java.lang.Long value, int... indices)
ch.systemsx.cisd.base.mdarray.MDAbstractArray
setToObject
in class ch.systemsx.cisd.base.mdarray.MDAbstractArray<java.lang.Long>
public void setToObject(java.lang.Long value, int linearIndex)
ch.systemsx.cisd.base.mdarray.MDAbstractArray
setToObject
in class ch.systemsx.cisd.base.mdarray.MDAbstractArray<java.lang.Long>
value
- The new value to set.linearIndex
- The index in the linear array returned by MDAbstractArray.getAsFlatArray()
.public long[] getCopyAsFlatArray()
ch.systemsx.cisd.base.mdarray.MDAbstractArray
getCopyAsFlatArray
in class ch.systemsx.cisd.base.mdarray.MDAbstractArray<java.lang.Long>
public int capacity()
ch.systemsx.cisd.base.mdarray.MDAbstractArray
capacity
in class ch.systemsx.cisd.base.mdarray.MDAbstractArray<java.lang.Long>
public int incNumberOfHyperRows(int count)
ch.systemsx.cisd.base.mdarray.MDAbstractArray
incNumberOfHyperRows
in class ch.systemsx.cisd.base.mdarray.MDAbstractArray<java.lang.Long>
public int rank()
ch.systemsx.cisd.base.mdarray.MDAbstractArray
rank
in class ch.systemsx.cisd.base.mdarray.MDAbstractArray<java.lang.Long>
public int size(int dim)
ch.systemsx.cisd.base.mdarray.MDAbstractArray
size
in class ch.systemsx.cisd.base.mdarray.MDAbstractArray<java.lang.Long>
public int size()
ch.systemsx.cisd.base.mdarray.MDAbstractArray
size
in class ch.systemsx.cisd.base.mdarray.MDAbstractArray<java.lang.Long>
public int numberOfHyperRows()
ch.systemsx.cisd.base.mdarray.MDAbstractArray
numberOfHyperRows
in class ch.systemsx.cisd.base.mdarray.MDAbstractArray<java.lang.Long>
public int decNumberOfHyperRows(int count)
ch.systemsx.cisd.base.mdarray.MDAbstractArray
decNumberOfHyperRows
in class ch.systemsx.cisd.base.mdarray.MDAbstractArray<java.lang.Long>
public int computeIndex(int... indices)
ch.systemsx.cisd.base.mdarray.MDAbstractArray
computeIndex
in class ch.systemsx.cisd.base.mdarray.MDAbstractArray<java.lang.Long>
public int[] computeReverseIndex(int linearIndex)
ch.systemsx.cisd.base.mdarray.MDAbstractArray
computeReverseIndex
in class ch.systemsx.cisd.base.mdarray.MDAbstractArray<java.lang.Long>
public int computeIndex(int indexX, int indexY)
ch.systemsx.cisd.base.mdarray.MDAbstractArray
computeIndex
in class ch.systemsx.cisd.base.mdarray.MDAbstractArray<java.lang.Long>
public int computeIndex(int indexX, int indexY, int indexZ)
ch.systemsx.cisd.base.mdarray.MDAbstractArray
computeIndex
in class ch.systemsx.cisd.base.mdarray.MDAbstractArray<java.lang.Long>
public java.util.Iterator<ch.systemsx.cisd.base.mdarray.MDAbstractArray.ArrayEntry> iterator()
iterator
in interface java.lang.Iterable<ch.systemsx.cisd.base.mdarray.MDAbstractArray.ArrayEntry>
iterator
in class ch.systemsx.cisd.base.mdarray.MDAbstractArray<java.lang.Long>
public long get(int index)
MDLongArray.get(int)
public long get(int indexX, int indexY)
MDLongArray.get(int, int)
public long get(int indexX, int indexY, int indexZ)
MDLongArray.get(int, int, int)
public long get(int... indices)
MDLongArray.get(int[])
public void set(long value, int index)
MDLongArray.set(long, int)
public void set(long value, int indexX, int indexY)
MDLongArray.set(long, int, int)
public void set(long value, int indexX, int indexY, int indexZ)
MDLongArray.set(long, int, int, int)
public void set(long value, int... indices)
MDLongArray.set(long, int[])
public long[][] toMatrix()
MDLongArray.toMatrix()